This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH V2 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: Fri, 5 May 2017 14:10:14 +0200
- Subject: [PATCH V2 0/3] Fix relocation deletion problems in SPARC and MIPS
- Authentication-results: sourceware.org; auth=none
[Changes from previous version:
- The patch serie has now been tested by building and checking with
--enable-targets=all --enable-64-bit-bfd.
- As a result of the above, a number of missing targets have been
fixed to provide the bfd_set_reloc entry point, making the first
patch complete: coff-alpha, mach-o, vms-alpha, aout-adobe, bout,
coff-mips, i386os9k, ieee, oasys, som, versados, coff64-rs6000.
- The `bfd_set_reloc' entry point in bfd.c has been turned into
a macro.
- The comment describing the `mips_elf64_set_reloc' function has been
fixed.
- I am struggling at the moment to get the regression tester machinery
from Nick working, to run regression testing in all supported targets.
This may take some time...]
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 | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++
bfd/aout-adobe.c | 1 +
bfd/aout-target.h | 3 +++
bfd/aout-tic30.c | 3 +++
bfd/bfd-in2.h | 5 +++++
bfd/bfd.c | 12 ++----------
bfd/bout.c | 1 +
bfd/coff-alpha.c | 3 +++
bfd/coff-mips.c | 1 +
bfd/coff-rs6000.c | 1 +
bfd/coff64-rs6000.c | 2 ++
bfd/coffcode.h | 4 ++++
bfd/elf64-mips.c | 47 ++++++++++++++++++++++++++++++++-------------
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/i386os9k.c | 2 ++
bfd/ieee.c | 1 +
bfd/libbfd-in.h | 2 ++
bfd/libbfd.c | 9 +++++++++
bfd/libbfd.h | 8 ++++++++
bfd/mach-o-target.c | 1 +
bfd/nlm-target.h | 1 +
bfd/oasys.c | 1 +
bfd/reloc.c | 26 +++++++++++++++++++++++++
bfd/som.c | 1 +
bfd/targets.c | 3 +++
bfd/versados.c | 1 +
bfd/vms-alpha.c | 5 +++++
binutils/ChangeLog | 5 +++++
binutils/objcopy.c | 7 -------
33 files changed, 220 insertions(+), 47 deletions(-)
--
2.3.4