The following fails when I build binutils with: configure --build=x86_64-linux --disable-nls --disable-gdb --disable-gdbserver --disable-sim --disable-readline --disable-libdecnumber --enable-obsolete --target=powerpc-eabisim CFLAGS="-g -O2 -fsanitize=address,undefined -Wno-error" CXXLAGS="-g -O2 -fsanitize=address,undefined -Wno-error" LDFLAGS="-ldl" Target: powerpc-eabisim FAIL: TLS dynamic exec (--no-tls-optimize) Executing on host: sh -c {./ld-new -o tmpdir/tls.so -z norelro -L/home/mliska/Programming/binutils/ld/testsuite/ld-powerpc -shared -melf64ppc --no-plt-align --no-ld-generated-unwind-info --hash-style=sysv tmpdir/tls.o 2>&1} /dev/null ld.tmp (timeout = 300) /home/mliska/Programming/binutils/bfd/elf64-ppc.c:16107:6: runtime error: member access within null pointer of type 'struct ppc_link_hash_entry'
The master branch has been updated by Alan Modra <amodra@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=9e51d549d7901be8b999f8dac86c5efd6a7edef2 commit 9e51d549d7901be8b999f8dac86c5efd6a7edef2 Author: Alan Modra <amodra@gmail.com> Date: Wed Aug 26 19:43:18 2020 +0930 PR 26484-26488, 26490 UBSAN &h->elf null pointer PR 26484 PR 26485 PR 26486 PR 26487 PR 26488 PR 26490 * elf64-ppc.c (is_tls_get_addr): Avoid UB &h->elf when h is NULL. (ppc64_elf_tls_setup): Likewise. (branch_reloc_hash_match): Likewise. (build_plt_stub): Likewise. (ppc64_elf_relocate_section): Likewise.
Fixed