Bug 2513 - binutils incorrectly merges TLS relocations of different types
Summary: binutils incorrectly merges TLS relocations of different types
Status: RESOLVED FIXED
Alias: None
Product: binutils
Classification: Unclassified
Component: ld (show other bugs)
Version: 2.17
: P2 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-05 14:15 UTC by Andreas Schwab
Modified: 2006-04-08 22:58 UTC (History)
2 users (show)

See Also:
Host:
Target: i586-*-linux
Build:
Last reconfirmed:


Attachments
A testcase (451 bytes, application/octet-stream)
2006-04-06 14:58 UTC, H.J. Lu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Schwab 2006-04-05 14:15:09 UTC
From Jörg Sonnenberger <joerg@bec.de>:

When linking PIC and non-PIC object files which access the same thread locale
variable, R_386_TLS_GD and R_386_TLS_IE relocations are merged into a single
R_386_TLS_TPOFF relocation, ignoring the different offset calculations.
ftp://packages.stura.uni-rostock.de/misc/tls-reloc.tgz has a small test case.
It results in a segfault of ld-linux.
Comment 1 H.J. Lu 2006-04-06 14:58:22 UTC
Created attachment 954 [details]
A testcase

I added the testcase.
Comment 2 H.J. Lu 2006-04-08 16:02:18 UTC
A patch is posted at

http://sourceware.org/ml/binutils/2006-04/msg00128.html
Comment 3 H.J. Lu 2006-04-08 22:58:16 UTC
I used the new binutils on gcc and glibc. Everything looks OK. Fixed.