https://bugs.llvm.org/show_bug.cgi?id=32703

            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: unassignedb...@nondot.org
          Reporter: and...@fubar.geek.nz
                CC: dimi...@andric.com, ema...@freebsd.org,
                    llvm-bugs@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to