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: unassignedb...@nondot.org
          Reporter: jakehehrl...@google.com
                CC: llvm-bugs@lists.llvm.org, peter.sm...@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to