mips hi16/lo16 reloc handling
Alan Modra
amodra@gmail.com
Tue Dec 19 09:35:44 GMT 2023
In May this year I posted a patch to move the list of hi16 relocs from
per-file data to per-section data, where it makes more sense and is
not vunerable to fuzzed object file attacks.
https://sourceware.org/pipermail/binutils/2023-May/127534.html and
https://sourceware.org/pipermail/binutils/2023-May/127535.html
These incorporated the results of an earlier discussion in February.
A lot was going on in May with mips, so I'm not at all surprised that
no one reviewed the patch. Or perhaps a review only went so far as
finding a segfault in gas.. That is fixed in this version. We do
need to keep struct mips_hi16 "data" field to cope with gas frags. A
lo16 reloc might apply to a different frag than the corresponding hi16
reloc. Also, some other infrastructure changes meant that the posted
patches no longer apply cleanly.
The patches have been tested by running the binutils testsuite, and
building and regression testing a current gcc cross from x86_64-linux
to mips-linux (no sim installed).
Alan Modra (2):
Move mips_hi16_list to mips_elf_section_data
coff-mips refhi list
bfd/coff-alpha.c | 6 +-
bfd/coff-mips.c | 121 +++++++++++-----------------
bfd/ecoff.c | 34 ++++++--
bfd/elfxx-mips.c | 206 ++++++++++++++++++++++++-----------------------
bfd/libecoff.h | 30 +++----
5 files changed, 201 insertions(+), 196 deletions(-)
More information about the Binutils
mailing list