aboutsummaryrefslogtreecommitdiff
path: root/bfd/elfcode.h
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1995-01-27 21:24:28 +0000
committerIan Lance Taylor <ian@airs.com>1995-01-27 21:24:28 +0000
commit6977046f0f63d5ec3479bf8f0fdf685d2b1c5fc3 (patch)
tree19259ef3c83287d20acd5421a1835c3ea2c9796e /bfd/elfcode.h
parentabd77746decf93cef7c77aa8be5990fbc67627d7 (diff)
downloadgdb-6977046f0f63d5ec3479bf8f0fdf685d2b1c5fc3.zip
gdb-6977046f0f63d5ec3479bf8f0fdf685d2b1c5fc3.tar.gz
gdb-6977046f0f63d5ec3479bf8f0fdf685d2b1c5fc3.tar.bz2
* elfcode.h (elf_sort_hdrs): Correct SHF_ALLOC test.
(assign_file_positions_except_relocs): Free sorted_hdrs.
Diffstat (limited to 'bfd/elfcode.h')
-rw-r--r--bfd/elfcode.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/bfd/elfcode.h b/bfd/elfcode.h
index 43a071c..505ca57 100644
--- a/bfd/elfcode.h
+++ b/bfd/elfcode.h
@@ -2117,6 +2117,8 @@ assign_file_positions_except_relocs (abfd, dosyms)
if (phdr_map == (file_ptr) -1)
return false;
BFD_ASSERT ((bfd_size_type) phdr_map <= (bfd_size_type) phdr_off + phdr_size);
+
+ free (sorted_hdrs);
}
/* Place the section headers. */
@@ -2153,7 +2155,7 @@ elf_sort_hdrs (arg1, arg2)
}
else
{
- if ((hdr1->sh_flags & SHF_ALLOC) != 0)
+ if ((hdr2->sh_flags & SHF_ALLOC) != 0)
return 1;
return 0;
}