Thu Aug 30 12:05:13 2001 J"orn Rennecke <amylaar@redhat.com>
authorJeff Law <law@redhat.com>
Thu, 30 Aug 2001 20:15:06 +0000 (20:15 +0000)
committerJeff Law <law@redhat.com>
Thu, 30 Aug 2001 20:15:06 +0000 (20:15 +0000)
        * 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/

gas/ChangeLog
gas/config/tc-h8300.c

index 732d60f71611ad46f9d435ec3025fda545fc11ed..05b2b4f1deac7d12ab050b2da91e93267b8ddecd 100644 (file)
@@ -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 
index 1965ba33a5a6dbf7158d3b53cf77338d68e9c665..6775d9289454cfcb88be511337ccd8f272c3035a 100644 (file)
@@ -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
This page took 0.032206 seconds and 4 git commands to generate.