This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH 0/3] Fix relocation deletion problems in SPARC and MIPS
- From: "Jose E. Marchesi" <jose dot marchesi at oracle dot com>
- To: binutils at sourceware dot org
- Date: Thu, 4 May 2017 20:08:09 +0200
- Subject: [PATCH 0/3] Fix relocation deletion problems in SPARC and MIPS
- Authentication-results: sourceware.org; auth=none
This patch serie aims to fix the problems detailed in the mailing list
post https://sourceware.org/ml/binutils/2017-04/msg00264.html.
The first patch makes it possible for BFD targets to define their own
versions of `bfd_set_reloc', and provides a default version used by
all the existing targets.
The second patch adds a specialized version of `bfd_set_reloc' for
elf64-sparc targets, that fixes the API problem described in the URL
above, and also the regression in the merge-notes objcopy test.
The third patch adds a similar hack to elf64-mips targets. Note that
in this case it was needed to add a new field to the
`_mips_elf_section-data' and use a similar hack than in sparc64. This
is because the assembler adds single relocations using `bfd_set_reloc'
and thus dividing the number by 3 and setting it to `sec->reloc_count'
wouldn't work.
It would be good if a MIPS maintainer looks at this last patch, as my
MIPS knowledge is rudimentary to say the best :D
Salud!
Jose E. Marchesi (3):
bfd: new BFD target entry point _bfd_set_reloc.
bfd: fix the deletion of relocs in sparc64
bfd: fix the deletion of relocs in mips64
bfd/ChangeLog | 41 +++++++++++++++++++++++++++++++++++++++++
bfd/aout-target.h | 3 +++
bfd/aout-tic30.c | 3 +++
bfd/bfd-in2.h | 3 +++
bfd/bfd.c | 5 ++---
bfd/coff-rs6000.c | 1 +
bfd/coffcode.h | 4 ++++
bfd/elf64-mips.c | 45 ++++++++++++++++++++++++++++++++-------------
bfd/elf64-sparc.c | 24 +++++++++++++++++++-----
bfd/elfxx-mips.c | 12 ------------
bfd/elfxx-mips.h | 16 ++++++++++++++++
bfd/elfxx-target.h | 3 +++
bfd/i386msdos.c | 1 +
bfd/libbfd-in.h | 2 ++
bfd/libbfd.c | 9 +++++++++
bfd/libbfd.h | 8 ++++++++
bfd/nlm-target.h | 1 +
bfd/reloc.c | 26 ++++++++++++++++++++++++++
bfd/targets.c | 3 +++
binutils/ChangeLog | 5 +++++
binutils/objcopy.c | 7 -------
21 files changed, 182 insertions(+), 40 deletions(-)
--
2.3.4