On 12/18/2017 08:57 AM, Nancy wrote:
Dear list,
tls.c:
__thread int i=10;
$gcc -g -c -save-temps tls.c
$readelf -r tls.o
Relocation section '.rela.debug_info' at offset 0x2d0 contains 6 entries:
Relocation section '.rela.debug_aranges' at offset 0x360 contains 1 entries:
Offset Info Type Sym. Value Sym. Name +
Addend
000000000006 00060000000a R_X86_64_32 0000000000000000 .debug_info + 0
I can't find any code in cc1 or as that generate R_X86_64_DTPOFF32 in
.rela.debug_info section. Did I miss something?
.rela.X is a relocation section generated by the assembler. GCC emits
debug information using assembler pseudos such as .word etc. Those will
name relocations. The syntax for relocations is target-specific. The
above will be some_symbol@dtpoff or something.
nathan
--
Nathan Sidwell