[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug default/25058] abigail does not handle subprogram DIEs with DW_AT_ranges instead of DW_AT_low_pc



https://sourceware.org/bugzilla/show_bug.cgi?id=25058

--- Comment #9 from dodji at seketeli dot org ---
"simark at simark dot ca" <sourceware-bugzilla@sourceware.org> a écrit:

> I suppose it could try to look up an ELF symbol using the "low pc" of each
> range, until it finds one whose name corresponds to the DW_AT_linkage_name of
> the function DIE (if the DIE has that attribute).

I think trying to match the DW_AT_linkage_name will lead to to errors
because we can't rely on the fact that a DW_AT_linkage_name has to match
a symbol name.

Symbol aliasing, which usually happens due to compiler code size
optimizations (e.g, happens a lot in C++), or due to assembler tricks
programmers play sometime, can make the name of the symbol be different
from the value of the DW_AT_linkage_name.

So instead, I'd go for just picking the first address (of the set
referred to by the value of the DW_AT_ranges attribute) that is for a
publicly exported function symbol and consider that one as being the one
we are looking for.

-- 
You are receiving this mail because:
You are on the CC list for the bug.