https://sourceware.org/bugzilla/show_bug.cgi?id=27624
--- Comment #3 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Stafford Horne <sho...@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=a76ef689b60405e494cb99e198acf3c82f467f7d commit a76ef689b60405e494cb99e198acf3c82f467f7d Author: Stafford Horne <sho...@gmail.com> Date: Thu May 6 20:51:24 2021 +0900 or1k: Fix issue with plt link failure for local calls When building protobuf we were seeing the assert failure: /home/giuliobenetti/git/upstream/or1k-binutils-2.36.1/host/lib/gcc/or1k-buildroot-linux-uclibc/9.3.0/../../../../or1k-buildroot-linux-uclibc/bin/ld: BFD (GNU Binutils) 2.36.1 assertion fail elf32-or1k.c:2377 /home/giuliobenetti/git/upstream/or1k-binutils-2.36.1/host/lib/gcc/or1k-buildroot-linux-uclibc/9.3.0/../../../../or1k-buildroot-linux-uclibc/bin/ld: BFD (GNU Binutils) 2.36.1 assertion fail elf32-or1k.c:2377 /home/giuliobenetti/git/upstream/or1k-binutils-2.36.1/host/lib/gcc/or1k-buildroot-linux-uclibc/9.3.0/../../../../or1k-buildroot-linux-uclibc/bin/ld: BFD (GNU Binutils) 2.36.1 assertion fail elf32-or1k.c:2377 collect2: error: ld returned 1 exit status This failure happens while writing out PLT entries, there is a check "BFD_ASSERT (h->dynindx != -1)" to confirm all plt entries have dynamic symbol attributes. This was failing for symbols that were "forced_local" in previous linking code. The fix adds logic to or1k_elf_adjust_dynamic_symbol to identify "forced_local" symbols and exclude them from the the PLT. bfd/ChangeLog: PR 27624 * elf32-or1k.c (or1k_elf_adjust_dynamic_symbol): Change condition used to cleanup plt entries to cleanup forced local entries. Cc: Giulio Benetti <giulio.bene...@benettiengineering.com> -- You are receiving this mail because: You are on the CC list for the bug.