kumquat-buildroot/package/binutils
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
..
2.22 binutils: fix xtensa ld bug triggered by --gc-sections 2015-05-16 18:28:06 +02:00
2.23.2 binutils: fix xtensa ld bug triggered by --gc-sections 2015-05-16 18:28:06 +02:00
2.24 binutils: fix xtensa ld bug triggered by --gc-sections 2015-05-16 18:28:06 +02:00
2.25 binutils: fix xtensa ld bug triggered by --gc-sections 2015-05-16 18:28:06 +02:00
arc-2014.12 package/binutils (arc): backport PR56780 patches 2015-05-14 00:36:40 +02:00
binutils.hash package/binutils: add hashes 2015-04-25 11:50:29 +02:00
binutils.mk binutils: fix target binutils on ARC 2015-03-15 16:58:17 +01:00
Config.in package/binutils: fix comment dependencies 2014-12-07 22:05:26 +01:00
Config.in.host binutils: remove blackfin conditionals 2015-03-20 21:51:02 +01:00