aboutsummaryrefslogtreecommitdiff
path: root/bfd/aoutx.h
diff options
context:
space:
mode:
authorHans-Peter Nilsson <hp@axis.com>2000-04-03 11:44:45 +0000
committerHans-Peter Nilsson <hp@axis.com>2000-04-03 11:44:45 +0000
commit1642229ef3ad766ccf41dd3fa2f0568aa0a3197c (patch)
tree2e04c2caaf9e927d84b804acba9bac62efcad9ee /bfd/aoutx.h
parent1ce6d55a69f34e933bc3365c85d0639a53ec9a2a (diff)
downloadgdb-1642229ef3ad766ccf41dd3fa2f0568aa0a3197c.zip
gdb-1642229ef3ad766ccf41dd3fa2f0568aa0a3197c.tar.gz
gdb-1642229ef3ad766ccf41dd3fa2f0568aa0a3197c.tar.bz2
* aoutx.h (NAME(aout,reloc_type_lookup)): Add BFD_RELOC_8 and
BFD_RELOC_16 to switch for extended relocs. (MY_swap_ext_reloc_in): New. (MY_swap_ext_reloc_out): New. (NAME(aout,slurp_reloc_table)): Use MY_swap_ext_reloc_in rather than NAME(aout,swap_ext_reloc_in) for extended relocs. (NAME(aout,squirt_out_relocs)): Similarly use MY_swap_ext_reloc_out. (aout_link_reloc_link_order): Use MY_put_ext_reloc if defined.
Diffstat (limited to 'bfd/aoutx.h')
-rw-r--r--bfd/aoutx.h22
1 files changed, 19 insertions, 3 deletions
diff --git a/bfd/aoutx.h b/bfd/aoutx.h
index fa107a7..01dd9ee 100644
--- a/bfd/aoutx.h
+++ b/bfd/aoutx.h
@@ -165,10 +165,18 @@ DESCRIPTION
#define MY_swap_std_reloc_in NAME(aout,swap_std_reloc_in)
#endif
+#ifndef MY_swap_ext_reloc_in
+#define MY_swap_ext_reloc_in NAME(aout,swap_ext_reloc_in)
+#endif
+
#ifndef MY_swap_std_reloc_out
#define MY_swap_std_reloc_out NAME(aout,swap_std_reloc_out)
#endif
+#ifndef MY_swap_ext_reloc_out
+#define MY_swap_ext_reloc_out NAME(aout,swap_ext_reloc_out)
+#endif
+
#ifndef MY_final_link_relocate
#define MY_final_link_relocate _bfd_final_link_relocate
#endif
@@ -283,6 +291,8 @@ NAME(aout,reloc_type_lookup) (abfd,code)
if (ext)
switch (code)
{
+ EXT (BFD_RELOC_8, 0);
+ EXT (BFD_RELOC_16, 1);
EXT (BFD_RELOC_32, 2);
EXT (BFD_RELOC_HI22, 8);
EXT (BFD_RELOC_LO10, 11);
@@ -2381,8 +2391,8 @@ NAME(aout,slurp_reloc_table) (abfd, asect, symbols)
(struct reloc_ext_external *) relocs;
for (; counter < count; counter++, rptr++, cache_ptr++)
- NAME(aout,swap_ext_reloc_in) (abfd, rptr, cache_ptr, symbols,
- bfd_get_symcount (abfd));
+ MY_swap_ext_reloc_in (abfd, rptr, cache_ptr, symbols,
+ bfd_get_symcount (abfd));
}
else
{
@@ -2432,7 +2442,8 @@ NAME(aout,squirt_out_relocs) (abfd, section)
for (natptr = native;
count != 0;
--count, natptr += each_size, ++generic)
- NAME(aout,swap_ext_reloc_out) (abfd, *generic, (struct reloc_ext_external *)natptr);
+ MY_swap_ext_reloc_out (abfd, *generic,
+ (struct reloc_ext_external *) natptr);
}
else
{
@@ -5671,6 +5682,10 @@ aout_link_reloc_link_order (finfo, o, p)
}
else
{
+#ifdef MY_put_ext_reloc
+ MY_put_ext_reloc (finfo->output_bfd, r_extern, r_index, p->offset,
+ howto, &erel, pr->addend);
+#else
PUT_WORD (finfo->output_bfd, p->offset, erel.r_address);
if (bfd_header_big_endian (finfo->output_bfd))
@@ -5693,6 +5708,7 @@ aout_link_reloc_link_order (finfo, o, p)
}
PUT_WORD (finfo->output_bfd, pr->addend, erel.r_addend);
+#endif /* MY_put_ext_reloc */
rel_ptr = (PTR) &erel;
}