aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-sh.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2002-05-11 11:31:17 +0000
committerNick Clifton <nickc@redhat.com>2002-05-11 11:31:17 +0000
commitcce5a618242b96bd9c67b1ce3b12981c37348c4e (patch)
tree0797dff27c527fcf93f5232d57073021faa5ab41 /gas/config/tc-sh.c
parent92dd7ceec9d7f05c5b0c2712f2b2110391ae3abf (diff)
downloadgdb-cce5a618242b96bd9c67b1ce3b12981c37348c4e.zip
gdb-cce5a618242b96bd9c67b1ce3b12981c37348c4e.tar.gz
gdb-cce5a618242b96bd9c67b1ce3b12981c37348c4e.tar.bz2
Define md_pcrel_from for use with sh-hms target.
Diffstat (limited to 'gas/config/tc-sh.c')
-rw-r--r--gas/config/tc-sh.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/gas/config/tc-sh.c b/gas/config/tc-sh.c
index 8bb72bd..d411379 100644
--- a/gas/config/tc-sh.c
+++ b/gas/config/tc-sh.c
@@ -2474,14 +2474,14 @@ md_undefined_symbol (name)
void
tc_crawl_symbol_chain (headers)
- object_headers *headers;
+ object_headers *headers ATTRIBUTE_UNUSED;
{
printf (_("call to tc_crawl_symbol_chain \n"));
}
void
tc_headers_hook (headers)
- object_headers *headers;
+ object_headers *headers ATTRIBUTE_UNUSED;
{
printf (_("call to tc_headers_hook \n"));
}
@@ -2924,7 +2924,7 @@ md_convert_frag (headers, seg, fragP)
#ifdef BFD_ASSEMBLER
bfd *headers ATTRIBUTE_UNUSED;
#else
- object_headers *headers;
+ object_headers *headers ATTRIBUTE_UNUSED;
#endif
segT seg;
fragS *fragP;
@@ -3680,6 +3680,16 @@ md_number_to_chars (ptr, use, nbytes)
number_to_chars_bigendian (ptr, use, nbytes);
}
+/* This version is used in obj-coff.c when not using BFD_ASSEMBLER.
+ eg for the sh-hms target. */
+
+long
+md_pcrel_from (fixP)
+ fixS *fixP;
+{
+ return fixP->fx_size + fixP->fx_where + fixP->fx_frag->fr_address + 2;
+}
+
long
md_pcrel_from_section (fixP, sec)
fixS *fixP;
@@ -3698,7 +3708,7 @@ md_pcrel_from_section (fixP, sec)
return fixP->fx_subsy ? fixP->fx_where + fixP->fx_frag->fr_address : 0;
}
- return fixP->fx_size + fixP->fx_where + fixP->fx_frag->fr_address + 2;
+ return md_pcrel_from (fixP);
}
#ifdef OBJ_COFF