aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-ppc.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2022-06-07 22:43:20 +0930
committerAlan Modra <amodra@gmail.com>2022-06-08 21:33:00 +0930
commitc94cb026628b831ef63e3455a66328749ff8a415 (patch)
tree57ee202b558b82c12ea74e0621928d80008f160d /bfd/elf32-ppc.c
parent3418a349c624257d6a47a299901b9e996469acba (diff)
downloadgdb-c94cb026628b831ef63e3455a66328749ff8a415.zip
gdb-c94cb026628b831ef63e3455a66328749ff8a415.tar.gz
gdb-c94cb026628b831ef63e3455a66328749ff8a415.tar.bz2
HOWTO size encoding
This changes the HOWTO macro to encode the howto.size field from a value given in bytes. This of course requires editing all target uses of HOWTO, a major pain, but makes it a little nicer to specify new target HOWTOs. Object files before/after this patch are unchanged in .data and .rodata. bfd/ * reloc.c (HOWTO_RSIZE): Encode size in bytes. (EMPTY_HOWTO): Adjust to keep it all zero. * aout-ns32k.c, * aoutx.h, * coff-alpha.c, * coff-arm.c, * coff-i386.c, * coff-mcore.c, * coff-mips.c, * coff-rs6000.c, * coff-sh.c, * coff-tic30.c, * coff-tic4x.c, * coff-tic54x.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-bfin.c, * elf32-cr16.c, * elf32-cris.c, * elf32-crx.c, * elf32-csky.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-gen.c, * elf32-h8300.c, * elf32-i386.c, * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s12z.c, * elf32-s390.c, * elf32-score.c, * elf32-score7.c, * elf32-sh-relocs.h, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c, * elf32-visium.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xstormy16.c, * elf32-xtensa.c, * elf32-z80.c, * elf64-alpha.c, * elf64-bpf.c, * elf64-gen.c, * elf64-mips.c, * elf64-mmix.c, * elf64-nfp.c, * elf64-ppc.c, * elf64-s390.c, * elf64-x86-64.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfxx-ia64.c, * elfxx-loongarch.c, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-x86-64.c, * pdp11.c, * reloc.c, * som.c, * vms-alpha.c: Adjust all uses of HOWTO. * bfd-in2.h: Regenerate. include/ * elf/arc-reloc.def: Adjust all uses of HOWTO.
Diffstat (limited to 'bfd/elf32-ppc.c')
-rw-r--r--bfd/elf32-ppc.c214
1 files changed, 107 insertions, 107 deletions
diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c
index 6dbb690..290d231 100644
--- a/bfd/elf32-ppc.c
+++ b/bfd/elf32-ppc.c
@@ -206,95 +206,95 @@ static reloc_howto_type *ppc_elf_howto_table[R_PPC_max];
static reloc_howto_type ppc_elf_howto_raw[] = {
/* This reloc does nothing. */
- HOW (R_PPC_NONE, 3, 0, 0, 0, false, dont,
+ HOW (R_PPC_NONE, 0, 0, 0, 0, false, dont,
bfd_elf_generic_reloc),
/* A standard 32 bit relocation. */
- HOW (R_PPC_ADDR32, 2, 32, 0xffffffff, 0, false, dont,
+ HOW (R_PPC_ADDR32, 4, 32, 0xffffffff, 0, false, dont,
bfd_elf_generic_reloc),
/* An absolute 26 bit branch; the lower two bits must be zero.
FIXME: we don't check that, we just clear them. */
- HOW (R_PPC_ADDR24, 2, 26, 0x3fffffc, 0, false, signed,
+ HOW (R_PPC_ADDR24, 4, 26, 0x3fffffc, 0, false, signed,
bfd_elf_generic_reloc),
/* A standard 16 bit relocation. */
- HOW (R_PPC_ADDR16, 1, 16, 0xffff, 0, false, bitfield,
+ HOW (R_PPC_ADDR16, 2, 16, 0xffff, 0, false, bitfield,
bfd_elf_generic_reloc),
/* A 16 bit relocation without overflow. */
- HOW (R_PPC_ADDR16_LO, 1, 16, 0xffff, 0, false, dont,
+ HOW (R_PPC_ADDR16_LO, 2, 16, 0xffff, 0, false, dont,
bfd_elf_generic_reloc),
/* The high order 16 bits of an address. */
- HOW (R_PPC_ADDR16_HI, 1, 16, 0xffff, 16, false, dont,
+ HOW (R_PPC_ADDR16_HI, 2, 16, 0xffff, 16, false, dont,
bfd_elf_generic_reloc),
/* The high order 16 bits of an address, plus 1 if the contents of
the low 16 bits, treated as a signed number, is negative. */
- HOW (R_PPC_ADDR16_HA, 1, 16, 0xffff, 16, false, dont,
+ HOW (R_PPC_ADDR16_HA, 2, 16, 0xffff, 16, false, dont,
ppc_elf_addr16_ha_reloc),
/* An absolute 16 bit branch; the lower two bits must be zero.
FIXME: we don't check that, we just clear them. */
- HOW (R_PPC_ADDR14, 2, 16, 0xfffc, 0, false, signed,
+ HOW (R_PPC_ADDR14, 4, 16, 0xfffc, 0, false, signed,
bfd_elf_generic_reloc),
/* An absolute 16 bit branch, for which bit 10 should be set to
indicate that the branch is expected to be taken. The lower two
bits must be zero. */
- HOW (R_PPC_ADDR14_BRTAKEN, 2, 16, 0xfffc, 0, false, signed,
+ HOW (R_PPC_ADDR14_BRTAKEN, 4, 16, 0xfffc, 0, false, signed,
bfd_elf_generic_reloc),
/* An absolute 16 bit branch, for which bit 10 should be set to
indicate that the branch is not expected to be taken. The lower
two bits must be zero. */
- HOW (R_PPC_ADDR14_BRNTAKEN, 2, 16, 0xfffc, 0, false, signed,
+ HOW (R_PPC_ADDR14_BRNTAKEN, 4, 16, 0xfffc, 0, false, signed,
bfd_elf_generic_reloc),
/* A relative 26 bit branch; the lower two bits must be zero. */
- HOW (R_PPC_REL24, 2, 26, 0x3fffffc, 0, true, signed,
+ HOW (R_PPC_REL24, 4, 26, 0x3fffffc, 0, true, signed,
bfd_elf_generic_reloc),
/* A relative 16 bit branch; the lower two bits must be zero. */
- HOW (R_PPC_REL14, 2, 16, 0xfffc, 0, true, signed,
+ HOW (R_PPC_REL14, 4, 16, 0xfffc, 0, true, signed,
bfd_elf_generic_reloc),
/* A relative 16 bit branch. Bit 10 should be set to indicate that
the branch is expected to be taken. The lower two bits must be
zero. */
- HOW (R_PPC_REL14_BRTAKEN, 2, 16, 0xfffc, 0, true, signed,
+ HOW (R_PPC_REL14_BRTAKEN, 4, 16, 0xfffc, 0, true, signed,
bfd_elf_generic_reloc),
/* A relative 16 bit branch. Bit 10 should be set to indicate that
the branch is not expected to be taken. The lower two bits must
be zero. */
- HOW (R_PPC_REL14_BRNTAKEN, 2, 16, 0xfffc, 0, true, signed,
+ HOW (R_PPC_REL14_BRNTAKEN, 4, 16, 0xfffc, 0, true, signed,
bfd_elf_generic_reloc),
/* Like R_PPC_ADDR16, but referring to the GOT table entry for the
symbol. */
- HOW (R_PPC_GOT16, 1, 16, 0xffff, 0, false, signed,
+ HOW (R_PPC_GOT16, 2, 16, 0xffff, 0, false, signed,
ppc_elf_unhandled_reloc),
/* Like R_PPC_ADDR16_LO, but referring to the GOT table entry for
the symbol. */
- HOW (R_PPC_GOT16_LO, 1, 16, 0xffff, 0, false, dont,
+ HOW (R_PPC_GOT16_LO, 2, 16, 0xffff, 0, false, dont,
ppc_elf_unhandled_reloc),
/* Like R_PPC_ADDR16_HI, but referring to the GOT table entry for
the symbol. */
- HOW (R_PPC_GOT16_HI, 1, 16, 0xffff, 16, false, dont,
+ HOW (R_PPC_GOT16_HI, 2, 16, 0xffff, 16, false, dont,
ppc_elf_unhandled_reloc),
/* Like R_PPC_ADDR16_HA, but referring to the GOT table entry for
the symbol. */
- HOW (R_PPC_GOT16_HA, 1, 16, 0xffff, 16, false, dont,
+ HOW (R_PPC_GOT16_HA, 2, 16, 0xffff, 16, false, dont,
ppc_elf_unhandled_reloc),
/* Like R_PPC_REL24, but referring to the procedure linkage table
entry for the symbol. */
- HOW (R_PPC_PLTREL24, 2, 26, 0x3fffffc, 0, true, signed,
+ HOW (R_PPC_PLTREL24, 4, 26, 0x3fffffc, 0, true, signed,
ppc_elf_unhandled_reloc),
/* This is used only by the dynamic linker. The symbol should exist
@@ -302,269 +302,269 @@ static reloc_howto_type ppc_elf_howto_raw[] = {
dynamic linker copies the data addressed by the symbol from the
shared library into the object, because the object being
run has to have the data at some particular address. */
- HOW (R_PPC_COPY, 2, 32, 0, 0, false, dont,
+ HOW (R_PPC_COPY, 4, 32, 0, 0, false, dont,
ppc_elf_unhandled_reloc),
/* Like R_PPC_ADDR32, but used when setting global offset table
entries. */
- HOW (R_PPC_GLOB_DAT, 2, 32, 0xffffffff, 0, false, dont,
+ HOW (R_PPC_GLOB_DAT, 4, 32, 0xffffffff, 0, false, dont,
ppc_elf_unhandled_reloc),
/* Marks a procedure linkage table entry for a symbol. */
- HOW (R_PPC_JMP_SLOT, 2, 32, 0, 0, false, dont,
+ HOW (R_PPC_JMP_SLOT, 4, 32, 0, 0, false, dont,
ppc_elf_unhandled_reloc),
/* Used only by the dynamic linker. When the object is run, this
longword is set to the load address of the object, plus the
addend. */
- HOW (R_PPC_RELATIVE, 2, 32, 0xffffffff, 0, false, dont,
+ HOW (R_PPC_RELATIVE, 4, 32, 0xffffffff, 0, false, dont,
bfd_elf_generic_reloc),
/* Like R_PPC_REL24, but uses the value of the symbol within the
object rather than the final value. Normally used for
_GLOBAL_OFFSET_TABLE_. */
- HOW (R_PPC_LOCAL24PC, 2, 26, 0x3fffffc, 0, true, signed,
+ HOW (R_PPC_LOCAL24PC, 4, 26, 0x3fffffc, 0, true, signed,
bfd_elf_generic_reloc),
/* Like R_PPC_ADDR32, but may be unaligned. */
- HOW (R_PPC_UADDR32, 2, 32, 0xffffffff, 0, false, dont,
+ HOW (R_PPC_UADDR32, 4, 32, 0xffffffff, 0, false, dont,
bfd_elf_generic_reloc),
/* Like R_PPC_ADDR16, but may be unaligned. */
- HOW (R_PPC_UADDR16, 1, 16, 0xffff, 0, false, bitfield,
+ HOW (R_PPC_UADDR16, 2, 16, 0xffff, 0, false, bitfield,
bfd_elf_generic_reloc),
/* 32-bit PC relative */
- HOW (R_PPC_REL32, 2, 32, 0xffffffff, 0, true, dont,
+ HOW (R_PPC_REL32, 4, 32, 0xffffffff, 0, true, dont,
bfd_elf_generic_reloc),
/* 32-bit relocation to the symbol's procedure linkage table.
FIXME: not supported. */
- HOW (R_PPC_PLT32, 2, 32, 0, 0, false, dont,
+ HOW (R_PPC_PLT32, 4, 32, 0, 0, false, dont,
ppc_elf_unhandled_reloc),
/* 32-bit PC relative relocation to the symbol's procedure linkage table.
FIXME: not supported. */
- HOW (R_PPC_PLTREL32, 2, 32, 0, 0, true, dont,
+ HOW (R_PPC_PLTREL32, 4, 32, 0, 0, true, dont,
ppc_elf_unhandled_reloc),
/* Like R_PPC_ADDR16_LO, but referring to the PLT table entry for
the symbol. */
- HOW (R_PPC_PLT16_LO, 1, 16, 0xffff, 0, false, dont,
+ HOW (R_PPC_PLT16_LO, 2, 16, 0xffff, 0, false, dont,
ppc_elf_unhandled_reloc),
/* Like R_PPC_ADDR16_HI, but referring to the PLT table entry for
the symbol. */
- HOW (R_PPC_PLT16_HI, 1, 16, 0xffff, 16, false, dont,
+ HOW (R_PPC_PLT16_HI, 2, 16, 0xffff, 16, false, dont,
ppc_elf_unhandled_reloc),
/* Like R_PPC_ADDR16_HA, but referring to the PLT table entry for
the symbol. */
- HOW (R_PPC_PLT16_HA, 1, 16, 0xffff, 16, false, dont,
+ HOW (R_PPC_PLT16_HA, 2, 16, 0xffff, 16, false, dont,
ppc_elf_unhandled_reloc),
/* A sign-extended 16 bit value relative to _SDA_BASE_, for use with
small data items. */
- HOW (R_PPC_SDAREL16, 1, 16, 0xffff, 0, false, signed,
+ HOW (R_PPC_SDAREL16, 2, 16, 0xffff, 0, false, signed,
ppc_elf_unhandled_reloc),
/* 16-bit section relative relocation. */
- HOW (R_PPC_SECTOFF, 1, 16, 0xffff, 0, false, signed,
+ HOW (R_PPC_SECTOFF, 2, 16, 0xffff, 0, false, signed,
ppc_elf_unhandled_reloc),
/* 16-bit lower half section relative relocation. */
- HOW (R_PPC_SECTOFF_LO, 1, 16, 0xffff, 0, false, dont,
+ HOW (R_PPC_SECTOFF_LO, 2, 16, 0xffff, 0, false, dont,
ppc_elf_unhandled_reloc),
/* 16-bit upper half section relative relocation. */
- HOW (R_PPC_SECTOFF_HI, 1, 16, 0xffff, 16, false, dont,
+ HOW (R_PPC_SECTOFF_HI, 2, 16, 0xffff, 16, false, dont,
ppc_elf_unhandled_reloc),
/* 16-bit upper half adjusted section relative relocation. */
- HOW (R_PPC_SECTOFF_HA, 1, 16, 0xffff, 16, false, dont,
+ HOW (R_PPC_SECTOFF_HA, 2, 16, 0xffff, 16, false, dont,
ppc_elf_unhandled_reloc),
/* Marker relocs for TLS. */
- HOW (R_PPC_TLS, 2, 32, 0, 0, false, dont,
+ HOW (R_PPC_TLS, 4, 32, 0, 0, false, dont,
bfd_elf_generic_reloc),
- HOW (R_PPC_TLSGD, 2, 32, 0, 0, false, dont,
+ HOW (R_PPC_TLSGD, 4, 32, 0, 0, false, dont,
bfd_elf_generic_reloc),
- HOW (R_PPC_TLSLD, 2, 32, 0, 0, false, dont,
+ HOW (R_PPC_TLSLD, 4, 32, 0, 0, false, dont,
bfd_elf_generic_reloc),
/* Marker relocs on inline plt call instructions. */
- HOW (R_PPC_PLTSEQ, 2, 32, 0, 0, false, dont,
+ HOW (R_PPC_PLTSEQ, 4, 32, 0, 0, false, dont,
bfd_elf_generic_reloc),
- HOW (R_PPC_PLTCALL, 2, 32, 0, 0, false, dont,
+ HOW (R_PPC_PLTCALL, 4, 32, 0, 0, false, dont,
bfd_elf_generic_reloc),
/* Computes the load module index of the load module that contains the
definition of its TLS sym. */
- HOW (R_PPC_DTPMOD32, 2, 32, 0xffffffff, 0, false, dont,
+ HOW (R_PPC_DTPMOD32, 4, 32, 0xffffffff, 0, false, dont,
ppc_elf_unhandled_reloc),
/* Computes a dtv-relative displacement, the difference between the value
of sym+add and the base address of the thread-local storage block that
contains the definition of sym, minus 0x8000. */
- HOW (R_PPC_DTPREL32, 2, 32, 0xffffffff, 0, false, dont,
+ HOW (R_PPC_DTPREL32, 4, 32, 0xffffffff, 0, false, dont,
ppc_elf_unhandled_reloc),
/* A 16 bit dtprel reloc. */
- HOW (R_PPC_DTPREL16, 1, 16, 0xffff, 0, false, signed,
+ HOW (R_PPC_DTPREL16, 2, 16, 0xffff, 0, false, signed,
ppc_elf_unhandled_reloc),
/* Like DTPREL16, but no overflow. */
- HOW (R_PPC_DTPREL16_LO, 1, 16, 0xffff, 0, false, dont,
+ HOW (R_PPC_DTPREL16_LO, 2, 16, 0xffff, 0, false, dont,
ppc_elf_unhandled_reloc),
/* Like DTPREL16_LO, but next higher group of 16 bits. */
- HOW (R_PPC_DTPREL16_HI, 1, 16, 0xffff, 16, false, dont,
+ HOW (R_PPC_DTPREL16_HI, 2, 16, 0xffff, 16, false, dont,
ppc_elf_unhandled_reloc),
/* Like DTPREL16_HI, but adjust for low 16 bits. */
- HOW (R_PPC_DTPREL16_HA, 1, 16, 0xffff, 16, false, dont,
+ HOW (R_PPC_DTPREL16_HA, 2, 16, 0xffff, 16, false, dont,
ppc_elf_unhandled_reloc),
/* Computes a tp-relative displacement, the difference between the value of
sym+add and the value of the thread pointer (r13). */
- HOW (R_PPC_TPREL32, 2, 32, 0xffffffff, 0, false, dont,
+ HOW (R_PPC_TPREL32, 4, 32, 0xffffffff, 0, false, dont,
ppc_elf_unhandled_reloc),
/* A 16 bit tprel reloc. */
- HOW (R_PPC_TPREL16, 1, 16, 0xffff, 0, false, signed,
+ HOW (R_PPC_TPREL16, 2, 16, 0xffff, 0, false, signed,
ppc_elf_unhandled_reloc),
/* Like TPREL16, but no overflow. */
- HOW (R_PPC_TPREL16_LO, 1, 16, 0xffff, 0, false, dont,
+ HOW (R_PPC_TPREL16_LO, 2, 16, 0xffff, 0, false, dont,
ppc_elf_unhandled_reloc),
/* Like TPREL16_LO, but next higher group of 16 bits. */
- HOW (R_PPC_TPREL16_HI, 1, 16, 0xffff, 16, false, dont,
+ HOW (R_PPC_TPREL16_HI, 2, 16, 0xffff, 16, false, dont,
ppc_elf_unhandled_reloc),
/* Like TPREL16_HI, but adjust for low 16 bits. */
- HOW (R_PPC_TPREL16_HA, 1, 16, 0xffff, 16, false, dont,
+ HOW (R_PPC_TPREL16_HA, 2, 16, 0xffff, 16, false, dont,
ppc_elf_unhandled_reloc),
/* Allocates two contiguous entries in the GOT to hold a tls_index structure,
with values (sym+add)@dtpmod and (sym+add)@dtprel, and computes the offset
to the first entry. */
- HOW (R_PPC_GOT_TLSGD16, 1, 16, 0xffff, 0, false, signed,
+ HOW (R_PPC_GOT_TLSGD16, 2, 16, 0xffff, 0, false, signed,
ppc_elf_unhandled_reloc),
/* Like GOT_TLSGD16, but no overflow. */
- HOW (R_PPC_GOT_TLSGD16_LO, 1, 16, 0xffff, 0, false, dont,
+ HOW (R_PPC_GOT_TLSGD16_LO, 2, 16, 0xffff, 0, false, dont,
ppc_elf_unhandled_reloc),
/* Like GOT_TLSGD16_LO, but next higher group of 16 bits. */
- HOW (R_PPC_GOT_TLSGD16_HI, 1, 16, 0xffff, 16, false, dont,
+ HOW (R_PPC_GOT_TLSGD16_HI, 2, 16, 0xffff, 16, false, dont,
ppc_elf_unhandled_reloc),
/* Like GOT_TLSGD16_HI, but adjust for low 16 bits. */
- HOW (R_PPC_GOT_TLSGD16_HA, 1, 16, 0xffff, 16, false, dont,
+ HOW (R_PPC_GOT_TLSGD16_HA, 2, 16, 0xffff, 16, false, dont,
ppc_elf_unhandled_reloc),
/* Allocates two contiguous entries in the GOT to hold a tls_index structure,
with values (sym+add)@dtpmod and zero, and computes the offset to the
first entry. */
- HOW (R_PPC_GOT_TLSLD16, 1, 16, 0xffff, 0, false, signed,
+ HOW (R_PPC_GOT_TLSLD16, 2, 16, 0xffff, 0, false, signed,
ppc_elf_unhandled_reloc),
/* Like GOT_TLSLD16, but no overflow. */
- HOW (R_PPC_GOT_TLSLD16_LO, 1, 16, 0xffff, 0, false, dont,
+ HOW (R_PPC_GOT_TLSLD16_LO, 2, 16, 0xffff, 0, false, dont,
ppc_elf_unhandled_reloc),
/* Like GOT_TLSLD16_LO, but next higher group of 16 bits. */
- HOW (R_PPC_GOT_TLSLD16_HI, 1, 16, 0xffff, 16, false, dont,
+ HOW (R_PPC_GOT_TLSLD16_HI, 2, 16, 0xffff, 16, false, dont,
ppc_elf_unhandled_reloc),
/* Like GOT_TLSLD16_HI, but adjust for low 16 bits. */
- HOW (R_PPC_GOT_TLSLD16_HA, 1, 16, 0xffff, 16, false, dont,
+ HOW (R_PPC_GOT_TLSLD16_HA, 2, 16, 0xffff, 16, false, dont,
ppc_elf_unhandled_reloc),
/* Allocates an entry in the GOT with value (sym+add)@dtprel, and computes
the offset to the entry. */
- HOW (R_PPC_GOT_DTPREL16, 1, 16, 0xffff, 0, false, signed,
+ HOW (R_PPC_GOT_DTPREL16, 2, 16, 0xffff, 0, false, signed,
ppc_elf_unhandled_reloc),
/* Like GOT_DTPREL16, but no overflow. */
- HOW (R_PPC_GOT_DTPREL16_LO, 1, 16, 0xffff, 0, false, dont,
+ HOW (R_PPC_GOT_DTPREL16_LO, 2, 16, 0xffff, 0, false, dont,
ppc_elf_unhandled_reloc),
/* Like GOT_DTPREL16_LO, but next higher group of 16 bits. */
- HOW (R_PPC_GOT_DTPREL16_HI, 1, 16, 0xffff, 16, false, dont,
+ HOW (R_PPC_GOT_DTPREL16_HI, 2, 16, 0xffff, 16, false, dont,
ppc_elf_unhandled_reloc),
/* Like GOT_DTPREL16_HI, but adjust for low 16 bits. */
- HOW (R_PPC_GOT_DTPREL16_HA, 1, 16, 0xffff, 16, false, dont,
+ HOW (R_PPC_GOT_DTPREL16_HA, 2, 16, 0xffff, 16, false, dont,
ppc_elf_unhandled_reloc),
/* Allocates an entry in the GOT with value (sym+add)@tprel, and computes the
offset to the entry. */
- HOW (R_PPC_GOT_TPREL16, 1, 16, 0xffff, 0, false, signed,
+ HOW (R_PPC_GOT_TPREL16, 2, 16, 0xffff, 0, false, signed,
ppc_elf_unhandled_reloc),
/* Like GOT_TPREL16, but no overflow. */
- HOW (R_PPC_GOT_TPREL16_LO, 1, 16, 0xffff, 0, false, dont,
+ HOW (R_PPC_GOT_TPREL16_LO, 2, 16, 0xffff, 0, false, dont,
ppc_elf_unhandled_reloc),
/* Like GOT_TPREL16_LO, but next higher group of 16 bits. */
- HOW (R_PPC_GOT_TPREL16_HI, 1, 16, 0xffff, 16, false, dont,
+ HOW (R_PPC_GOT_TPREL16_HI, 2, 16, 0xffff, 16, false, dont,
ppc_elf_unhandled_reloc),
/* Like GOT_TPREL16_HI, but adjust for low 16 bits. */
- HOW (R_PPC_GOT_TPREL16_HA, 1, 16, 0xffff, 16, false, dont,
+ HOW (R_PPC_GOT_TPREL16_HA, 2, 16, 0xffff, 16, false, dont,
ppc_elf_unhandled_reloc),
/* The remaining relocs are from the Embedded ELF ABI, and are not
in the SVR4 ELF ABI. */
/* 32 bit value resulting from the addend minus the symbol. */
- HOW (R_PPC_EMB_NADDR32, 2, 32, 0xffffffff, 0, false, dont,
+ HOW (R_PPC_EMB_NADDR32, 4, 32, 0xffffffff, 0, false, dont,
ppc_elf_unhandled_reloc),
/* 16 bit value resulting from the addend minus the symbol. */
- HOW (R_PPC_EMB_NADDR16, 1, 16, 0xffff, 0, false, signed,
+ HOW (R_PPC_EMB_NADDR16, 2, 16, 0xffff, 0, false, signed,
ppc_elf_unhandled_reloc),
/* 16 bit value resulting from the addend minus the symbol. */
- HOW (R_PPC_EMB_NADDR16_LO, 1, 16, 0xffff, 0, false, dont,
+ HOW (R_PPC_EMB_NADDR16_LO, 2, 16, 0xffff, 0, false, dont,
ppc_elf_unhandled_reloc),
/* The high order 16 bits of the addend minus the symbol. */
- HOW (R_PPC_EMB_NADDR16_HI, 1, 16, 0xffff, 16, false, dont,
+ HOW (R_PPC_EMB_NADDR16_HI, 2, 16, 0xffff, 16, false, dont,
ppc_elf_unhandled_reloc),
/* The high order 16 bits of the result of the addend minus the address,
plus 1 if the contents of the low 16 bits, treated as a signed number,
is negative. */
- HOW (R_PPC_EMB_NADDR16_HA, 1, 16, 0xffff, 16, false, dont,
+ HOW (R_PPC_EMB_NADDR16_HA, 2, 16, 0xffff, 16, false, dont,
ppc_elf_unhandled_reloc),
/* 16 bit value resulting from allocating a 4 byte word to hold an
address in the .sdata section, and returning the offset from
_SDA_BASE_ for that relocation. */
- HOW (R_PPC_EMB_SDAI16, 1, 16, 0xffff, 0, false, signed,
+ HOW (R_PPC_EMB_SDAI16, 2, 16, 0xffff, 0, false, signed,
ppc_elf_unhandled_reloc),
/* 16 bit value resulting from allocating a 4 byte word to hold an
address in the .sdata2 section, and returning the offset from
_SDA2_BASE_ for that relocation. */
- HOW (R_PPC_EMB_SDA2I16, 1, 16, 0xffff, 0, false, signed,
+ HOW (R_PPC_EMB_SDA2I16, 2, 16, 0xffff, 0, false, signed,
ppc_elf_unhandled_reloc),
/* A sign-extended 16 bit value relative to _SDA2_BASE_, for use with
small data items. */
- HOW (R_PPC_EMB_SDA2REL, 1, 16, 0xffff, 0, false, signed,
+ HOW (R_PPC_EMB_SDA2REL, 2, 16, 0xffff, 0, false, signed,
ppc_elf_unhandled_reloc),
/* Relocate against either _SDA_BASE_ or _SDA2_BASE_, filling in the 16 bit
signed offset from the appropriate base, and filling in the register
field with the appropriate register (0, 2, or 13). */
- HOW (R_PPC_EMB_SDA21, 2, 16, 0xffff, 0, false, signed,
+ HOW (R_PPC_EMB_SDA21, 4, 16, 0xffff, 0, false, signed,
ppc_elf_unhandled_reloc),
/* Relocation not handled: R_PPC_EMB_MRKREF */
@@ -577,121 +577,121 @@ static reloc_howto_type ppc_elf_howto_raw[] = {
/* PC relative relocation against either _SDA_BASE_ or _SDA2_BASE_, filling
in the 16 bit signed offset from the appropriate base, and filling in the
register field with the appropriate register (0, 2, or 13). */
- HOW (R_PPC_EMB_RELSDA, 1, 16, 0xffff, 0, false, signed,
+ HOW (R_PPC_EMB_RELSDA, 2, 16, 0xffff, 0, false, signed,
ppc_elf_unhandled_reloc),
/* A relative 8 bit branch. */
- HOW (R_PPC_VLE_REL8, 1, 8, 0xff, 1, true, signed,
+ HOW (R_PPC_VLE_REL8, 2, 8, 0xff, 1, true, signed,
bfd_elf_generic_reloc),
/* A relative 15 bit branch. */
- HOW (R_PPC_VLE_REL15, 2, 16, 0xfffe, 0, true, signed,
+ HOW (R_PPC_VLE_REL15, 4, 16, 0xfffe, 0, true, signed,
bfd_elf_generic_reloc),
/* A relative 24 bit branch. */
- HOW (R_PPC_VLE_REL24, 2, 25, 0x1fffffe, 0, true, signed,
+ HOW (R_PPC_VLE_REL24, 4, 25, 0x1fffffe, 0, true, signed,
bfd_elf_generic_reloc),
/* The 16 LSBS in split16a format. */
- HOW (R_PPC_VLE_LO16A, 2, 16, 0x1f07ff, 0, false, dont,
+ HOW (R_PPC_VLE_LO16A, 4, 16, 0x1f07ff, 0, false, dont,
ppc_elf_unhandled_reloc),
/* The 16 LSBS in split16d format. */
- HOW (R_PPC_VLE_LO16D, 2, 16, 0x3e007ff, 0, false, dont,
+ HOW (R_PPC_VLE_LO16D, 4, 16, 0x3e007ff, 0, false, dont,
ppc_elf_unhandled_reloc),
/* Bits 16-31 split16a format. */
- HOW (R_PPC_VLE_HI16A, 2, 16, 0x1f07ff, 16, false, dont,
+ HOW (R_PPC_VLE_HI16A, 4, 16, 0x1f07ff, 16, false, dont,
ppc_elf_unhandled_reloc),
/* Bits 16-31 split16d format. */
- HOW (R_PPC_VLE_HI16D, 2, 16, 0x3e007ff, 16, false, dont,
+ HOW (R_PPC_VLE_HI16D, 4, 16, 0x3e007ff, 16, false, dont,
ppc_elf_unhandled_reloc),
/* Bits 16-31 (High Adjusted) in split16a format. */
- HOW (R_PPC_VLE_HA16A, 2, 16, 0x1f07ff, 16, false, dont,
+ HOW (R_PPC_VLE_HA16A, 4, 16, 0x1f07ff, 16, false, dont,
ppc_elf_unhandled_reloc),
/* Bits 16-31 (High Adjusted) in split16d format. */
- HOW (R_PPC_VLE_HA16D, 2, 16, 0x3e007ff, 16, false, dont,
+ HOW (R_PPC_VLE_HA16D, 4, 16, 0x3e007ff, 16, false, dont,
ppc_elf_unhandled_reloc),
/* This reloc is like R_PPC_EMB_SDA21 but only applies to e_add16i
instructions. If the register base is 0 then the linker changes
the e_add16i to an e_li instruction. */
- HOW (R_PPC_VLE_SDA21, 2, 16, 0xffff, 0, false, signed,
+ HOW (R_PPC_VLE_SDA21, 4, 16, 0xffff, 0, false, signed,
ppc_elf_unhandled_reloc),
/* Like R_PPC_VLE_SDA21 but ignore overflow. */
- HOW (R_PPC_VLE_SDA21_LO, 2, 16, 0xffff, 0, false, dont,
+ HOW (R_PPC_VLE_SDA21_LO, 4, 16, 0xffff, 0, false, dont,
ppc_elf_unhandled_reloc),
/* The 16 LSBS relative to _SDA_BASE_ in split16a format. */
- HOW (R_PPC_VLE_SDAREL_LO16A, 2, 16, 0x1f07ff, 0, false, dont,
+ HOW (R_PPC_VLE_SDAREL_LO16A, 4, 16, 0x1f07ff, 0, false, dont,
ppc_elf_unhandled_reloc),
/* The 16 LSBS relative to _SDA_BASE_ in split16d format. */
- HOW (R_PPC_VLE_SDAREL_LO16D, 2, 16, 0x3e007ff, 0, false, dont,
+ HOW (R_PPC_VLE_SDAREL_LO16D, 4, 16, 0x3e007ff, 0, false, dont,
ppc_elf_unhandled_reloc),
/* Bits 16-31 relative to _SDA_BASE_ in split16a format. */
- HOW (R_PPC_VLE_SDAREL_HI16A, 2, 16, 0x1f07ff, 16, false, dont,
+ HOW (R_PPC_VLE_SDAREL_HI16A, 4, 16, 0x1f07ff, 16, false, dont,
ppc_elf_unhandled_reloc),
/* Bits 16-31 relative to _SDA_BASE_ in split16d format. */
- HOW (R_PPC_VLE_SDAREL_HI16D, 2, 16, 0x3e007ff, 16, false, dont,
+ HOW (R_PPC_VLE_SDAREL_HI16D, 4, 16, 0x3e007ff, 16, false, dont,
ppc_elf_unhandled_reloc),
/* Bits 16-31 (HA) relative to _SDA_BASE split16a format. */
- HOW (R_PPC_VLE_SDAREL_HA16A, 2, 16, 0x1f07ff, 16, false, dont,
+ HOW (R_PPC_VLE_SDAREL_HA16A, 4, 16, 0x1f07ff, 16, false, dont,
ppc_elf_unhandled_reloc),
/* Bits 16-31 (HA) relative to _SDA_BASE split16d format. */
- HOW (R_PPC_VLE_SDAREL_HA16D, 2, 16, 0x3e007ff, 16, false, dont,
+ HOW (R_PPC_VLE_SDAREL_HA16D, 4, 16, 0x3e007ff, 16, false, dont,
ppc_elf_unhandled_reloc),
/* e_li split20 format. */
- HOW (R_PPC_VLE_ADDR20, 2, 20, 0x1f7fff, 0, false, dont,
+ HOW (R_PPC_VLE_ADDR20, 4, 20, 0x1f7fff, 0, false, dont,
ppc_elf_unhandled_reloc),
- HOW (R_PPC_IRELATIVE, 2, 32, 0xffffffff, 0, false, dont,
+ HOW (R_PPC_IRELATIVE, 4, 32, 0xffffffff, 0, false, dont,
ppc_elf_unhandled_reloc),
/* A 16 bit relative relocation. */
- HOW (R_PPC_REL16, 1, 16, 0xffff, 0, true, signed,
+ HOW (R_PPC_REL16, 2, 16, 0xffff, 0, true, signed,
bfd_elf_generic_reloc),
/* A 16 bit relative relocation without overflow. */
- HOW (R_PPC_REL16_LO, 1, 16, 0xffff, 0, true, dont,
+ HOW (R_PPC_REL16_LO, 2, 16, 0xffff, 0, true, dont,
bfd_elf_generic_reloc),
/* The high order 16 bits of a relative address. */
- HOW (R_PPC_REL16_HI, 1, 16, 0xffff, 16, true, dont,
+ HOW (R_PPC_REL16_HI, 2, 16, 0xffff, 16, true, dont,
bfd_elf_generic_reloc),
/* The high order 16 bits of a relative address, plus 1 if the contents of
the low 16 bits, treated as a signed number, is negative. */
- HOW (R_PPC_REL16_HA, 1, 16, 0xffff, 16, true, dont,
+ HOW (R_PPC_REL16_HA, 2, 16, 0xffff, 16, true, dont,
ppc_elf_addr16_ha_reloc),
/* Like R_PPC_REL16_HA but for split field in addpcis. */
- HOW (R_PPC_REL16DX_HA, 2, 16, 0x1fffc1, 16, true, signed,
+ HOW (R_PPC_REL16DX_HA, 4, 16, 0x1fffc1, 16, true, signed,
ppc_elf_addr16_ha_reloc),
/* A split-field reloc for addpcis, non-relative (gas internal use only). */
- HOW (R_PPC_16DX_HA, 2, 16, 0x1fffc1, 16, false, signed,
+ HOW (R_PPC_16DX_HA, 4, 16, 0x1fffc1, 16, false, signed,
ppc_elf_addr16_ha_reloc),
/* GNU extension to record C++ vtable hierarchy. */
- HOW (R_PPC_GNU_VTINHERIT, 0, 0, 0, 0, false, dont,
+ HOW (R_PPC_GNU_VTINHERIT, 1, 0, 0, 0, false, dont,
NULL),
/* GNU extension to record C++ vtable member usage. */
- HOW (R_PPC_GNU_VTENTRY, 0, 0, 0, 0, false, dont,
+ HOW (R_PPC_GNU_VTENTRY, 1, 0, 0, 0, false, dont,
NULL),
/* Phony reloc to handle AIX style TOC entries. */
- HOW (R_PPC_TOC16, 1, 16, 0xffff, 0, false, signed,
+ HOW (R_PPC_TOC16, 2, 16, 0xffff, 0, false, signed,
ppc_elf_unhandled_reloc),
};