This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Who generate .rela.debug_info?


On 12/19/2017 08:53 AM, Nancy wrote:
.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.
Sorry, I did not find it in "AS". I did saw .text .data  .bss and some
other new segment created by "AS" through function "subseg_new", but I
could not find out where and how ".rela.debug_info" is generated. For
this case, "as" dwarf2dbg.c(binutils-2.29.1): 1932
if(emit_other_sections) does not run (emit_other_section==0).

My understand, all .debug_XXX is generated by GCC, "AS" just copy them
to obj, not a bit change. But I also could not find ".rela.X" in GCC.
That is correct.  GCC emits an ascii text representation that the 
assembler converts to a binary ELF representation.  ELF represents a 
what one thinks of as a single section as two sections.  One with the 
regular name given it -- '.debug_info' or whatever.  This holds the 
binary image of that section.  The other section is named '.rela<NAME>' 
(or .rel<NAME>' depending on the target ABI) to hold the relocation 
data.  This is handled by the assembler & BFD.
It's not clear to my why you want this level of detail -- curiosity?

http://www.sco.com/developers/gabi/latest/contents.html
https://software.intel.com/sites/default/files/article/402129/mpx-linux64-abi.pdf


nathan

--
Nathan Sidwell


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]