/* This file is tc-sh.h
- Copyright (C) 1993-2015 Free Software Foundation, Inc.
+ Copyright (C) 1993-2022 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
|| (FIX)->fx_r_type == BFD_RELOC_8))
#define TC_FORCE_RELOCATION_SUB_SAME(FIX, SEC) \
- (! SEG_NORMAL (SEC) \
+ (GENERIC_FORCE_RELOCATION_SUB_SAME (FIX, SEC) \
|| TC_FORCE_RELOCATION (FIX) \
|| (sh_relax && SWITCH_TABLE (FIX)))
&& sh_relax && SWITCH_TABLE (FIX))
#define MD_PCREL_FROM_SECTION(FIX, SEC) md_pcrel_from_section (FIX, SEC)
-extern long md_pcrel_from_section (struct fix *, segT);
/* SH_COUNT relocs are allowed outside of frag.
The target is also buggy and sets fix size too large for other relocs. */
/* We align most sections to a 16 byte boundary. */
#define SUB_SEGMENT_ALIGN(SEG, FRCHAIN) \
- (strncmp (SEG_NAME (SEG), ".stabstr", 8) == 0 \
+ (startswith (SEG_NAME (SEG), ".stabstr") \
? 0 \
- : ((strncmp (SEG_NAME (SEG), ".stab", 5) == 0 \
+ : ((startswith (SEG_NAME (SEG), ".stab") \
|| strcmp (SEG_NAME (SEG), ".ctors") == 0 \
|| strcmp (SEG_NAME (SEG), ".dtors") == 0) \
? 2 \
#define TARGET_FORMAT (!target_big_endian ? "elf32-sh-linux" : "elf32-shbig-linux")
#elif defined(TE_NetBSD)
#define TARGET_FORMAT (!target_big_endian ? "elf32-shl-nbsd" : "elf32-sh-nbsd")
-#elif defined TARGET_SYMBIAN
-#define TARGET_FORMAT (!target_big_endian ? "elf32-shl-symbian" : "elf32-sh-symbian")
#elif defined (TE_VXWORKS)
#define TARGET_FORMAT (!target_big_endian ? "elf32-shl-vxworks" : "elf32-sh-vxworks")
#elif defined (TE_UCLINUX)
#define TC_RELOC_GLOBAL_OFFSET_TABLE BFD_RELOC_SH_GOTPC
#define tc_fix_adjustable(FIX) sh_fix_adjustable(FIX)
-extern bfd_boolean sh_fix_adjustable (struct fix *);
+extern bool sh_fix_adjustable (struct fix *);
/* Values passed to md_apply_fix don't include symbol values. */
#define MD_APPLY_SYM_VALUE(FIX) 0
can only be determined at link time. */
#define TC_FORCE_RELOCATION_LOCAL(FIX) \
- (!(FIX)->fx_pcrel \
+ (GENERIC_FORCE_RELOCATION_LOCAL (FIX) \
|| (FIX)->fx_r_type == BFD_RELOC_32_PLT_PCREL \
|| (FIX)->fx_r_type == BFD_RELOC_32_GOT_PCREL \
- || (FIX)->fx_r_type == BFD_RELOC_SH_GOTPC \
- || TC_FORCE_RELOCATION (FIX))
+ || (FIX)->fx_r_type == BFD_RELOC_SH_GOTPC)
#define TC_FORCE_RELOCATION_SUB_LOCAL(FIX, SEG) \
((!md_register_arithmetic && (SEG) == reg_section) \