From db84b98a160d20f30dbdae3e3405cfb0fa680fbd Mon Sep 17 00:00:00 2001 From: "Jose E. Marchesi" Date: Wed, 10 May 2017 18:44:19 +0200 Subject: bfd: fix the deletion of relocs in sparc64 This patch fixes the deletion of relocations in BFD sections in sparc64 targets. A specialized `_bfd_set_reloc' function is provided that updates the internal canon_reloc_count(sec) counter instead of sec->reloc_count. Additionally, the `write_relocs' callback in elf64-sparc is adapted to use the canon_reloc_count to traverse `sec->orelocation'. Tested in sparc64-linux-gnu targets. Fixes an existing failure in the merge-notes objcopy test. No regressions. bfd/ChangeLog: 2017-05-10 Jose E. Marchesi * elf64-sparc.c (elf64_sparc_set_reloc): New function. (bfd_elf64_set_reloc): Define. (elf64_sparc_write_relocs): Use `canon_reloc_count'. --- bfd/ChangeLog | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'bfd/ChangeLog') diff --git a/bfd/ChangeLog b/bfd/ChangeLog index e9095b1..713614d 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,11 @@ 2017-05-10 Jose E. Marchesi + * elf64-sparc.c (elf64_sparc_set_reloc): New function. + (bfd_elf64_set_reloc): Define. + (elf64_sparc_write_relocs): Use `canon_reloc_count'. + +2017-05-10 Jose E. Marchesi + * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc. (struct bfd_target): New field _bfd_set_reloc. * bfd.c (bfd_set_reloc): Call backend _set_bfd. -- cgit v1.1