* config/tc-h8300.h: Remove TC_RELOC_MANGLE/tc_reloc_mangle.
* config/tc-mcore.h: Likewise.
* config/tc-z8k.h: Likewise.
* config/tc-z8k.c: Likewise.
* config/tc-sh.h: Remove TC_RELOC_MANGLE and
sh_coff_reloc_mangle declaration.
* config/tc-sh.c: (md_apply_fix): Fix comment for case
BFD_RELOC_SH_USES.
+2005-08-18 Christian Groessler <chris@groessler.org>
+
+ * config/tc-h8300.h: Remove TC_RELOC_MANGLE/tc_reloc_mangle.
+ * config/tc-mcore.h: Likewise.
+ * config/tc-z8k.h: Likewise.
+ * config/tc-z8k.c: Likewise.
+ * config/tc-sh.h: Remove TC_RELOC_MANGLE and
+ sh_coff_reloc_mangle declaration.
+ * config/tc-sh.c: (md_apply_fix): Fix comment for case
+ BFD_RELOC_SH_USES.
+
2005-08-18 Kaz Kojima <kkojima@rr.iij4u.or.jp>
* config/tc-sh64.c (sh64_target_format): Check preset_target_arch
#define IGNORE_NONSTANDARD_ESCAPES
#define tc_coff_symbol_emit_hook(a) ; /* not used */
-#define TC_RELOC_MANGLE(s,a,b,c) tc_reloc_mangle(a,b,c)
-extern void tc_reloc_mangle (struct fix *, struct internal_reloc *, bfd_vma);
/* No shared lib support, so we don't need to ensure externally
visible symbols can be overridden. */
#define IGNORE_NONSTANDARD_ESCAPES
-#define TC_RELOC_MANGLE(a,b,c) tc_reloc_mangle (a, b, c)
-
/* Some pseudo-op semantic extensions. */
#define PSEUDO_LCOMM_OPTIONAL_ALIGN
break;
case BFD_RELOC_SH_USES:
- /* Pass the value into sh_coff_reloc_mangle. */
+ /* Pass the value into sh_reloc(). */
fixP->fx_addnumber = val;
break;
#define COFF_MAGIC (!target_big_endian ? SH_ARCH_MAGIC_LITTLE : SH_ARCH_MAGIC_BIG)
-#define TC_RELOC_MANGLE(seg, fix, int, paddr) \
- sh_coff_reloc_mangle ((seg), (fix), (int), (paddr))
-extern void sh_coff_reloc_mangle
- (struct segment_info_struct *, struct fix *,
- struct internal_reloc *, unsigned int);
-
#define tc_coff_symbol_emit_hook(a) ; /* not used */
#define TC_KEEP_FX_OFFSET 1
tc_coff_symbol_emit_hook (symbolS *s ATTRIBUTE_UNUSED)
{
}
-
-void
-tc_reloc_mangle (fixS *fix_ptr, struct internal_reloc *intr, bfd_vma base)
-{
- symbolS *symbol_ptr;
-
- if (fix_ptr->fx_addsy
- && fix_ptr->fx_subsy)
- {
- symbolS *add = fix_ptr->fx_addsy;
- symbolS *sub = fix_ptr->fx_subsy;
-
- if (S_GET_SEGMENT (add) != S_GET_SEGMENT (sub))
- as_bad (_("Can't subtract symbols in different sections %s %s"),
- S_GET_NAME (add), S_GET_NAME (sub));
- else
- {
- int diff = S_GET_VALUE (add) - S_GET_VALUE (sub);
-
- fix_ptr->fx_addsy = 0;
- fix_ptr->fx_subsy = 0;
- fix_ptr->fx_offset += diff;
- }
- }
- symbol_ptr = fix_ptr->fx_addsy;
-
- /* If this relocation is attached to a symbol then it's ok
- to output it. */
- if (fix_ptr->fx_r_type == 0)
- {
- /* cons likes to create reloc32's whatever the size of the reloc. */
- switch (fix_ptr->fx_size)
- {
- case 2:
- intr->r_type = R_IMM16;
- break;
- case 1:
- intr->r_type = R_IMM8;
- break;
- case 4:
- intr->r_type = R_IMM32;
- break;
- default:
- abort ();
- }
- }
- else
- intr->r_type = fix_ptr->fx_r_type;
-
- intr->r_vaddr = fix_ptr->fx_frag->fr_address + fix_ptr->fx_where + base;
- intr->r_offset = fix_ptr->fx_offset;
-
- if (symbol_ptr)
- intr->r_symndx = symbol_ptr->sy_number;
- else
- intr->r_symndx = -1;
-}
#define IGNORE_NONSTANDARD_ESCAPES
#undef WARN_SIGNED_OVERFLOW_WORD
-#define TC_RELOC_MANGLE(s,a,b,c) tc_reloc_mangle(a,b,c)
-extern void tc_reloc_mangle
- PARAMS ((struct fix *, struct internal_reloc *, bfd_vma));
-
#define LISTING_HEADER "Zilog Z8000 GAS "
#define RELOC_32 1234