summaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>2001-08-30 20:15:06 +0000
committerJeff Law <law@redhat.com>2001-08-30 20:15:06 +0000
commitf333765ffdd8e9928ff398b02dd04c8938f507cb (patch)
tree1599ad271ec041a0851f161ac36babbb8c34ced6 /gas
parent4c32cc04d2153054f16b3677e696f1ccd1b8872a (diff)
downloadbinutils-f333765ffdd8e9928ff398b02dd04c8938f507cb.tar.gz
binutils-f333765ffdd8e9928ff398b02dd04c8938f507cb.tar.bz2
binutils-f333765ffdd8e9928ff398b02dd04c8938f507cb.zip
Thu Aug 30 12:05:13 2001 J"orn Rennecke <amylaar@redhat.com>
* tc-h8300.c (tc_crawl_symbol_chain, tc_headers_hook): Don't define for BFD_ASSEMBLER. (tc_reloc_mangle): Likewise. (tc_gen_reloc): New function for BFD_ASSEMBLER. More of Joern's patches with minor changes s/OBJ_ELF/BFD_ASSEMBLER/
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog7
-rw-r--r--gas/config/tc-h8300.c38
2 files changed, 45 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 732d60f7161..05b2b4f1dea 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,10 @@
+Thu Aug 30 12:05:13 2001 J"orn Rennecke <amylaar@redhat.com>
+
+ * tc-h8300.c (tc_crawl_symbol_chain, tc_headers_hook): Don't
+ define for BFD_ASSEMBLER.
+ (tc_reloc_mangle): Likewise.
+ (tc_gen_reloc): New function for BFD_ASSEMBLER.
+
Wed Aug 29 12:49:58 2001 Jeffrey A Law (law@cygnus.com)
* config/tc-h8300.c (h8300hmode): Record the machine type
diff --git a/gas/config/tc-h8300.c b/gas/config/tc-h8300.c
index 1965ba33a5a..6775d928945 100644
--- a/gas/config/tc-h8300.c
+++ b/gas/config/tc-h8300.c
@@ -1329,12 +1329,14 @@ md_assemble (str)
build_bytes (opcode, operand);
}
+#ifndef OBJ_ELF
void
tc_crawl_symbol_chain (headers)
object_headers *headers ATTRIBUTE_UNUSED;
{
printf (_("call to tc_crawl_symbol_chain \n"));
}
+#endif
symbolS *
md_undefined_symbol (name)
@@ -1343,12 +1345,14 @@ md_undefined_symbol (name)
return 0;
}
+#ifndef OBJ_ELF
void
tc_headers_hook (headers)
object_headers *headers ATTRIBUTE_UNUSED;
{
printf (_("call to tc_headers_hook \n"));
}
+#endif
/* Various routines to kill one day */
/* Equal to MAX_PRECISION in atof-ieee.c */
@@ -1576,3 +1580,37 @@ tc_reloc_mangle (fix_ptr, intr, base)
else
intr->r_symndx = -1;
}
+#else /* OBJ_ELF */
+arelent *
+tc_gen_reloc (section, fixp)
+ asection *section ATTRIBUTE_UNUSED;
+ fixS *fixp;
+{
+ arelent *rel;
+ bfd_reloc_code_real_type r_type;
+
+ rel = (arelent *) xmalloc (sizeof (arelent));
+ rel->sym_ptr_ptr = (asymbol **) xmalloc (sizeof (asymbol *));
+ *rel->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_addsy);
+ rel->address = fixp->fx_frag->fr_address + fixp->fx_where;
+ rel->addend = fixp->fx_offset;
+
+ r_type = fixp->fx_r_type;
+
+#define DEBUG 0
+#if DEBUG
+ fprintf (stderr, "%s\n", bfd_get_reloc_code_name (r_type));
+ fflush(stderr);
+#endif
+ rel->howto = bfd_reloc_type_lookup (stdoutput, r_type);
+ if (rel->howto == NULL)
+ {
+ as_bad_where (fixp->fx_file, fixp->fx_line,
+ _("Cannot represent relocation type %s"),
+ bfd_get_reloc_code_name (r_type));
+ return NULL;
+ }
+
+ return rel;
+}
+#endif