summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy Wall <twall@alum.mit.edu>2000-02-10 21:21:55 +0000
committerTimothy Wall <twall@alum.mit.edu>2000-02-10 21:21:55 +0000
commit6c784c9aab8eac345e61467a9d0b0478ed21e7da (patch)
treec5ebe46af185b4be229ae35654703113ac675b1e
parenta25c045a58c5e368fc1c8cddc03447e14e236238 (diff)
Add hooks to support TI COFF handling.
-rw-r--r--bfd/ChangeLog9
-rw-r--r--bfd/coffcode.h4
-rw-r--r--bfd/coffswap.h6
3 files changed, 19 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 3115f6776a..1fd998bd48 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,12 @@
+2000-02-10 Timothy Wall <twall@cygnus.com>
+
+ * coffswap.h (coff_swap_sym_in): Add hook SWAP_SYM_IN_POST to
+ allow final modifications of swapped-in symbol.
+ (coff_swap_sym_out): Ditto with SWAP_SYM_OUT_POST.
+ * coffcode.h (coff_write_relocs): Use macro
+ SECTION_RELATIVE_ABSOLUTE_SYMBOL_P if defined to determine whether
+ symbol index should be set to -1.
+
Thu Feb 10 20:07:50 GMT 2000 Toshiyasu Morita (toshi.morita@sega.com)
* coff-sh.c (USES1_REG, USES2_REG, SETS1_REG, SETS2_REG,
diff --git a/bfd/coffcode.h b/bfd/coffcode.h
index ace39e1d11..ca1d522b03 100644
--- a/bfd/coffcode.h
+++ b/bfd/coffcode.h
@@ -2268,7 +2268,11 @@ coff_write_relocs (abfd, first_undef)
#endif
if (q->sym_ptr_ptr)
{
+#ifdef SECTION_RELATIVE_ABSOLUTE_SYMBOL_P
+ if (SECTION_RELATIVE_ABSOLUTE_SYMBOL_P (q,s))
+#else
if (q->sym_ptr_ptr == bfd_abs_section_ptr->symbol_ptr_ptr)
+#endif
/* This is a relocation relative to the absolute symbol. */
n.r_symndx = -1;
else
diff --git a/bfd/coffswap.h b/bfd/coffswap.h
index bb94384409..d7d090fd41 100644
--- a/bfd/coffswap.h
+++ b/bfd/coffswap.h
@@ -357,6 +357,9 @@ coff_swap_sym_in (abfd, ext1, in1)
}
in->n_sclass = bfd_h_get_8(abfd, ext->e_sclass);
in->n_numaux = bfd_h_get_8(abfd, ext->e_numaux);
+#ifdef COFF_ADJUST_SYM_IN_POST
+ COFF_ADJUST_SYM_IN_POST (abfd, ext1, in1);
+#endif
}
static unsigned int
@@ -390,6 +393,9 @@ coff_swap_sym_out (abfd, inp, extp)
}
bfd_h_put_8(abfd, in->n_sclass , ext->e_sclass);
bfd_h_put_8(abfd, in->n_numaux , ext->e_numaux);
+#ifdef COFF_ADJUST_SYM_OUT_POST
+ COFF_ADJUST_SYM_OUT_POST (abfd, inp, extp);
+#endif
return SYMESZ;
}