summaryrefslogtreecommitdiffstats
path: root/src/readelf.c
diff options
context:
space:
mode:
authorRoland McGrath <[email protected]>2008-01-18 21:42:01 +0000
committerRoland McGrath <[email protected]>2008-01-18 21:42:01 +0000
commit580e6b85aaf8e09bddcaa1162d74b3b6ceef8a52 (patch)
treee6b1d13f98106c839eca47f25ebf3e0505e55e00 /src/readelf.c
parentc182f90bd79ac9954a17aaa7792aac3e8103851d (diff)
merge of 'aee0b12a9696567adc81ce0bab9a764f6d109392'
and 'f3933ac5f5de522fcd38d0960f642fec00b553fa'
Diffstat (limited to 'src/readelf.c')
-rw-r--r--src/readelf.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/readelf.c b/src/readelf.c
index e0352443..f243f626 100644
--- a/src/readelf.c
+++ b/src/readelf.c
@@ -601,6 +601,7 @@ process_elf_file (Dwfl_Module *dwflmod, int fd)
if (ehdr->e_type == ET_REL && print_unrelocated)
{
/* Read the file afresh. */
+ pure_elf = elf_begin (fd, ELF_C_READ_MMAP, NULL);
off64_t aroff = elf_getaroff (elf);
if (aroff > 0)
{
@@ -610,8 +611,6 @@ process_elf_file (Dwfl_Module *dwflmod, int fd)
elf_end (pure_elf);
pure_elf = armem;
}
- else
- pure_elf = elf_begin (fd, ELF_C_READ_MMAP, NULL);
if (pure_elf == NULL)
goto elf_error;
pure_ebl = ebl_openbackend (pure_elf);