ld and GCC disagree about i386 local dynamic TLS
GCC emits R_386_TLS_LDM with a following R_386_PLT32 rather than
R_386_TLS_LDM_PLT, which causes ld to not relocate the 'call
___tls_get_addr', and leave a dangling 'call' in the output binary,
which will then crash unpredictably.
We should change the TLS_LDM implementation to always nop out the
following 'call', if there is a TLS_LDM_PLT, we'll nop it again when
processing that. If there isn't, no harm has been done.
Updated by Electric Monk over 3 years ago
- Status changed from In Progress to Closed
- % Done changed from 0 to 100
commit 096c97d62be876a03a0a8cdb0a540e9c84ec509f Author: Richard Lowe <email@example.com> Date: 2019-01-31T01:37:40.000Z 10267 ld and GCC disagree about i386 local dynamic TLS Reviewed by: Patrick Mooney <firstname.lastname@example.org> Reviewed by: Jason King <email@example.com> Reviewed by: Andy Stormont <firstname.lastname@example.org> Reviewed by: Gergő Doma <email@example.com> Approved by: Robert Mustacchi <firstname.lastname@example.org>