Bug 13990

Summary: ld/ld-new: BFD assertion fail, elf32-arm.c:12259 with --gc-sections and --shared, GCing a PLT reference to a local symbol
Product: binutils Reporter: Hans-Peter Nilsson <hp>
Component: ldAssignee: Hans-Peter Nilsson <hp>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 2.24   
Target Milestone: ---   
URL: http://sourceware.org/ml/binutils/2012-04/msg00228.html
Host: Target: arm-linux-gnueabi
Build: Last reconfirmed:

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 cvs-commit@gcc.gnu.org 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
*** Bug 260998 has been marked as a duplicate of this bug. ***
Seen from the domain http://volichat.com
Page where seen: http://volichat.com/adult-chat-rooms
Marked for reference. Resolved as fixed @bugzilla.