https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102772
--- Comment #23 from Jakub Jelinek <jakub at gcc dot gnu.org> --- (In reply to r...@cebitec.uni-bielefeld.de from comment #21) > > --- Comment #19 from Jakub Jelinek <jakub at gcc dot gnu.org> --- > > If it is the linker, you can always objdump -dr the binary to see what is in > > there after linking. s@ntpoff in my understanding is a relocation that > > should > > supply at link time the offset from the TLS base and at least on the GCC > > side > > it can appear anywhere where 32-bit immediate appears in an instruction (or > > in > > data section too), not necessarily in addl imm, %eax instruction. > > The linker isn't a factor here: both ld and gld 2.38 produce the same > result: > > 08048890 <_Z3foov>: > 8048890: 65 a1 00 00 00 00 mov %gs:0x0,%eax > 8048896: 05 d0 ff ff ff add $0xffffffd0,%eax > 804889b: c3 ret How does foob look like when linked (from both)?