diff options
author | Cupertino Miranda <cmiranda@synopsys.com> | 2016-06-07 10:24:37 +0200 |
---|---|---|
committer | Cupertino Miranda <cmiranda@synopsys.com> | 2016-08-26 12:09:17 +0200 |
commit | a87aa054a67e23faeead400bdf902a1eddb242a4 (patch) | |
tree | 219d95926b493b534b9af082f5fae233073bc28c /include/elf/arc-reloc.def | |
parent | 0955507f6e7144c9c5e420bbcf617593b13de38b (diff) | |
download | gdb-a87aa054a67e23faeead400bdf902a1eddb242a4.zip gdb-a87aa054a67e23faeead400bdf902a1eddb242a4.tar.gz gdb-a87aa054a67e23faeead400bdf902a1eddb242a4.tar.bz2 |
Fixes to legacy ARC relocations.
Added support for ARC_SDA_12 reloc.
Fixed ARC_N32_ME.
Added ME (middle-endian) to ARC_SDA_12 reloc.
bfd/ChangeLog:
Cupertino Miranda <cmiranda@synopsys.com>
* reloc.c: Fixed type in ARC_SECTOFF relocations. Added ARC_SDA_12
relocation.
* bfd-in2.h: Regenerated from the previous changes.
* libbfd.h: Regenerated from the previous changes.
include/ChangeLog:
Cupertino Miranda <cmiranda@synopsys.com>
* elf/arc-reloc.def: Fixed relocation formula for N*, SDA, SDA_12,
SDA_16_LD*, S13_PCREL, N32_ME, SECTOFF_* relocations.
* opcode/arc-func.h (replace_disp12s): Added. Used for SDA_12 relocation.
Diffstat (limited to 'include/elf/arc-reloc.def')
-rw-r--r-- | include/elf/arc-reloc.def | 45 |
1 files changed, 26 insertions, 19 deletions
diff --git a/include/elf/arc-reloc.def b/include/elf/arc-reloc.def index 17c2429..2d11b3f 100644 --- a/include/elf/arc-reloc.def +++ b/include/elf/arc-reloc.def @@ -69,35 +69,35 @@ ARC_RELOC_HOWTO(ARC_N8, 8, \ 8, \ replace_bits8, \ bitfield, \ - ( S - A )) + ( A - S )) ARC_RELOC_HOWTO(ARC_N16, 9, \ 1, \ 16, \ replace_bits16, \ bitfield, \ - ( S - A )) + ( A - S )) ARC_RELOC_HOWTO(ARC_N24, 10, \ 2, \ 24, \ replace_bits24, \ bitfield, \ - ( S - A )) + ( A - S )) ARC_RELOC_HOWTO(ARC_N32, 11, \ 2, \ 32, \ replace_word32, \ bitfield, \ - ( S - A )) + ( A - S )) ARC_RELOC_HOWTO(ARC_SDA, 12, \ 2, \ 9, \ replace_disp9, \ bitfield, \ - ( S + A )) + ( ME ( ( ( S + A ) - _SDA_BASE_ ) ) )) ARC_RELOC_HOWTO(ARC_SECTOFF, 13, \ 2, \ @@ -167,28 +167,28 @@ ARC_RELOC_HOWTO(ARC_SDA16_LD, 22, \ 9, \ replace_disp9s, \ signed, \ - ( ( ( S + A ) - _SDA_BASE_ ) )) + ( ( S + A ) - _SDA_BASE_ )) ARC_RELOC_HOWTO(ARC_SDA16_LD1, 23, \ 1, \ 9, \ replace_disp9s, \ signed, \ - ( ( ( ( S + A ) - _SDA_BASE_ ) >> 1 ) )) + ( ( ( S + A ) - _SDA_BASE_ ) >> 1 )) ARC_RELOC_HOWTO(ARC_SDA16_LD2, 24, \ 1, \ 9, \ replace_disp9s, \ signed, \ - ( ( ( ( S + A ) - _SDA_BASE_ ) >> 2 ) )) + ( ( ( S + A ) - _SDA_BASE_ ) >> 2 )) ARC_RELOC_HOWTO(ARC_S13_PCREL, 25, \ 1, \ 11, \ replace_disp13s, \ signed, \ - ( ( ( ( S + A ) - P ) >> 2 ) )) + ( ( ( S + A ) - P ) >> 2 )) ARC_RELOC_HOWTO(ARC_W, 26, \ 2, \ @@ -216,7 +216,7 @@ ARC_RELOC_HOWTO(ARC_N32_ME, 28, \ 32, \ replace_word32, \ bitfield, \ - ( ME ( ( S - A ) ) )) + ( ME ( ( A - S ) ) )) ARC_RELOC_HOWTO(ARC_SECTOFF_ME, 29, \ 2, \ @@ -244,42 +244,42 @@ ARC_RELOC_HOWTO(AC_SECTOFF_U8, 35, \ 9, \ replace_disp9ls, \ bitfield, \ - ( ( S + A ) - SECTSTART )) + ( ME ( ( ( S + A ) - SECTSTART ) ) )) ARC_RELOC_HOWTO(AC_SECTOFF_U8_1, 36, \ 2, \ 9, \ replace_disp9ls, \ bitfield, \ - ( ( ( S + A ) - SECTSTART ) >> 1 )) + ( ME ( ( ( ( S + A ) - SECTSTART ) >> 1 ) ) )) ARC_RELOC_HOWTO(AC_SECTOFF_U8_2, 37, \ 2, \ 9, \ replace_disp9ls, \ bitfield, \ - ( ( ( S + A ) - SECTSTART ) >> 2 )) + ( ME ( ( ( ( S + A ) - SECTSTART ) >> 2 ) ) )) -ARC_RELOC_HOWTO(AC_SECTFOFF_S9, 38, \ +ARC_RELOC_HOWTO(AC_SECTOFF_S9, 38, \ 2, \ 9, \ replace_disp9ls, \ bitfield, \ - ( ( S + A ) - SECTSTART )) + ( ME ( ( ( ( S + A ) - SECTSTART ) - 256 ) ) )) -ARC_RELOC_HOWTO(AC_SECTFOFF_S9_1, 39, \ +ARC_RELOC_HOWTO(AC_SECTOFF_S9_1, 39, \ 2, \ 9, \ replace_disp9ls, \ bitfield, \ - ( ( ( S + A ) - SECTSTART ) >> 1 )) + ( ME ( ( ( ( ( S + A ) - SECTSTART ) - 256 ) >> 1 ) ) )) -ARC_RELOC_HOWTO(AC_SECTFOFF_S9_2, 40, \ +ARC_RELOC_HOWTO(AC_SECTOFF_S9_2, 40, \ 2, \ 9, \ replace_disp9ls, \ bitfield, \ - ( ( ( S + A ) - SECTSTART ) >> 2 )) + ( ME ( ( ( ( ( S + A ) - SECTSTART ) - 256 ) >> 2 ) ) )) ARC_RELOC_HOWTO(ARC_SECTOFF_ME_1, 41, \ 2, \ @@ -309,6 +309,13 @@ ARC_RELOC_HOWTO(ARC_SECTOFF_2, 44, \ bitfield, \ ( ( ( S - SECTSTART ) + A ) >> 2 )) +ARC_RELOC_HOWTO(ARC_SDA_12, 45, \ + 2, \ + 12, \ + replace_disp12s, \ + signed, \ + ( ME ( ( ( S + A ) - _SDA_BASE_ ) ) )) + ARC_RELOC_HOWTO(ARC_SDA16_ST2, 48, \ 1, \ 9, \ |