mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-24 20:28:28 +08:00
[PATCH] bfd: Fix 64-bit relocation handling for a.out
* aoutx.h (NAME (aout, swap_std_reloc_out)): Reject an unsupported relocation size.
This commit is contained in:

committed by
Nick Clifton

parent
b4991d292e
commit
533f049e00
@ -1,3 +1,8 @@
|
|||||||
|
2020-05-12 Gunther Nikl <gnikl@justmail.de>
|
||||||
|
|
||||||
|
* aoutx.h (NAME (aout, swap_std_reloc_out)): Reject an unsupported
|
||||||
|
relocation size.
|
||||||
|
|
||||||
2020-05-11 Alan Modra <amodra@gmail.com>
|
2020-05-11 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
* elf64-ppc.c (xlate_pcrel_opt): Handle lxvp and stxvp.
|
* elf64-ppc.c (xlate_pcrel_opt): Handle lxvp and stxvp.
|
||||||
|
20
bfd/aoutx.h
20
bfd/aoutx.h
@ -1946,10 +1946,22 @@ NAME (aout, swap_std_reloc_out) (bfd *abfd,
|
|||||||
|
|
||||||
BFD_ASSERT (g->howto != NULL);
|
BFD_ASSERT (g->howto != NULL);
|
||||||
|
|
||||||
if (bfd_get_reloc_size (g->howto) != 8)
|
switch (bfd_get_reloc_size (g->howto))
|
||||||
r_length = g->howto->size; /* Size as a power of two. */
|
{
|
||||||
else
|
default:
|
||||||
r_length = 3;
|
_bfd_error_handler (_("%pB: unsupported AOUT relocation size: %d"),
|
||||||
|
abfd, bfd_get_reloc_size (g->howto));
|
||||||
|
bfd_set_error (bfd_error_bad_value);
|
||||||
|
return;
|
||||||
|
case 1:
|
||||||
|
case 2:
|
||||||
|
case 4:
|
||||||
|
r_length = g->howto->size; /* Size as a power of two. */
|
||||||
|
break;
|
||||||
|
case 8:
|
||||||
|
r_length = 3;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
r_pcrel = (int) g->howto->pc_relative; /* Relative to PC? */
|
r_pcrel = (int) g->howto->pc_relative; /* Relative to PC? */
|
||||||
/* XXX This relies on relocs coming from a.out files. */
|
/* XXX This relies on relocs coming from a.out files. */
|
||||||
|
Reference in New Issue
Block a user