kumquat-buildroot/package/binutils/2.25
Max Filippov 384c919321 binutils: fix xtensa ld bug triggered by --gc-sections
elf_xtensa_gc_sweep_hook doesn't correctly unreference symbols that were
made local, that results in link failure with the following message:

  BFD (GNU Binutils) 2.24 internal error, aborting at elf32-xtensa.c line
  3372 in elf_xtensa_finish_dynamic_sections

elf_xtensa_gc_sweep_hook determines symbol reference type (PLT or GOT) by
relocation type. Relocation types are not changed when symbol becomes
local, but its PLT references are added to GOT references and
plt.refcount is set to 0. Such symbol cannot be unreferences in the
elf_xtensa_gc_sweep_hook and its extra references make calculated GOT
relocations section size not match number of GOT relocations.

Fix it by treating PLT reference as GOT reference when plt.refcount is
not positive.

Fixes:
  http://autobuild.buildroot.net/results/3e2e24f697e26c93d4d95782b1cb7799fa620a7a/
  http://autobuild.buildroot.org/results/97d4c96d6f6cdc1ed4007456f4ab70be9dfa41b5/

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-05-16 18:28:06 +02:00
..
120-sh-conf.patch
300-001_ld_makefile_patch.patch
300-012_check_ldrunpath_length.patch
500-sysroot.patch
600-poison-system-directories.patch
905-Fix-trampolines-search-code-for-conditional-branches.patch
906-xtensa-optimize-check_section_ebb_pcrels_fit.patch
907-xtensa-optimize-removed_by_actions.patch
908-xtensa-optimize-find_removed_literal.patch
909-xtensa-replace-action-list-with-splay-tree.patch
910-xtensa-optimize-trampolines-relaxation.patch binutils: fix xtensa gas trampolines regression 2015-05-10 23:08:54 +02:00
911-xtensa-fix-localized-symbol-refcounting-with-gc-sect.patch binutils: fix xtensa ld bug triggered by --gc-sections 2015-05-16 18:28:06 +02:00