[Dwarf-Discuss] armcc DWARF

Richard Earnshaw Richard.Earnshaw@foss.arm.com
Wed May 23 17:54:45 GMT 2018


On 23/05/18 18:28, David Anderson wrote:
> On 05/23/2018 01:56 AM, Richard Earnshaw wrote:
>> It's perfectly legal to have multiple sections with the same name in an
>> ELF file.  All relevant inter section data is conveyed by the section's
>> unique index.  Having identical names for sections is important for
>> getting link ordering correct.  And also, for dwarf because the section
>> names have specific meanings that are not otherwise conveyed by
>> attribute data.
> 
> So, given two .debug_info and two .debug_line,? the only place I can
> think of that links
> the pieces together (ie right .debug_line from a .debug_info) as
> intended would be? relocation information.
> Similar for .debug_abbrev.
> Is that the entire key here?
> 
> DavidA.
> 

I'm afraid I can't remember all the details; Keith might know more.  I
think it's a combination of a number of things:

- Use of section groups - keep all of a group or none of it
- relocation information
- section ordering rules: eg if I have two groups (A B) and (C D) and
coalescing requires that A and C are placed in one output section and B
and D in another, then the only permitted orders are (A C) (B D) or (B
D) (A C) - ie (A C) (D B) is not a valid ordering.

R.



More information about the Dwarf-discuss mailing list