mirror of
https://github.com/tobast/libunwind-eh_elf.git
synced 2024-11-25 08:37:38 +01:00
Fix undefined symbol: _Uelf64_valid_object
Without this change, we end up building libunwind-${arch}.a with missing symbols. Signed-off-by: Jan Kratochvil <jan.kratochvil@redhat.com>
This commit is contained in:
parent
59328832f7
commit
3d08506936
2 changed files with 12 additions and 14 deletions
13
src/elfxx.c
13
src/elfxx.c
|
@ -29,19 +29,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
|||
|
||||
#include "libunwind_i.h"
|
||||
|
||||
HIDDEN int
|
||||
elf_w (valid_object) (struct elf_image *ei)
|
||||
{
|
||||
if (ei->size <= EI_VERSION)
|
||||
return 0;
|
||||
|
||||
return (memcmp (ei->image, ELFMAG, SELFMAG) == 0
|
||||
&& ((uint8_t *) ei->image)[EI_CLASS] == ELF_CLASS
|
||||
&& ((uint8_t *) ei->image)[EI_VERSION] != EV_NONE
|
||||
&& ((uint8_t *) ei->image)[EI_VERSION] <= EV_CURRENT);
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
elf_w (lookup_symbol) (unw_addr_space_t as,
|
||||
unw_word_t ip, struct elf_image *ei,
|
||||
|
|
13
src/elfxx.h
13
src/elfxx.h
|
@ -43,12 +43,23 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
|||
|
||||
#include "libunwind_i.h"
|
||||
|
||||
extern int elf_w (valid_object) (struct elf_image *ei);
|
||||
extern int elf_w (get_proc_name) (unw_addr_space_t as,
|
||||
pid_t pid, unw_word_t ip,
|
||||
char *buf, size_t len,
|
||||
unw_word_t *offp);
|
||||
|
||||
static inline int
|
||||
elf_w (valid_object) (struct elf_image *ei)
|
||||
{
|
||||
if (ei->size <= EI_VERSION)
|
||||
return 0;
|
||||
|
||||
return (memcmp (ei->image, ELFMAG, SELFMAG) == 0
|
||||
&& ((uint8_t *) ei->image)[EI_CLASS] == ELF_CLASS
|
||||
&& ((uint8_t *) ei->image)[EI_VERSION] != EV_NONE
|
||||
&& ((uint8_t *) ei->image)[EI_VERSION] <= EV_CURRENT);
|
||||
}
|
||||
|
||||
static inline int
|
||||
elf_map_image (struct elf_image *ei, const char *path)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue