dwfl_module_get|addrsym_elf (Was: [commit] [patch 2/4] Provide __libdwfl_module_getsym to get dwfl_file *)

Mark Wielaard mjw at redhat.com
Wed Nov 27 15:48:16 UTC 2013


On Tue, 2013-11-26 at 15:23 +0100, Jan Kratochvil wrote:
> Maybe you had a reason for it but we could also just replace
> __libdwfl_module_getsym by dwfl_module_getsym_elf now.  It would just require
> changing
> 
> static inline GElf_Addr
> dwfl_deadjust_st_value (Dwfl_Module *mod, struct dwfl_file *symfile,
>                         GElf_Addr addr)
> 
> so that it accepts Elf * instead of struct dwfl_file * .

I admit I hadn't thought of that. Now I realize returning the Elf
without the bias is not as useful. For that the dwfl_file is also
useful. But we can still make the simplification you suggest. It does
cause a lot of small changes all over the place, hope that doesn't clash
too much with your pending patches. See attached. Also added one more
test to dwflsyms to make sure the returned bias is sane wrt the elf and
shndx.

Thanks,

Mark
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-libdwfl-Add-dwfl_module_addrsym_elf-and-dwfl_module_.patch
Type: text/x-patch
Size: 32957 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/elfutils-devel/attachments/20131127/17fa62aa/attachment-0001.bin>


More information about the elfutils-devel mailing list