[PATCH] D28045: [ELF] - Return file offset as address only for allocatable sections when building .gdb_index

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 22 23:24:02 PST 2016


>I think it's about the same if it returns 0 or Optional<uint64_t> - the lack of an offset and offset 0 are basically the same thing, so >far as I can tell. So it's not even like 0 is a special value, really.

>
>George - reckon we could/should do this up at the caller instead, though? SectionRef does have queries for compressed, text, >data, bss, virtual, bitcode - can we deduce allocated section from any of those, or worth adding it there?
>
>I'm not too fussed/don't know well enough, but just throwing around some ideas. (Adrian? Duncan? Eric? *shrug*)
>
>Eh - how about we go with what you've got for now. Can revisit it later if we want to.

Usecase we have in LLD is a bit specific it seems. For now I would just go with that minor local fix.

I think DWARFContextInMemory? do a bit too much for our LLD use case (building .gdb_index).
It does not really need to process all the relocations and uncompress debug sections again for example.
So I expect we will want to revisit its functionality anyways soon and think of extending/tweaking parsers API probably.

George.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161223/3787b312/attachment.html>


More information about the llvm-commits mailing list