From d8dcc9c17a866f18b342b3b0594c15d007b8b73b Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 13 Jun 2006 19:48:19 +0000 Subject: 2006-06-13 Roland McGrath * elf-from-memory.c (elf_from_remote_memory): Fix 32/64 typo. Use __libdwfl_seterrno for elf_memory failure. --- libdwfl/ChangeLog | 5 +++++ libdwfl/elf-from-memory.c | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'libdwfl') diff --git a/libdwfl/ChangeLog b/libdwfl/ChangeLog index 1a49526d..96fe56bc 100644 --- a/libdwfl/ChangeLog +++ b/libdwfl/ChangeLog @@ -1,3 +1,8 @@ +2006-06-13 Roland McGrath + + * elf-from-memory.c (elf_from_remote_memory): Fix 32/64 typo. + Use __libdwfl_seterrno for elf_memory failure. + 2006-05-27 Ulrich Drepper * libdwfl.h: Add extern "C". diff --git a/libdwfl/elf-from-memory.c b/libdwfl/elf-from-memory.c index 90a0c4d8..2a174759 100644 --- a/libdwfl/elf-from-memory.c +++ b/libdwfl/elf-from-memory.c @@ -1,5 +1,5 @@ /* Reconstruct an ELF file by reading the segments out of remote memory. - Copyright (C) 2005 Red Hat, Inc. + Copyright (C) 2005, 2006 Red Hat, Inc. This file is part of Red Hat elfutils. Red Hat elfutils is free software; you can redistribute it and/or modify @@ -338,7 +338,7 @@ elf_from_remote_memory (GElf_Addr ehdr_vma, xlatefrom.d_size = xlateto.d_size = sizeof ehdr.e64; xlatefrom.d_buf = &ehdr.e64; xlateto.d_buf = buffer; - if (elf32_xlatetof (&xlateto, &xlatefrom, + if (elf64_xlatetof (&xlateto, &xlatefrom, ehdr.e64.e_ident[EI_DATA]) == NULL) goto libelf_error; break; @@ -354,7 +354,7 @@ elf_from_remote_memory (GElf_Addr ehdr_vma, if (elf == NULL) { free (buffer); - return NULL; + goto libelf_error; } elf->flags |= ELF_F_MALLOCED; -- cgit v1.2.1