This is the mail archive of the binutils-cvs@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] ld: Fix failures in new orphan handling tests.


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=3d476d8d597a17afb05e5e33179c7ab95f9d0544

commit 3d476d8d597a17afb05e5e33179c7ab95f9d0544
Author: Andrew Burgess <andrew.burgess@embecosm.com>
Date:   Mon Sep 7 15:39:12 2015 +0100

    ld: Fix failures in new orphan handling tests.
    
    The new orphan handling tests added in commit c005eb9 fail on a range of
    targets.  Some of the failures were fixed in commit e32aa93 but not
    all.  This commit should address the remaining failures.
    
    Update results to account for orphan sections being placed in different
    orders, and for other, target specific sections, being discarded.
    
    ld/testsuite/ChangeLog:
    
    	* ld-elf/orphan-7.map: Allow for other discarded sections.
    	* ld-elf/orphan-8.map: Updated to allow for different section
    	ordering on different targets.
    	* ld-elf/orphan.ld: Place .sbss section.

Diff:
---
 ld/testsuite/ChangeLog           | 7 +++++++
 ld/testsuite/ld-elf/orphan-7.map | 7 ++++---
 ld/testsuite/ld-elf/orphan-8.map | 8 ++++----
 ld/testsuite/ld-elf/orphan.ld    | 1 +
 4 files changed, 16 insertions(+), 7 deletions(-)

diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index 6ca3083..c92d1e4 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+2015-09-07  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* ld-elf/orphan-7.map: Allow for other discarded sections.
+	* ld-elf/orphan-8.map: Updated to allow for different section
+	ordering on different targets.
+	* ld-elf/orphan.ld: Place .sbss section.
+
 2015-09-05  H.J. Lu  <hongjiu.lu@intel.com>
 
 	* ld-elf/orphan-8.map: Updated to support 32-bit targets.
diff --git a/ld/testsuite/ld-elf/orphan-7.map b/ld/testsuite/ld-elf/orphan-7.map
index 52cc359..888cb80 100644
--- a/ld/testsuite/ld-elf/orphan-7.map
+++ b/ld/testsuite/ld-elf/orphan-7.map
@@ -1,7 +1,8 @@
-
+#...
 Discarded input sections
-
+#...
  \.notbad        0x0+        0x4 tmpdir/.*\.o
  \.note\.bar      0x0+        0x4 tmpdir/.*\.o
-
 #...
+Linker script and memory map
+#...
\ No newline at end of file
diff --git a/ld/testsuite/ld-elf/orphan-8.map b/ld/testsuite/ld-elf/orphan-8.map
index 0bd9766..308d427 100644
--- a/ld/testsuite/ld-elf/orphan-8.map
+++ b/ld/testsuite/ld-elf/orphan-8.map
@@ -1,7 +1,7 @@
 #...
-.notbad         0x0+4        0x4
- .notbad        0x0+4        0x4 tmpdir/dump0.o
+.notbad         0x[0-9a-f]+        0x4
+ .notbad        0x[0-9a-f]+        0x4 tmpdir/dump0.o
 #...
-.note.bar       0x0+10        0x4
- .note.bar      0x0+10        0x4 tmpdir/dump0.o
+.note.bar       0x[0-9a-f]+        0x4
+ .note.bar      0x[0-9a-f]+        0x4 tmpdir/dump0.o
 #...
diff --git a/ld/testsuite/ld-elf/orphan.ld b/ld/testsuite/ld-elf/orphan.ld
index 44eb7eb..1ae908b 100644
--- a/ld/testsuite/ld-elf/orphan.ld
+++ b/ld/testsuite/ld-elf/orphan.ld
@@ -3,6 +3,7 @@ SECTIONS
   .text : { *(.text) }
   .data : { *(.data) }
   .bss : { *(.bss) *(COMMON) }
+  .sbss : { *(.sbss) }
   .note : { *(.note) }
   /DISCARD/ : { *(.reginfo) *(.MIPS.abiflags) *(.trampolines) }
 }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]