aboutsummaryrefslogtreecommitdiff
path: root/bfd/config.bfd
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2016-06-23 22:11:57 +0930
committerAlan Modra <amodra@gmail.com>2016-06-24 23:26:29 +0930
commit9cc0123fea25379a1d57b700c078c7a9d0992f61 (patch)
treec6c60a576c0e646e2261abc15d3c84af7d458530 /bfd/config.bfd
parent78da3bc1eeb8ed227f86154ef915635fe9047a64 (diff)
downloadgdb-9cc0123fea25379a1d57b700c078c7a9d0992f61.zip
gdb-9cc0123fea25379a1d57b700c078c7a9d0992f61.tar.gz
gdb-9cc0123fea25379a1d57b700c078c7a9d0992f61.tar.bz2
MIPS objcopy --rename-section fix
Some MIPS targets use a named section symbol rather than a symbol with no name as is used with most ELF targets. When renaming sections, the named section symbol needs to be renamed too. Rather than fix this bug, I'd originally intended to just correct the xfail added recently for update-1.o vs update4.o in update-section.exp, using the same set of targets for the localize-hidden-1 mips xfail. I'd extracted that target test into a new function, is_bad_symtab. It turns out to be useful in readelf.exp too. bfd/ * config.bfd: Delete mips vxworks patterns matched earlier. Combine mips*-*-none with mips*-*-elf*. binutils/ * objcopy.c (find_section_rename): Forward declare. Remove ibfd and sec_ptr param. Add old_name param. Allow for NULL returned_flags. Move read of section name and flags to.. (setup_section): ..here. Update find_section_rename call. (filter_symbols): Rename section symbols for renamed sections. (copy_object): Call filter_symbols when renamed sections. * testsuite/lib/binutils-common.exp (is_bad_symtab): New. * testsuite/binutils-all/update-section.exp: Revert 96037eb0 mips xfail. * testsuite/binutils-all/objcopy.exp (copy_executable): Use is_bad_symtab. (localize-hidden-1): xfail if is_bad_symtab. * testsuite/binutils-all/readelf.exp: Use is_bad_symtab to select between mips/tmips.
Diffstat (limited to 'bfd/config.bfd')
-rw-r--r--bfd/config.bfd8
1 files changed, 2 insertions, 6 deletions
diff --git a/bfd/config.bfd b/bfd/config.bfd
index 8fef9c4..b998830 100644
--- a/bfd/config.bfd
+++ b/bfd/config.bfd
@@ -1080,15 +1080,11 @@ case "${targ}" in
targ_defvec=mips_elf32_trad_be_vec
targ_selvecs="mips_elf32_trad_le_vec mips_elf32_ntrad_be_vec mips_elf32_ntrad_le_vec mips_elf64_trad_be_vec mips_elf64_trad_le_vec"
;;
- mips*el-*-elf* | mips*el-*-vxworks* | mips*-*-chorus*)
+ mips*el-*-elf* | mips*-*-chorus*)
targ_defvec=mips_elf32_le_vec
targ_selvecs="mips_elf32_be_vec mips_elf64_be_vec mips_elf64_le_vec"
;;
- mips*-*-elf* | mips*-*-rtems* | mips*-*-vxworks | mips*-*-windiss)
- targ_defvec=mips_elf32_be_vec
- targ_selvecs="mips_elf32_le_vec mips_elf64_be_vec mips_elf64_le_vec"
- ;;
- mips*-*-none)
+ mips*-*-elf* | mips*-*-rtems* | mips*-*-windiss | mips*-*-none)
targ_defvec=mips_elf32_be_vec
targ_selvecs="mips_elf32_le_vec mips_elf64_be_vec mips_elf64_le_vec"
;;