[PATCH] D23197: [ELF] Linkerscript: refactor sorting of special sections
Eugene Leviant via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 5 04:42:16 PDT 2016
evgeny777 created this revision.
evgeny777 added reviewers: ruiu, rafael.
evgeny777 added subscribers: grimar, ikudrin, emaste, davide, llvm-commits.
evgeny777 set the repository for this revision to rL LLVM.
evgeny777 added a project: lld.
Currently contents of .init_array, .fini_array, .ctors and .dtors is being sorted in Writer::finalizeSections, no matter if those sections are present in linker script or not.
This patch moves sorting of special sections to createSections(), which will allow defining symbols within such sections (required by FreeBSD and number of other projects)
Below is an example:
```
.init_array {
__start = .;
*(.init_array*)
__end = .;
}
```
See this review:
https://reviews.llvm.org/D22683
Repository:
rL LLVM
https://reviews.llvm.org/D23197
Files:
ELF/LinkerScript.cpp
ELF/OutputSections.cpp
ELF/OutputSections.h
ELF/Writer.cpp
test/ELF/linkerscript/linkerscript-ctors-dtors.s
test/ELF/linkerscript/linkerscript-init-fini.s
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D23197.66924.patch
Type: text/x-patch
Size: 7761 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160805/b5d6d8eb/attachment.bin>
More information about the llvm-commits
mailing list