Bug 13990 - ld/ld-new: BFD assertion fail, elf32-arm.c:12259 with --gc-sections and --shared, GCing a PLT reference to a local symbol
Summary: ld/ld-new: BFD assertion fail, elf32-arm.c:12259 with --gc-sections and --sha...
Status: RESOLVED FIXED
Alias: None
Product: binutils
Classification: Unclassified
Component: ld (show other bugs)
Version: 2.24
: P2 normal
Target Milestone: ---
Assignee: Hans-Peter Nilsson
URL: http://sourceware.org/ml/binutils/201...
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-18 21:48 UTC by Hans-Peter Nilsson
Modified: 2014-05-28 19:41 UTC (History)
0 users

See Also:
Host:
Target: arm-linux-gnueabi
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hans-Peter Nilsson 2012-04-18 21:48:36 UTC
Building libstdc++.so.6 from the gcc-4.7 branch with current binutils will yield the following assertions, but the linker will create what seems like a correct DSO.

/tmp/somewhere/o/ld/ld-new: BFD (GNU Binutils) 2.22.52.20120416 assertion fail /tmp/somewhere/src/bfd/elf32-arm.c:12259
/tmp/somewhere/o/ld/ld-new: BFD (GNU Binutils) 2.22.52.20120416 assertion fail /tmp/somewhere/src/bfd/elf32-arm.c:12259
/tmp/somewhere/o/ld/ld-new: BFD (GNU Binutils) 2.22.52.20120416 assertion fail /tmp/somewhere/src/bfd/elf32-arm.c:12259
/tmp/somewhere/o/ld/ld-new: BFD (GNU Binutils) 2.22.52.20120416 assertion fail /tmp/somewhere/src/bfd/elf32-arm.c:12259

Again, you may notice this only by inspecting the build log.
Patch in progress; will send it and reduced test-case to the list.
Comment 1 Sourceware Commits 2012-04-24 16:09:19 UTC
CVSROOT:	/cvs/src
Module name:	src
Changes by:	hp@sourceware.org	2012-04-24 16:09:12

Modified files:
	bfd            : ChangeLog elf32-arm.c 

Log message:
	PR ld/13990
	* elf32-arm.c (elf32_arm_gc_sweep_hook): Handle a forced-local
	symbol, where PLT refcount is set to -1.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/ChangeLog.diff?cvsroot=src&r1=1.5660&r2=1.5661
http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/elf32-arm.c.diff?cvsroot=src&r1=1.287&r2=1.288
Comment 3 Hans-Peter Nilsson 2012-04-24 16:18:27 UTC
fixed.
Comment 4 Jackie Rosen 2014-02-16 18:27:39 UTC Comment hidden (spam)