aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2016-11-30 11:06:42 +0000
committerNick Clifton <nickc@redhat.com>2016-11-30 11:06:42 +0000
commit502d895cd1ca5d4abf4ef55984cbf5239aeaef0c (patch)
tree41121d44d426d7b3f26d05a9ec89540d610ccfb2
parentea3d7d1cab4221ab729327bb4d957352c79d05f0 (diff)
downloadgdb-502d895cd1ca5d4abf4ef55984cbf5239aeaef0c.zip
gdb-502d895cd1ca5d4abf4ef55984cbf5239aeaef0c.tar.gz
gdb-502d895cd1ca5d4abf4ef55984cbf5239aeaef0c.tar.bz2
Stop readelf from complaining about out of order PT_LOAD segments.
PR ld/20815 * readelf.c (process_program_headers): Do not warn about out of order PT_LOAD segments.
-rw-r--r--binutils/ChangeLog6
-rw-r--r--binutils/readelf.c4
2 files changed, 10 insertions, 0 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index eab32c7..35cd691 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,9 @@
+2016-11-30 Nick Clifton <nickc@redhat.com>
+
+ PR ld/20815
+ * readelf.c (process_program_headers): Do not warn about out of
+ order PT_LOAD segments.
+
2016-11-29 Claudiu Zissulescu <claziss@synopsys.com>
* testsuite/binutils-all/arc/objdump.exp (Warning test): Update
diff --git a/binutils/readelf.c b/binutils/readelf.c
index 347b6b9..c5a628f 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -4909,9 +4909,13 @@ process_program_headers (FILE * file)
switch (segment->p_type)
{
case PT_LOAD:
+#if 0 /* Do not warn about out of order PT_LOAD segments. Although officially
+ required by the ELF standard, several programs, including the Linux
+ kernel, make use of non-ordered segments. */
if (previous_load
&& previous_load->p_vaddr > segment->p_vaddr)
error (_("LOAD segments must be sorted in order of increasing VirtAddr\n"));
+#endif
if (segment->p_memsz < segment->p_filesz)
error (_("the segment's file size is larger than its memory size\n"));
previous_load = segment;