[PATCH] D23326: [ELF] - Linkerscript: reimplemented output sections constrains matching functionality.
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 9 09:59:23 PDT 2016
grimar created this revision.
grimar added reviewers: ruiu, rafael.
grimar added subscribers: llvm-commits, grimar, evgeny777, davide.
Herald added a subscriber: emaste.
Previously filtering that was used worked incorrectly.
For example for next script it would just remove both sections completely:
SECTIONS {
. = 0x1000;
.aaa : ONLY_IF_RW { *(.aaa.*) }
. = 0x2000;
.aaa : ONLY_IF_RO { *(.aaa.*) }
}
Patch fixes above issues and adds testcase showing the issue. Testcase is a subset of
FreeBSD script which has:
```
.eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) }
...
.eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) }
```
As a side result of a change, behavior of these commands is looks to be equal with ld now.
https://reviews.llvm.org/D23326
Files:
ELF/LinkerScript.cpp
ELF/LinkerScript.h
test/ELF/linkerscript/linkerscript-multi-sections-constraint.s
test/ELF/linkerscript/linkerscript-sections-constraint.s
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D23326.67363.patch
Type: text/x-patch
Size: 8570 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160809/75adc304/attachment.bin>
More information about the llvm-commits
mailing list