public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* mips hi16/lo16 reloc handling
@ 2023-12-19  9:35 Alan Modra
  2023-12-19  9:35 ` Move mips_hi16_list to mips_elf_section_data Alan Modra
  2023-12-19  9:35 ` coff-mips refhi list Alan Modra
  0 siblings, 2 replies; 3+ messages in thread
From: Alan Modra @ 2023-12-19  9:35 UTC (permalink / raw)
  To: binutils; +Cc: Maciej W . Rozycki, Chenghua Xu, Alan Modra

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(-)


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-12-19  9:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-19  9:35 mips hi16/lo16 reloc handling Alan Modra
2023-12-19  9:35 ` Move mips_hi16_list to mips_elf_section_data Alan Modra
2023-12-19  9:35 ` coff-mips refhi list Alan Modra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).