aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf64-sh64.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2014-12-26 18:26:38 +1030
committerAlan Modra <amodra@gmail.com>2014-12-26 22:19:30 +1030
commit0abb10c82d2c202e34b87104d51080b6d1de26d1 (patch)
tree4f211507a1f305f051730309e436c23f7f976006 /bfd/elf64-sh64.c
parentff600205664cc39be32910e4bf36c3de8183f93c (diff)
downloadgdb-0abb10c82d2c202e34b87104d51080b6d1de26d1.zip
gdb-0abb10c82d2c202e34b87104d51080b6d1de26d1.tar.gz
gdb-0abb10c82d2c202e34b87104d51080b6d1de26d1.tar.bz2
Delete unnecessary code copying SHF_SH5_ISA32 flag
Since 2006, commit d270463e9, _bfd_elf_copy_private_section_data has copied over SHF_MASKOS and SHF_MASKPROC flags. That makes the buggy code in sh_elf64_copy_private_data_internal redundant. bfd/ PR 17755 * elf64-sh64.c (sh_elf64_copy_private_data_internal): Delete code copying SHF_SH5_ISA32. binutils/testsuite/ * binutils-all/strip-11.d: New test. * binutils-all/objcopy.exp: Run it.
Diffstat (limited to 'bfd/elf64-sh64.c')
-rw-r--r--bfd/elf64-sh64.c21
1 files changed, 0 insertions, 21 deletions
diff --git a/bfd/elf64-sh64.c b/bfd/elf64-sh64.c
index 7497929..79cab57 100644
--- a/bfd/elf64-sh64.c
+++ b/bfd/elf64-sh64.c
@@ -2259,31 +2259,10 @@ sh_elf64_set_private_flags (bfd *abfd, flagword flags)
static bfd_boolean
sh_elf64_copy_private_data_internal (bfd *ibfd, bfd *obfd)
{
- Elf_Internal_Shdr **o_shdrp;
- asection *isec;
- asection *osec;
-
if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
|| bfd_get_flavour (obfd) != bfd_target_elf_flavour)
return TRUE;
- o_shdrp = elf_elfsections (obfd);
- for (osec = obfd->sections; osec; osec = osec->next)
- {
- int oIndex = ((struct bfd_elf_section_data *) elf_section_data (osec))->this_idx;
- for (isec = ibfd->sections; isec; isec = isec->next)
- {
- if (strcmp (osec->name, isec->name) == 0)
- {
- /* Note that we're not disallowing mixing data and code. */
- if ((elf_section_data (isec)->this_hdr.sh_flags
- & SHF_SH5_ISA32) != 0)
- o_shdrp[oIndex]->sh_flags |= SHF_SH5_ISA32;
- break;
- }
- }
- }
-
/* Copy object attributes. */
_bfd_elf_copy_private_bfd_data (ibfd, obfd);