diff options
author | John Darrington <john@darrington.wattle.id.au> | 2019-01-16 14:34:50 +0100 |
---|---|---|
committer | John Darrington <john@darrington.wattle.id.au> | 2019-01-16 14:39:04 +0100 |
commit | d5dcaf1b59e77047e10a1f246095d6b21f7d9772 (patch) | |
tree | f0849cbdc103770465bd83bf4905515b0191b270 /bfd/elf32-s12z.c | |
parent | Automatic date update in version.in (diff) | |
download | binutils-gdb-d5dcaf1b59e77047e10a1f246095d6b21f7d9772.tar.gz binutils-gdb-d5dcaf1b59e77047e10a1f246095d6b21f7d9772.tar.bz2 binutils-gdb-d5dcaf1b59e77047e10a1f246095d6b21f7d9772.zip |
S12Z: Emit RELOC_S12Z_OPR instead of RELOC_EXT24 where appropriate.
When assembling instructions which involve OPR references, emit
RELOC_S12Z_OPR instead of RELOC_EXT24.
bfd/
* bfd-in2.h [BFD_RELOC_S12Z_OPR]: New reloc.
* libbfd.h: regen.
* elf32-s12z.c (eld_s12z_howto_table): R_S12Z_OPR takes non zero
source field. (md_apply_fix): Apply final fix
to BFD_RELOC_S12Z_OPR.
* reloc.c[BFD_RELOC_S12Z_OPR]: New reloc.
gas/
* config/tc-s12z.c (emit_opr): Emit BFD_RELOC_S12Z_OPR instead of
BFD_RELOC_24.
* testsuite/gas/s12z/opr-indirect-expr.d: Expect R_S12Z_OPR instead
of R_S12Z_EXT24.
Diffstat (limited to 'bfd/elf32-s12z.c')
-rw-r--r-- | bfd/elf32-s12z.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/bfd/elf32-s12z.c b/bfd/elf32-s12z.c index 57681cf8ca8..a8f9b4aae1c 100644 --- a/bfd/elf32-s12z.c +++ b/bfd/elf32-s12z.c @@ -119,7 +119,7 @@ static reloc_howto_type elf_s12z_howto_table[] = shift_addend_reloc, "R_S12Z_OPR", /* name */ FALSE, /* partial_inplace */ - 0x00000000, /* src_mask */ + 0x00ffffff, /* src_mask */ 0x00ffffff, /* dst_mask */ FALSE), /* pcrel_offset */ @@ -232,11 +232,12 @@ struct s12z_reloc_map static const struct s12z_reloc_map s12z_reloc_map[] = { - /* bfd reloc val */ /* elf reloc val */ - {BFD_RELOC_NONE, R_S12Z_NONE}, - {BFD_RELOC_32, R_S12Z_EXT32}, - {BFD_RELOC_24, R_S12Z_EXT24}, - {BFD_RELOC_16_PCREL, R_S12Z_PCREL_7_15} + /* bfd reloc val */ /* elf reloc val */ + {BFD_RELOC_NONE, R_S12Z_NONE}, + {BFD_RELOC_32, R_S12Z_EXT32}, + {BFD_RELOC_24, R_S12Z_EXT24}, + {BFD_RELOC_16_PCREL, R_S12Z_PCREL_7_15}, + {BFD_RELOC_S12Z_OPR, R_S12Z_OPR} }; static reloc_howto_type * |