commit | 65cefbd0793c0f9e90a326d7bebf0a47c93294ad | [log] [tgz] |
---|---|---|
author | Josh Stone <jistone@redhat.com> | Tue Mar 11 10:19:28 2014 -0700 |
committer | Josh Stone <jistone@redhat.com> | Tue Mar 11 10:19:28 2014 -0700 |
tree | 16e5d723ff25e056dd831a85f7941d938e28cba4 | |
parent | 4b9e1433d2272f5f68b3227abdd9cf6817a0afd3 [diff] |
libdwfl: dwfl_module_getdwarf.c (open_elf) only (re)set mod->e_type once. As noted in https://sourceware.org/bugzilla/show_bug.cgi?id=16676#c2 for systemtap, the heuristic used by open_elf to set the kernel Dwfl_Module type to ET_DYN, even if the underlying ELF file e_type was set to ET_EXEC, could trigger erroneously for non-kernel/non-main (debug or aux) files. Make sure we only set the e_type of the module once when processing the main file (when the phdrs can be trusted).