Can't link base

Mark Millard markmi at dsl-only.net
Mon Apr 3 17:54:14 UTC 2017


On 2017-Apr-3, at 9:42 AM, Shawn Webb <shawn.webb at hardenedbsd.org> wrote:

> Looks like aarch64-binutils 2.28 causes linking issues when building
> base. LLD 4.0.0 in base can't link aarch64 base, either.
> 
> /usr/local/aarch64-freebsd/bin/ld: getutxent.pico(.debug_info+0x3b): R_AARCH64_ABS64 used with TLS symbol udb
> /usr/local/aarch64-freebsd/bin/ld: getutxent.pico(.debug_info+0x58): R_AARCH64_ABS64 used with TLS symbol uf
> /usr/local/aarch64-freebsd/bin/ld: utxdb.pico(.debug_info+0x5a): R_AARCH64_ABS64 used with TLS symbol futx_to_utx.ut
> /usr/local/aarch64-freebsd/bin/ld: jemalloc_tsd.pico(.debug_info+0x3c): R_AARCH64_ABS64 used with TLS symbol __je_tsd_tls
> /usr/local/aarch64-freebsd/bin/ld: jemalloc_tsd.pico(.debug_info+0x146e): R_AARCH64_ABS64 used with TLS symbol __je_tsd_initialized
> /usr/local/aarch64-freebsd/bin/ld: cxa_thread_atexit_impl.pico(.debug_info+0x3b): R_AARCH64_ABS64 used with TLS symbol dtors
> /usr/local/aarch64-freebsd/bin/ld: xlocale.pico(.debug_info+0x403): R_AARCH64_ABS64 used with TLS symbol __thread_locale
> /usr/local/aarch64-freebsd/bin/ld: setrunelocale.pico(.debug_info+0x3c): R_AARCH64_ABS64 used with TLS symbol _ThreadRuneLocale
> cc: error: linker command failed with exit code 1 (use -v to see invocation)
> --- libc.so.7.full ---
> *** [libc.so.7.full] Error code 1

See:

Bugzilla 218198 ( https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=218198 )
https://lists.freebsd.org/pipermail/freebsd-ports/2017-March/107859.html
https://ci.freebsd.org/job/FreeBSD-head-aarch64-build/1433/console

Comment 7 of the Bugzilla report from Antoon Yuzhaninov says that 2.27
also generates those messages but returns a zero exit code. 2.28's ld
returns a non-zero exit code because of the issue.

So the messages are visible even in old logs for WITH_DEBUG contexts.

Antoon has been pursuing evidence and has found:

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

on the llvm side and:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=4519d071387f374932616b588ddb4ec8cabe2a52

on the binutils side for the return code change.

===
Mark Millard
markmi at dsl-only.net



More information about the freebsd-arm mailing list