[PATCH] D24920: [ELF] Linkerscript: Yet Another Fix For Empty Sections.
Eugene Leviant via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 26 08:53:24 PDT 2016
evgeny777 created this revision.
evgeny777 added reviewers: rafael, ruiu.
evgeny777 added subscribers: grimar, ikudrin, llvm-commits.
evgeny777 set the repository for this revision to rL LLVM.
evgeny777 added a project: lld.
Current implementation handles empty section only in case it contains symbols. Unfortunately it's not the only case when empty section should be kept. Consider the following example:
```
SECTIONS {
.eh_frame_hdr : { *(.eh_frame_hdr) }
__eh_frame_hdr_start = ADDR(.eh_frame_hdr);
}
```
This script cannot be processed by lld in case there is no .eh_frame_hdr section in the target image.
The proposed implementation doesn't have side effects (no extended PT_LOADs and no empty sections in the target image) and doesn't look more complex than the existing one
Repository:
rL LLVM
https://reviews.llvm.org/D24920
Files:
ELF/LinkerScript.cpp
ELF/LinkerScript.h
ELF/Writer.cpp
test/ELF/linkerscript/extend-pt-load.s
test/ELF/linkerscript/symbol-only.s
test/ELF/linkerscript/symbols-synthetic.s
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24920.72496.patch
Type: text/x-patch
Size: 12138 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160926/326fbc5f/attachment.bin>
More information about the llvm-commits
mailing list