PATCH: ld/1467: Orphaned section is put in the odd place
H. J. Lu
hjl@lucon.org
Fri Oct 21 21:16:00 GMT 2005
I am checking in this patch to add a testcase.
H.J.
---
2005-10-21 H.J. Lu <hongjiu.lu@intel.com>
PR ld/1467
* ld-elf/orphan.d: New file.
* ld-elf/orphan.ld: Likewise.
* ld-elf/orphan.s: Likewise.
--- ld-elf/orphan.d.orphan 2005-10-21 14:03:11.000000000 -0700
+++ ld-elf/orphan.d 2005-10-21 14:06:55.000000000 -0700
@@ -0,0 +1,12 @@
+#source: orphan.s
+#ld: -T orphan.ld
+#readelf: -S --wide
+
+#...
+ \[[ 0-9]+\] \.text[ \t]+PROGBITS[ \t0-9a-f]+AX.*
+ \[[ 0-9]+\] \.notbad[ \t]+PROGBITS[ \t0-9a-f]+A.*
+ \[[ 0-9]+\] \.data[ \t]+PROGBITS[ \t0-9a-f]+WA.*
+#...
+ \[[ 0-9]+\] \.note[ \t]+NOTE[ \t0-9a-f]+A.*
+ \[[ 0-9]+\] \.note.bar[ \t]+NOTE[ \t0-9a-f]+A.*
+#pass
--- ld-elf/orphan.ld.orphan 2005-10-21 14:03:14.000000000 -0700
+++ ld-elf/orphan.ld 2005-10-21 14:08:28.000000000 -0700
@@ -0,0 +1,7 @@
+SECTIONS
+{
+ .text : { *(.text) }
+ .data : { *(.data) }
+ .bss : { *(.bss) *(COMMON) }
+ .note : { *(.note) }
+}
--- ld-elf/orphan.s.orphan 2005-10-21 14:03:07.000000000 -0700
+++ ld-elf/orphan.s 2005-10-11 17:56:33.000000000 -0700
@@ -0,0 +1,10 @@
+ .text
+ .long 0
+ .data
+ .long 0
+ .section .note,"a","note"
+ .long 0
+ .section .notbad,"a","progbits"
+ .long 0
+ .section .note.bar,"a","note"
+ .long 0
More information about the Binutils
mailing list