[lld] r193662 - [ELF] Implement minimal support for .eh_frame_hdr.

Shankar Easwaran shankare at codeaurora.org
Tue Oct 29 18:11:10 PDT 2013


On 10/29/2013 8:02 PM, Nick Kledzik wrote:
> On Oct 29, 2013, at 5:45 PM, Shankar Easwaran <shankare at codeaurora.org> wrote:
>> We were also discussing on IRC, that if this should be done by the reader by having each atom refer to a FDE entry that belongs to a PC range.
>>
>> This way the garbage collection would also be consistent ?
I was mentioning this as on ELF even with -ffunction-sections (each 
function in a seperate section), there is only one single eh_frame 
section that contains all the FDE entries. If we intended to garbage 
collect any of the functions, their FDE entry will be left as is.

So the Reader would need to convert the eh_frame section into FDE/CIE 
Atoms , for this to happen.

I dont know where the CIE reference should be contained though in the 
above approach ?

> Well, the eh_frame_hdr is an index.  You need to build it after the Resolver is done (dead stripping (aka GC)) and after the layout pass which orders some atoms.
Yes, I agree constructing the eh_frame_hdr to be a pass.

Thanks

Shankar Easwaran



More information about the llvm-commits mailing list