aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2016-04-14 12:04:09 +0100
committerNick Clifton <nickc@redhat.com>2016-04-14 12:04:09 +0100
commit84865015459b4e9e8ac67f9b91617fbd856d5119 (patch)
tree744eddbeb143af1555bb6e24a2962536f9319c38 /gas
parent8dc483a0b6cf73204ce438f4abf2efd323d97e40 (diff)
downloadgdb-84865015459b4e9e8ac67f9b91617fbd856d5119.zip
gdb-84865015459b4e9e8ac67f9b91617fbd856d5119.tar.gz
gdb-84865015459b4e9e8ac67f9b91617fbd856d5119.tar.bz2
Fix copying Solaris binaries with objcopy.
PR target/19938 bfd * elf-bbfd.h (struct elf_backend_data): New field: elf_strtab_flags. New field: elf_backend_set_special_section_info_and_link * elfxx-target.h (elf_backend_strtab_flags): Define if not already defined. (elf_backend_set_special_section_info_and_link): Define if not already defined. (elfNN_bed): Use elf_backend_set_special_section_info_and_link and elf_backend_strtab_flags macros to initialise fields in structure. * elf.c (_bfd_elf_make_section_from_shdr): Check for SHF_STRINGS being set even if SHF_MERGE is not set. (elf_fake_sections): Likewise. (section_match): New function. Matches two ELF sections based upon fixed characteristics. (find_link): New function. Locates a section in a BFD that matches a section in a different BFD. (_bfd_elf_copy_private_bfd_data): Copy the sh_info and sh_link fields of reserved sections. (bfd_elf_compute_section_file_positions): Set the flags for the .shstrtab section based upon the elf_strtab_flags field in the elf_backend_data structure. (swap_out_syms): Likewise for the .strtab section. * elflink.c (bfd_elf_final_link): Set the flags for the .strtab section based upon the elf_strtab_flags field in the elf_backend_data structure. * elf32-i386.c (elf32_i386_set_special_info_link): New function. (elf_backend_strtab_flags): Set to SHF_STRINGS for Solaris targets. (elf_backend_set_special_section_info_and_link): Define for Solaris targets. * elf32-sparc.c: Likewise. * elf64-x86-64.c: Likewise. binutils* testsuite/binutils-all/i386/compressed-1b.d: Allow for the string sections possibly having the SHF_STRINGS flag bit set. * testsuite/binutils-all/i386/compressed-1c.d: Likewise. * testsuite/binutils-all/readelf.s: Likewise. * testsuite/binutils-all/readelf.s-64: Likewise. * testsuite/binutils-all/x86-64/compressed-1b.d: Likewise. * testsuite/binutils-all/x86-64/compressed-1c.d: Likewise. gas * testsuite/gas/i386/ilp32/x86-64-unwind.d: Allow for the string sections possibly having the SHF_STRINGS flag bit set. * testsuite/gas/i386/x86-64-unwind.d: Likewise.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog7
-rw-r--r--gas/testsuite/gas/i386/ilp32/x86-64-unwind.d4
-rw-r--r--gas/testsuite/gas/i386/x86-64-unwind.d4
3 files changed, 11 insertions, 4 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 92f3286..d1e95c5 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,10 @@
+2016-04-14 Nick Clifton <nickc@redhat.com>
+
+ PR target/19938
+ * testsuite/gas/i386/ilp32/x86-64-unwind.d: Allow for the string
+ sections possibly having the SHF_STRINGS flag bit set.
+ * testsuite/gas/i386/x86-64-unwind.d: Likewise.
+
2016-04-12 Claudiu Zissulescu <claziss@synopsys.com>
* config/tc-arc.c (mach_type_specified_p): Change type to
diff --git a/gas/testsuite/gas/i386/ilp32/x86-64-unwind.d b/gas/testsuite/gas/i386/ilp32/x86-64-unwind.d
index 0bac7a2..5cea05e 100644
--- a/gas/testsuite/gas/i386/ilp32/x86-64-unwind.d
+++ b/gas/testsuite/gas/i386/ilp32/x86-64-unwind.d
@@ -11,8 +11,8 @@ Section Headers:
\[ 2\] .data PROGBITS 00000000 000034 000000 00 WA 0 0 1
\[ 3\] .bss NOBITS 00000000 000034 000000 00 WA 0 0 1
\[ 4\] .eh_frame X86_64_UNWIND 00000000 000034 000008 00 A 0 0 1
- \[ 5\] .shstrtab STRTAB 00000000 [0-9a-f]+ 000036 00 0 0 1
+ \[ 5\] .shstrtab STRTAB 00000000 [0-9a-f]+ 000036 00 . 0 0 1
\[ 6\] .symtab SYMTAB 00000000 [0-9a-f]+ 000050 10 7 5 4
- \[ 7\] .strtab STRTAB 00000000 [0-9a-f]+ 000001 00 0 0 1
+ \[ 7\] .strtab STRTAB 00000000 [0-9a-f]+ 000001 00 . 0 0 1
Key to Flags:
#pass
diff --git a/gas/testsuite/gas/i386/x86-64-unwind.d b/gas/testsuite/gas/i386/x86-64-unwind.d
index 613760f..7a4c64c 100644
--- a/gas/testsuite/gas/i386/x86-64-unwind.d
+++ b/gas/testsuite/gas/i386/x86-64-unwind.d
@@ -17,10 +17,10 @@ Section Headers:
\[ 4\] \.eh_frame X86_64_UNWIND 0000000000000000 00000040
0000000000000008 0000000000000000 A 0 0 1
\[ 5\] \.shstrtab STRTAB 0000000000000000 [0-9a-f]+
- 0000000000000036 0000000000000000 0 0 1
+ 0000000000000036 0000000000000000 . 0 0 1
\[ 6\] \.symtab SYMTAB 0000000000000000 [0-9a-f]+
0000000000000078 0000000000000018 7 5 8
\[ 7\] \.strtab STRTAB 0000000000000000 [0-9a-f]+
- 0000000000000001 0000000000000000 0 0 1
+ 0000000000000001 0000000000000000 . 0 0 1
Key to Flags:
#...