This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Who generate .rela.debug_info?
- From: Nathan Sidwell <nathan at acm dot org>
- To: Nancy <nancydreaming at gmail dot com>, gcc at gcc dot gnu dot org
- Date: Mon, 18 Dec 2017 09:12:34 -0500
- Subject: Re: Who generate .rela.debug_info?
- Authentication-results: sourceware.org; auth=none
- References: <CADdyJmmV3ENy=8DnF4Abjn5KD7WU4hcsXM7tse4E1f7HF5JnUQ@mail.gmail.com>
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