aboutsummaryrefslogtreecommitdiff
path: root/bfd/coff-sh.c
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@cygnus>1994-11-16 22:28:22 +0000
committerKen Raeburn <raeburn@cygnus>1994-11-16 22:28:22 +0000
commitf6f350fe5bccc5807034d3dc90aaa4a0c656a675 (patch)
tree05c352a8166e47fa5c291ba46e600c642b6d604e /bfd/coff-sh.c
parent73951697c3ea8bd670f7395da055e05ae1eb5688 (diff)
downloadfsf-binutils-gdb-f6f350fe5bccc5807034d3dc90aaa4a0c656a675.zip
fsf-binutils-gdb-f6f350fe5bccc5807034d3dc90aaa4a0c656a675.tar.gz
fsf-binutils-gdb-f6f350fe5bccc5807034d3dc90aaa4a0c656a675.tar.bz2
* coff-sh.c: Deleted some code that was commented out or inside "#if 0".
(COFF_LONG_FILENAMES): Define. * cpu-sh.c (arch_info_struct): Convert name to lowercase, for consistency with other architectures.
Diffstat (limited to 'bfd/coff-sh.c')
-rw-r--r--bfd/coff-sh.c74
1 files changed, 4 insertions, 70 deletions
diff --git a/bfd/coff-sh.c b/bfd/coff-sh.c
index 3caaaf7..659b701 100644
--- a/bfd/coff-sh.c
+++ b/bfd/coff-sh.c
@@ -30,31 +30,26 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
static bfd_reloc_status_type sh_reloc();
+#define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (2)
+
+#define COFF_LONG_FILENAMES
static reloc_howto_type r_imm32 =
{R_SH_IMM32, 0, 2, 32, false, 0,
complain_overflow_bitfield, sh_reloc,"r_imm32", true, 0xffffffff,0xffffffff, false};
-/*#define SELECT_RELOC(x,y) x->howto = (&r_imm32)*/
-
-
#define BADMAG(x) SHBADMAG(x)
#define SH 1 /* Customize coffcode.h */
#define __A_MAGIC_SET__
/* Code to swap in the reloc */
-#if 0
-#define SWAP_IN_RELOC_OFFSET bfd_h_get_32
-#define SWAP_OUT_RELOC_OFFSET bfd_h_put_32
-#endif
#define SWAP_OUT_RELOC_EXTRA(abfd, src, dst) \
dst->r_stuff[0] = 'S'; \
dst->r_stuff[1] = 'C';
-/* Code to turn a r_type into a howto ptr, uses the above howto table
- */
+/* Code to turn a r_type into a howto ptr, uses the above howto table. */
static long
get_symbol_value (symbol)
asymbol *symbol;
@@ -75,31 +70,8 @@ get_symbol_value (symbol)
return(relocation);
}
-static void
-rtype2howto (internal, dst)
- arelent * internal;
- struct internal_reloc *dst;
-{
- switch (dst->r_type)
- {
- default:
- abort();
- case R_SH_IMM32:
-
- break;
- }
-}
-
#define RTYPE2HOWTO(x,y) ((x)->howto = &r_imm32)
-/* Perform any necessaru magic to the addend in a reloc entry */
-
-#if 0
-#define CALC_ADDEND(abfd, symbol, ext_reloc, cache_ptr) \
- cache_ptr->addend = ext_reloc.r_offset;
-
-#endif
-
/* Compute the addend of a reloc. If the reloc is to a common symbol,
the object file contains the value of the common symbol. By the
@@ -132,11 +104,6 @@ rtype2howto (internal, dst)
cache_ptr->addend = 0; \
}
-#if 0
-#define RELOC_PROCESSING(relent,reloc,symbols,abfd,section) \
- reloc_processing(relent, reloc, symbols, abfd, section)
-#endif
-
/* this function is in charge of performing all the 29k relocations */
static bfd_reloc_status_type
@@ -227,7 +194,6 @@ coff_sh_relocate_section (output_bfd, info, input_bfd, input_section,
struct internal_syment *sym;
asection *sec;
bfd_vma val;
- bfd_reloc_status_type rstat;
symndx = rel->r_symndx;
loc = contents + rel->r_vaddr - input_section->vma;
@@ -296,38 +262,6 @@ coff_sh_relocate_section (output_bfd, info, input_bfd, input_section,
return true;
}
-static void
-reloc_processing (relent, reloc, symbols, abfd, section)
- arelent * relent;
- struct internal_reloc *reloc;
- asymbol ** symbols;
- bfd * abfd;
- asection * section;
-{
- asymbol *ptr;
- relent->address = reloc->r_vaddr;
- relent->howto = &r_imm32;
-
-
- relent->sym_ptr_ptr = symbols + obj_convert(abfd)[reloc->r_symndx];
-
- ptr = *(relent->sym_ptr_ptr);
-
- if (ptr
- && bfd_asymbol_bfd(ptr) == abfd
-
- && ((ptr->flags & BSF_OLD_COMMON)== 0))
- {
- relent->addend = 0;
- }
- else
- {
- relent->addend = 0;
- }
- relent->address-= section->vma;
-
-}
-
#define coff_relocate_section coff_sh_relocate_section
#include "coffcode.h"