aboutsummaryrefslogtreecommitdiff
path: root/binutils/od-xcoff.c
diff options
context:
space:
mode:
authorClément Chigot <clement.chigot@atos.net>2021-03-11 11:08:18 +0100
committerAlan Modra <amodra@gmail.com>2021-03-12 22:08:20 +1030
commit2c1bef53dee85aede31e6de6fa8276d6869f6512 (patch)
tree0d3903dfd673a797ed2c8f38557f8fc06ac424d1 /binutils/od-xcoff.c
parent0c929e83c1fdb29e553021b1d03565862accfd2d (diff)
downloadgdb-2c1bef53dee85aede31e6de6fa8276d6869f6512.zip
gdb-2c1bef53dee85aede31e6de6fa8276d6869f6512.tar.gz
gdb-2c1bef53dee85aede31e6de6fa8276d6869f6512.tar.bz2
aix: correct HOWTO table and add missing relocations
Since the last time AIX HOWTO table was modified, IBM has now released an official documentation about XCOFF relocations. This commit corrects the wrong ones and add some missing. For now, the "custom" relocations made for xcoff_rtype2howto have been kept. The new relocations are still set as EMPTY_HOWTO because they will be implemented in later commits. In xcoff[64]_ppc_relocate_section, instead of recreating howto from scratch, it's better to use the existing howto from the table and fixing it according to r_size field. bfd/ * coff-rs6000.c (xcoff_calculate_relocation): Correct and add new relocations. (xcoff_howto_table): Likewise. (xcoff_rtype2howto): Increase r_type maximum value. (xcoff_ppc_relocate_section): Reuse predefined HOWTOs instead of create a new one from scratch. Enable only some relocations to have a changing r_size. * coff64-rs6000.c (xcoff64_calculate_relocation): Likewise. (xcoff64_howto_table): Likewise. (xcoff64_rtype2howto): Likewise. (xcoff64_ppc_relocate_section): Likewise. * libxcoff.h (XCOFF_MAX_CALCULATE_RELOCATION): Fix value. binutils/ * od-xcoff.c: Replace RTB by TRL entry. include/ * coff/xcoff.h (R_RTB): Remove. (R_TRL): Fix value.
Diffstat (limited to 'binutils/od-xcoff.c')
-rw-r--r--binutils/od-xcoff.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/binutils/od-xcoff.c b/binutils/od-xcoff.c
index ad3235e..f0d566b 100644
--- a/binutils/od-xcoff.c
+++ b/binutils/od-xcoff.c
@@ -300,7 +300,7 @@ static const struct xlat_table rtype_xlat[] =
RTYPE_ENTRY (NEG),
RTYPE_ENTRY (REL),
RTYPE_ENTRY (TOC),
- RTYPE_ENTRY (RTB),
+ RTYPE_ENTRY (TRL),
RTYPE_ENTRY (GL),
RTYPE_ENTRY (TCL),
RTYPE_ENTRY (BA),
@@ -308,7 +308,6 @@ static const struct xlat_table rtype_xlat[] =
RTYPE_ENTRY (RL),
RTYPE_ENTRY (RLA),
RTYPE_ENTRY (REF),
- RTYPE_ENTRY (TRL),
RTYPE_ENTRY (TRLA),
RTYPE_ENTRY (RRTBI),
RTYPE_ENTRY (RRTBA),