[llvm-bugs] [Bug 32703] New: lld with --dynamic-list breaks FreeBSD

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Apr 18 08:17:09 PDT 2017


            Bug ID: 32703
           Summary: lld with --dynamic-list breaks FreeBSD
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: ELF
          Assignee: unassignedbugs at nondot.org
          Reporter: andrew at fubar.geek.nz
                CC: dimitry at andric.com, emaste at freebsd.org,
                    llvm-bugs at lists.llvm.org

When porting the sanitizers to FreeBSD/arm64 I found the tests failed to run
with the following error:

/lib/libc.so.7: Undefined symbol "__progname"

I tracked this down to the use of --dynamic-list with lld. When I remove these
arguments from the linker command line the test runs without the error.
Building with ld.bfd, but with --dynamic-list also runs correctly.

It seems the issue is lld fails to put __progname in the .dynsym section. This
comes from crt1.o, and libc expects this to be exported from the main program.

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/20170418/7f381853/attachment.html>

More information about the llvm-bugs mailing list