[llvm-bugs] [Bug 41058] New: Allow linking against shared objects without section headers
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Mar 13 14:44:57 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=41058
Bug ID: 41058
Summary: Allow linking against shared objects without section
headers
Product: lld
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: ELF
Assignee: unassignedbugs at nondot.org
Reporter: jakehehrlich at google.com
CC: llvm-bugs at lists.llvm.org, peter.smith at linaro.org
On fuchsia we use --strip-sections on everything but currently have a hack
where we use --strip-all on shared libraries and then --strip-sections before
we put things on the device. We do this because it is assumed that a .dynsym
section will be around.
It is possible to use PT_DYNAMIC and the hash table to find all dynamic symbols
in a library and get the same bytes as those found in .dynsym without needing
the actual section headers however. See
https://github.com/llvm/llvm-project/blob/master/llvm/tools/llvm-elfabi/ELFObjHandler.cpp#L154
for code that does this that we can copy into LLD. Roland McGrath and Armando
worked that out and I reviewed it. Armando showed that it gave the correct size
for .dynsym on every Fuchsia binary as well so it not only should it
theoretically work but it has been shown to work well on a large project in
practice.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190313/fc7b4e5b/attachment.html>
More information about the llvm-bugs
mailing list