mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Improve linker script align (#1271)
An offset is now supported, and invalid values are no longer silently truncated, aligning behaviour with other instances of the directive.
This commit is contained in:
@@ -68,15 +68,25 @@ and
|
||||
.Ic DS :
|
||||
.Bl -bullet
|
||||
.It
|
||||
.Ic ORG
|
||||
sets the address in which new sections will be placed.
|
||||
.Ic ORG Ar addr
|
||||
sets the address in which new sections will be placed to
|
||||
.Ar addr .
|
||||
It can not be lower than the current address.
|
||||
.It
|
||||
.Ic ALIGN
|
||||
.Ic ALIGN Ar addr
|
||||
or
|
||||
.Ic ALIGN Ar addr , Ar offset
|
||||
will increase the address until it is aligned to the specified boundary
|
||||
.Po it tries to set to 0 the number of bits specified after the directive:
|
||||
.Po it tries to set to
|
||||
.Ar offset
|
||||
the number of bits specified by
|
||||
.Ar align :
|
||||
for example,
|
||||
.Ql ALIGN 8
|
||||
will align to $100
|
||||
will align to $100 ,
|
||||
and
|
||||
.Ql ALIGN 8 , 10
|
||||
will align to $10A
|
||||
.Pc .
|
||||
.It
|
||||
.Ic DS
|
||||
|
||||
Reference in New Issue
Block a user