Output section description in SECTIONS looks like that:
section [address] [(type)] :
...
{
...
}
Patch implements support of address atribute.
Paths
| Differential D22689
[ELF] - Linkerscript: implemented output section [address] attribute. ClosedPublic Authored by grimar on Jul 22 2016, 10:24 AM.
Details Summary Output section description in SECTIONS looks like that: section [address] [(type)] : Patch implements support of address atribute.
Diff Detail Event TimelineComment Actions Do you have examples of linker scripts using this feature? I wasn't able to find any. Comment Actions @davide we have them in FreeBSD's kernel linker script (for debug data) but they're all addr 0, e.g.: /* DWARF debug sections. Symbols in the DWARF debugging sections are relative to the beginning of the section so we begin them at 0. */ /* DWARF 1 */ .debug 0 : { *(.debug) } .line 0 : { *(.line) } Comment Actions
OK, fine. Comment Actions
.lrodata ALIGN(CONSTANT (MAXPAGESIZE)) + (. & (CONSTANT (MAXPAGESIZE) - 1)) : { ... } https://svnweb.freebsd.org/base/head/sys/conf/ldscript.amd64?revision=284870&view=markup#l176 Comment Actions I mean that "ALIGN(CONSTANT (MAXPAGESIZE)) + (. & (CONSTANT (MAXPAGESIZE) - 1))" is [address] here. ruiu edited edge metadata. Comment ActionsLGTM
This revision is now accepted and ready to land.Jul 23 2016, 4:00 AM Closed by commit rL276619: [ELF] - Linkerscript: implemented output section [address] attribute. (authored by grimar). · Explain WhyJul 25 2016, 1:37 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 65100 ELF/LinkerScript.h
ELF/LinkerScript.cpp
test/ELF/linkerscript-diagnostic.s
test/ELF/linkerscript-locationcounter.s
test/ELF/linkerscript-outsections-addr.s
|
Please add a comment.