From 9cc0123fea25379a1d57b700c078c7a9d0992f61 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Thu, 23 Jun 2016 22:11:57 +0930 Subject: 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. --- bfd/ChangeLog | 5 +++++ bfd/config.bfd | 8 ++------ 2 files changed, 7 insertions(+), 6 deletions(-) (limited to 'bfd') diff --git a/bfd/ChangeLog b/bfd/ChangeLog index fe19a01..63f92cf 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2016-06-24 Alan Modra + + * config.bfd: Delete mips vxworks patterns matched earlier. + Combine mips*-*-none with mips*-*-elf*. + 2016-06-21 Maciej W. Rozycki * elfxx-mips.c (mips_elf_perform_relocation): Call 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" ;; -- cgit v1.1