ppc/svp64: introduce SVP64 name parser
[binutils-gdb.git] / gas / config / tc-sh.h
index 16c632f49bb566a122f0b7ce96839cf29f1c4bde..e19b141d4f5ed6def97def0c29e6b993811f0f85 100644 (file)
@@ -1,5 +1,5 @@
 /* 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.
 
@@ -77,7 +77,7 @@ extern int sh_force_relocation (struct fix *);
        || (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)))
 
@@ -87,7 +87,6 @@ extern int sh_force_relocation (struct 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.  */
@@ -141,9 +140,9 @@ extern void sh_frob_file (void);
 
 /* 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                                              \
@@ -160,8 +159,6 @@ extern int target_big_endian;
 #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)
@@ -188,7 +185,7 @@ extern void sh_elf_final_processing (void);
 #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
@@ -204,11 +201,10 @@ extern bfd_boolean sh_fix_adjustable (struct fix *);
    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)   \