Bug 11317 - Assertion failed in relocate_tls
Summary: Assertion failed in relocate_tls
Status: RESOLVED FIXED
Alias: None
Product: binutils
Classification: Unclassified
Component: gold (show other bugs)
Version: 2.21
: P2 minor
Target Milestone: ---
Assignee: Ian Lance Taylor
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-24 02:13 UTC by Dmitry Gorbachev
Modified: 2011-07-09 00:48 UTC (History)
1 user (show)

See Also:
Host: i686-pc-linux-gnu
Target: i686-pc-linux-gnu
Build: i686-pc-linux-gnu
Last reconfirmed:


Attachments
Backtrace (815 bytes, text/plain)
2010-02-24 02:14 UTC, Dmitry Gorbachev
Details
Testcase (226 bytes, application/octet-stream)
2010-02-24 02:16 UTC, Dmitry Gorbachev
Details
C source (56 bytes, text/plain)
2010-02-24 02:17 UTC, Dmitry Gorbachev
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Gorbachev 2010-02-24 02:13:17 UTC
GNU gold (GNU Binutils 2.20.51.20100223) 1.9
Comment 1 Dmitry Gorbachev 2010-02-24 02:14:10 UTC
Created attachment 4621 [details]
Backtrace
Comment 2 Dmitry Gorbachev 2010-02-24 02:16:53 UTC
Created attachment 4622 [details]
Testcase
Comment 3 Dmitry Gorbachev 2010-02-24 02:17:48 UTC
Created attachment 4623 [details]
C source
Comment 4 Dmitry Gorbachev 2010-11-20 14:52:20 UTC
Still in GOLD 1.10 (Binutils 2.21.51.20101116).
Comment 5 cvs-commit@gcc.gnu.org 2011-07-09 00:47:14 UTC
CVSROOT:	/cvs/src
Module name:	src
Changes by:	ian@sourceware.org	2011-07-09 00:47:12

Modified files:
	gold           : ChangeLog i386.cc target-reloc.h x86_64.cc 

Log message:
	PR gold/11317
	* target-reloc.h (issue_undefined_symbol_error): New inline
	function, broken out of relocate_section.
	(relocate_section): Call issue_undefined_symbol_error.
	* i386.cc (Target_i386::Relocate::relocate_tls): Don't crash if
	there is no TLS segment if we are about to issue an undefined
	symbol error.
	* x86_64.cc (Target_x86_64::relocate_tls): Likewise.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gold/ChangeLog.diff?cvsroot=src&r1=1.798&r2=1.799
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gold/i386.cc.diff?cvsroot=src&r1=1.137&r2=1.138
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gold/target-reloc.h.diff?cvsroot=src&r1=1.47&r2=1.48
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gold/x86_64.cc.diff?cvsroot=src&r1=1.135&r2=1.136
Comment 6 Ian Lance Taylor 2011-07-09 00:48:36 UTC
Fixed to give a proper error rather than an assertion failure.  Thanks for reporting the bug.