diff options
author | Michael Snyder <msnyder@vmware.com> | 2001-12-19 05:16:47 +0000 |
---|---|---|
committer | Michael Snyder <msnyder@vmware.com> | 2001-12-19 05:16:47 +0000 |
commit | 52e9b6196ae25776c0ed348b4b1d823c3b356854 (patch) | |
tree | 692e7e546add350fab000882527eced0adec086c /bfd | |
parent | 78a5120271dd53985e9b6610e4dfea1438c7e84b (diff) | |
download | gdb-52e9b6196ae25776c0ed348b4b1d823c3b356854.zip gdb-52e9b6196ae25776c0ed348b4b1d823c3b356854.tar.gz gdb-52e9b6196ae25776c0ed348b4b1d823c3b356854.tar.bz2 |
2001-12-18 Michael Snyder <msnyder@redhat.com>
* elf.c (assign_file_positions_for_segments): Don't sort PT_NOTE
sections of corefiles. Also it makes no sense to sort if count == 1.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/elf.c | 9 |
2 files changed, 12 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index e5b0769..77d3d81 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -12,6 +12,11 @@ (elfNN_hpux_post_process_headers): New function. #include elfNN-target.h again with values for IA64 HP-UX vector. +2001-12-18 Michael Snyder <msnyder@redhat.com> + + * elf.c (assign_file_positions_for_segments): Don't sort PT_NOTE + sections of corefiles. Also it makes no sense to sort if count == 1. + 2001-12-18 H.J. Lu <hjl@gnu.org> * elf.c (_bfd_elf_copy_private_bfd_data): Also copy GP. @@ -3299,8 +3299,13 @@ assign_file_positions_for_segments (abfd) asection **secpp; /* If elf_segment_map is not from map_sections_to_segments, the - sections may not be correctly ordered. */ - if (m->count > 0) + sections may not be correctly ordered. NOTE: sorting should + not be done to the PT_NOTE section of a corefile, which may + contain several pseudo-sections artificially created by bfd. + Sorting these pseudo-sections breaks things badly. */ + if (m->count > 1 + && !(elf_elfheader (abfd)->e_type == ET_CORE + && m->p_type == PT_NOTE)) qsort (m->sections, (size_t) m->count, sizeof (asection *), elf_sort_sections); |