From fefaa1aaf0a320f32080f45d0a70168f1a13d2fb Mon Sep 17 00:00:00 2001 From: Christian Groessler Date: Thu, 18 Aug 2005 11:54:33 +0000 Subject: 2005-08-18 Christian Groessler * 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. --- gas/config/tc-z8k.c | 57 ----------------------------------------------------- 1 file changed, 57 deletions(-) (limited to 'gas/config/tc-z8k.c') diff --git a/gas/config/tc-z8k.c b/gas/config/tc-z8k.c index 3b0f6d8..0d45f1b 100644 --- a/gas/config/tc-z8k.c +++ b/gas/config/tc-z8k.c @@ -1540,60 +1540,3 @@ void 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; -} -- cgit v1.1