summaryrefslogtreecommitdiff
path: root/binutils/testsuite
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2012-04-13 02:52:33 +0000
committerH.J. Lu <hjl.tools@gmail.com>2012-04-13 02:52:33 +0000
commit4292a62c6de7dfddf1447151c126705eba470fdb (patch)
treee3619d70200782f0dcfd030ca7342261518e536e /binutils/testsuite
parente50e1ac4b79470c3bfa71332f4d43559e53b1e9c (diff)
downloadbinutils-redhat-4292a62c6de7dfddf1447151c126705eba470fdb.tar.gz
Don't generate empty reloc sections
binutils/ PR binutils/13947 * objcopy.c (copy_object): Call copy_relocations_in_section before copy_section. (skip_section): New. (copy_relocations_in_section): Likewise. (copy_section): Use skip_section. Don't copy relocations here. binutils/testsuite/ PR binutils/13947 * binutils-all/i386/compressed-1b.d: Remove empty REL section. * binutils-all/i386/compressed-1c.d: Likewise. * binutils-all/x86-64/compressed-1b.d: Remove empty RELA section. * binutils-all/x86-64/compressed-1c.d: Likewise.
Diffstat (limited to 'binutils/testsuite')
-rw-r--r--binutils/testsuite/ChangeLog10
-rw-r--r--binutils/testsuite/binutils-all/i386/compressed-1b.d9
-rw-r--r--binutils/testsuite/binutils-all/i386/compressed-1c.d9
-rw-r--r--binutils/testsuite/binutils-all/x86-64/compressed-1b.d9
-rw-r--r--binutils/testsuite/binutils-all/x86-64/compressed-1c.d9
5 files changed, 26 insertions, 20 deletions
diff --git a/binutils/testsuite/ChangeLog b/binutils/testsuite/ChangeLog
index db44b9209d..797272d0e7 100644
--- a/binutils/testsuite/ChangeLog
+++ b/binutils/testsuite/ChangeLog
@@ -1,3 +1,13 @@
+2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR binutils/13947
+ * binutils-all/i386/compressed-1b.d: Remove empty REL section.
+ * binutils-all/i386/compressed-1c.d: Likewise.
+
+ * binutils-all/x86-64/compressed-1b.d: Remove empty RELA
+ section.
+ * binutils-all/x86-64/compressed-1c.d: Likewise.
+
2012-04-03 Roland McGrath <mcgrathr@google.com>
* lib/binutils-common.exp (is_elf_format): Consider *-*-nacl* to
diff --git a/binutils/testsuite/binutils-all/i386/compressed-1b.d b/binutils/testsuite/binutils-all/i386/compressed-1b.d
index 1e13f6bc59..d7ffe21d88 100644
--- a/binutils/testsuite/binutils-all/i386/compressed-1b.d
+++ b/binutils/testsuite/binutils-all/i386/compressed-1b.d
@@ -5,15 +5,14 @@
#readelf: -S --wide
#name: strip on uncompressed debug sections
-There are 6 section headers, starting at offset 0x7c:
+There are 5 section headers, starting at offset 0x78:
Section Headers:
\[Nr\] Name Type Addr Off Size ES Flg Lk Inf Al
\[ 0\] NULL 00000000 000000 000000 00 0 0 0
\[ 1\] .text PROGBITS 00000000 000040 00001b 00 AX 0 0 16
- \[ 2\] .rel.text REL 00000000 00016c 000000 08 0 1 4
- \[ 3\] .data PROGBITS 00000000 00005c 000000 00 WA 0 0 4
- \[ 4\] .bss NOBITS 00000000 00005c 000000 00 WA 0 0 4
- \[ 5\] .shstrtab STRTAB 00000000 00005c 000020 00 0 0 1
+ \[ 2\] .data PROGBITS 00000000 00005c 000000 00 WA 0 0 4
+ \[ 3\] .bss NOBITS 00000000 00005c 000000 00 WA 0 0 4
+ \[ 4\] .shstrtab STRTAB 00000000 00005c 00001c 00 0 0 1
Key to Flags:
#...
diff --git a/binutils/testsuite/binutils-all/i386/compressed-1c.d b/binutils/testsuite/binutils-all/i386/compressed-1c.d
index 1e7467a169..3db18fe31c 100644
--- a/binutils/testsuite/binutils-all/i386/compressed-1c.d
+++ b/binutils/testsuite/binutils-all/i386/compressed-1c.d
@@ -5,15 +5,14 @@
#readelf: -S --wide
#name: strip on compressed debug sections
-There are 6 section headers, starting at offset 0x7c:
+There are 5 section headers, starting at offset 0x78:
Section Headers:
\[Nr\] Name Type Addr Off Size ES Flg Lk Inf Al
\[ 0\] NULL 00000000 000000 000000 00 0 0 0
\[ 1\] .text PROGBITS 00000000 000040 00001b 00 AX 0 0 16
- \[ 2\] .rel.text REL 00000000 00016c 000000 08 0 1 4
- \[ 3\] .data PROGBITS 00000000 00005c 000000 00 WA 0 0 4
- \[ 4\] .bss NOBITS 00000000 00005c 000000 00 WA 0 0 4
- \[ 5\] .shstrtab STRTAB 00000000 00005c 000020 00 0 0 1
+ \[ 2\] .data PROGBITS 00000000 00005c 000000 00 WA 0 0 4
+ \[ 3\] .bss NOBITS 00000000 00005c 000000 00 WA 0 0 4
+ \[ 4\] .shstrtab STRTAB 00000000 00005c 00001c 00 0 0 1
Key to Flags:
#...
diff --git a/binutils/testsuite/binutils-all/x86-64/compressed-1b.d b/binutils/testsuite/binutils-all/x86-64/compressed-1b.d
index 39a8f59ce6..078ccb6c6e 100644
--- a/binutils/testsuite/binutils-all/x86-64/compressed-1b.d
+++ b/binutils/testsuite/binutils-all/x86-64/compressed-1b.d
@@ -5,15 +5,14 @@
#readelf: -S --wide
#name: strip on uncompressed debug sections
-There are 6 section headers, starting at offset 0x80:
+There are 5 section headers, starting at offset 0x78:
Section Headers:
\[Nr\] Name Type Address Off Size ES Flg Lk Inf Al
\[ 0\] NULL 0000000000000000 000000 000000 00 0 0 0
\[ 1\] .text PROGBITS 0000000000000000 000040 000015 00 AX 0 0 16
- \[ 2\] .rela.text RELA 0000000000000000 000200 000000 18 0 1 8
- \[ 3\] .data PROGBITS 0000000000000000 000058 000000 00 WA 0 0 4
- \[ 4\] .bss NOBITS 0000000000000000 000058 000000 00 WA 0 0 4
- \[ 5\] .shstrtab STRTAB 0000000000000000 000058 000021 00 0 0 1
+ \[ 2\] .data PROGBITS 0000000000000000 000058 000000 00 WA 0 0 4
+ \[ 3\] .bss NOBITS 0000000000000000 000058 000000 00 WA 0 0 4
+ \[ 4\] .shstrtab STRTAB 0000000000000000 000058 00001c 00 0 0 1
Key to Flags:
#...
diff --git a/binutils/testsuite/binutils-all/x86-64/compressed-1c.d b/binutils/testsuite/binutils-all/x86-64/compressed-1c.d
index 33adfc10cf..90a3c2d7ff 100644
--- a/binutils/testsuite/binutils-all/x86-64/compressed-1c.d
+++ b/binutils/testsuite/binutils-all/x86-64/compressed-1c.d
@@ -5,15 +5,14 @@
#readelf: -S --wide
#name: strip on compressed debug sections
-There are 6 section headers, starting at offset 0x80:
+There are 5 section headers, starting at offset 0x78:
Section Headers:
\[Nr\] Name Type Address Off Size ES Flg Lk Inf Al
\[ 0\] NULL 0000000000000000 000000 000000 00 0 0 0
\[ 1\] .text PROGBITS 0000000000000000 000040 000015 00 AX 0 0 16
- \[ 2\] .rela.text RELA 0000000000000000 000200 000000 18 0 1 8
- \[ 3\] .data PROGBITS 0000000000000000 000058 000000 00 WA 0 0 4
- \[ 4\] .bss NOBITS 0000000000000000 000058 000000 00 WA 0 0 4
- \[ 5\] .shstrtab STRTAB 0000000000000000 000058 000021 00 0 0 1
+ \[ 2\] .data PROGBITS 0000000000000000 000058 000000 00 WA 0 0 4
+ \[ 3\] .bss NOBITS 0000000000000000 000058 000000 00 WA 0 0 4
+ \[ 4\] .shstrtab STRTAB 0000000000000000 000058 00001c 00 0 0 1
Key to Flags:
#...