diff options
author | Jeff Law <law@redhat.com> | 2001-08-31 17:43:52 +0000 |
---|---|---|
committer | Jeff Law <law@redhat.com> | 2001-08-31 17:43:52 +0000 |
commit | 36ed2fff06b673cb994490fad661045c90819514 (patch) | |
tree | cffdbe223523a6b5cb231c231b9822708134c416 /gas/config/tc-h8300.h | |
parent | 08bf74c587590591e3f35a88ee7af3577db00684 (diff) | |
download | gdb-36ed2fff06b673cb994490fad661045c90819514.zip gdb-36ed2fff06b673cb994490fad661045c90819514.tar.gz gdb-36ed2fff06b673cb994490fad661045c90819514.tar.bz2 |
* tc-h8300.c (relocation mappings): Remove. Moved to tc-h8300.h.
(build_bytes): Mark fixups for PCrel branches as signed. For
OBJ_ELF, make sure the reloc's offset points to the first byte
to be modified.
(md_convert_frag): Update definiton based on BFD_ASSEMBLER.
* tc-h8300.h (relocation mappings): Add.
Diffstat (limited to 'gas/config/tc-h8300.h')
-rw-r--r-- | gas/config/tc-h8300.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/gas/config/tc-h8300.h b/gas/config/tc-h8300.h index a70792a..e3208f4 100644 --- a/gas/config/tc-h8300.h +++ b/gas/config/tc-h8300.h @@ -49,12 +49,37 @@ struct internal_reloc; extern void tc_reloc_mangle PARAMS ((struct fix *, struct internal_reloc *, bfd_vma)); +#ifdef OBJ_ELF +/* Provide mappings from the original H8 COFF relocation names to + their corresponding BFD relocation names. This allows us to use + most of tc-h8300.c without modifications for both ELF and COFF + ports. */ +#define R_MOV24B1 BFD_RELOC_H8_DIR24A8 +#define R_MOVL1 BFD_RELOC_H8_DIR32A16 +#define R_MOV24B1 BFD_RELOC_H8_DIR24A8 +#define R_MOVL1 BFD_RELOC_H8_DIR32A16 +#define R_RELLONG BFD_RELOC_32 +#define R_MOV16B1 BFD_RELOC_H8_DIR16A8 +#define R_RELWORD BFD_RELOC_16 +#define R_RELBYTE BFD_RELOC_8 +#define R_PCRWORD BFD_RELOC_16_PCREL +#define R_PCRBYTE BFD_RELOC_8_PCREL +#define R_JMPL1 BFD_RELOC_H8_DIR24R8 +#define R_MEM_INDIRECT BFD_RELOC_8 + +/* We do not want to adjust any relocations to make implementation of + linker relaxations easier. */ +#define tc_fix_adjustable(FIX) 0 +#endif + #define TC_CONS_RELOC (Hmode ? R_RELLONG: R_RELWORD) #define DO_NOT_STRIP 0 #define LISTING_HEADER "Hitachi H8/300 GAS " #define NEED_FX_R_TYPE 1 +#ifndef OBJ_ELF #define RELOC_32 1234 +#endif extern int Hmode; extern int Smode; |