diff options
author | Ian Lance Taylor <ian@airs.com> | 1995-03-07 19:56:31 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1995-03-07 19:56:31 +0000 |
commit | f135c692723ff3b1513345b1379fcfa0b7e40239 (patch) | |
tree | 3db61c9084d187e67381f5f86758c9c20cf9d78b /bfd/coff-a29k.c | |
parent | 597e3d58ba3f7849f8659333bb90e61f745e8a93 (diff) | |
download | gdb-f135c692723ff3b1513345b1379fcfa0b7e40239.zip gdb-f135c692723ff3b1513345b1379fcfa0b7e40239.tar.gz gdb-f135c692723ff3b1513345b1379fcfa0b7e40239.tar.bz2 |
* coffcode.h (bfd_coff_backend_data): Add new field
_bfd_coff_adjust_symndx.
(bfd_coff_adjust_symndx): Define.
(coff_adjust_symndx): Define as NULL if not already defined.
(bfd_coff_std_swap_table): Initialize new field to
coff_adjust_symndx.
* cofflink.c (coff_link_input_bfd): Call coff_adjust_symndx if it
is defined.
* coff-a29k.c (coff_a29k_adjust_symndx): New static function.
(coff_adjust_symndx): Define before including coffcode.h.
* libcoff.h: Rebuild.
Diffstat (limited to 'bfd/coff-a29k.c')
-rw-r--r-- | bfd/coff-a29k.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/bfd/coff-a29k.c b/bfd/coff-a29k.c index 35c748a..db29499 100644 --- a/bfd/coff-a29k.c +++ b/bfd/coff-a29k.c @@ -34,6 +34,9 @@ static bfd_reloc_status_type a29k_reloc static boolean coff_a29k_relocate_section PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *, struct internal_reloc *, struct internal_syment *, asection **)); +static boolean coff_a29k_adjust_symndx + PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, + struct internal_reloc *, boolean *)); #define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (2) @@ -537,6 +540,28 @@ coff_a29k_relocate_section (output_bfd, info, input_bfd, input_section, #define coff_relocate_section coff_a29k_relocate_section +/* We don't want to change the symndx of a R_IHCONST reloc, since it + is actually an addend, not a symbol index at all. */ + +/*ARGSUSED*/ +static boolean +coff_a29k_adjust_symndx (obfd, info, ibfd, sec, irel, adjustedp) + bfd *obfd; + struct bfd_link_info *info; + bfd *ibfd; + asection *sec; + struct internal_reloc *irel; + boolean *adjustedp; +{ + if (irel->r_type == R_IHCONST) + *adjustedp = true; + else + *adjustedp = false; + return true; +} + +#define coff_adjust_symndx coff_a29k_adjust_symndx + #include "coffcode.h" const bfd_target a29kcoff_big_vec = |