mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-05 15:15:42 +00:00
Fix examples of the use of the linker script TYPE keyword
This commit is contained in:
@@ -5970,19 +5970,19 @@ special requirements of the section type are met.
|
|||||||
Note - the TYPE only is used if some or all of the contents of the
|
Note - the TYPE only is used if some or all of the contents of the
|
||||||
section do not have an implicit type of their own. So for example:
|
section do not have an implicit type of their own. So for example:
|
||||||
@smallexample
|
@smallexample
|
||||||
.foo . TYPE = SHT_PROGBITS @{ *(.bar) @}
|
.foo . (TYPE = SHT_PROGBITS) : @{ *(.bar) @}
|
||||||
@end smallexample
|
@end smallexample
|
||||||
will set the type of section @samp{.foo} to the type of the section
|
will set the type of section @samp{.foo} to the type of the section
|
||||||
@samp{.bar} in the input files, which may not be the SHT_PROGBITS
|
@samp{.bar} in the input files, which may not be the SHT_PROGBITS
|
||||||
type. Whereas:
|
type. Whereas:
|
||||||
@smallexample
|
@smallexample
|
||||||
.foo . TYPE = SHT_PROGBITS @{ BYTE(1) @}
|
.foo . (TYPE = SHT_PROGBITS) : @{ BYTE(1) @}
|
||||||
@end smallexample
|
@end smallexample
|
||||||
will set the type of @samp{.foo} to SHT_PROGBBITS. If it is necessary
|
will set the type of @samp{.foo} to SHT_PROGBBITS. If it is necessary
|
||||||
to override the type of incoming sections and force the output section
|
to override the type of incoming sections and force the output section
|
||||||
type then an extra piece of untyped data will be needed:
|
type then an extra piece of untyped data will be needed:
|
||||||
@smallexample
|
@smallexample
|
||||||
.foo . TYPE = SHT_PROGBITS @{ BYTE(1); *(.bar) @}
|
.foo . (TYPE = SHT_PROGBITS) : @{ BYTE(1); *(.bar) @}
|
||||||
@end smallexample
|
@end smallexample
|
||||||
|
|
||||||
@item READONLY ( TYPE = @var{type} )
|
@item READONLY ( TYPE = @var{type} )
|
||||||
|
|||||||
Reference in New Issue
Block a user