Rework the R_NEG support on both gas and ld for the PowerPC AIX targets, in order...
[binutils-gdb.git] / gas / config / tc-arc.h
index 16f6a0686f45c665aed67fb75792abdde282c810..15dac8e3d7b0fbc2f2f85f4b10b356762c3c5e9a 100644 (file)
@@ -1,5 +1,5 @@
 /* tc-arc.h - Macros and type defines for the ARC.
-   Copyright (C) 2014-2016 Free Software Foundation, Inc.
+   Copyright (C) 2014-2021 Free Software Foundation, Inc.
 
    Contributed by Claudiu Zissulescu (claziss@synopsys.com)
 
    Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
    02110-1301, USA.  */
 
-#include "opcode/arc.h"
-
+#ifndef TC_ARC
 /* By convention, you should define this macro in the `.h' file.  For
    example, `tc-m68k.h' defines `TC_M68K'.  You might have to use this
    if it is necessary to add CPU specific code to the object format
    file.  */
 #define TC_ARC
 
+#include "opcode/arc.h"
+
 /* We want local label support.  */
 #define LOCAL_LABELS_FB 1
 
@@ -100,7 +101,6 @@ extern const char *arc_target_format;
    instruction, plus the address of the PC relative fixup.  The latter
    can be calculated as fixp->fx_where +
    fixp->fx_frag->fr_address.  */
-extern long md_pcrel_from_section (struct fix *, segT);
 #define MD_PCREL_FROM_SECTION(FIX, SEC) md_pcrel_from_section (FIX, SEC)
 
 /* [ ] is index operator.  */
@@ -171,7 +171,6 @@ extern long md_pcrel_from_section (struct fix *, segT);
 #define tc_frob_label(S)  arc_frob_label (S)
 
 #define GLOBAL_OFFSET_TABLE_NAME "_GLOBAL_OFFSET_TABLE_"
-#define DYNAMIC_STRUCT_NAME "_DYNAMIC"
 
 /* We need to take care of not having section relative fixups for the
    fixups with respect to Position Independent Code.  */
@@ -190,9 +189,20 @@ extern long md_pcrel_from_section (struct fix *, segT);
 /* Adjust symbol table.  */
 #define obj_adjust_symtab() arc_adjust_symtab ()
 
+/* Object attribute hooks.  */
+#define md_end arc_md_end
+#define CONVERT_SYMBOLIC_ATTRIBUTE(name) arc_convert_symbolic_attribute (name)
+#ifndef TC_COPY_SYMBOL_ATTRIBUTES
+#define TC_COPY_SYMBOL_ATTRIBUTES(DEST, SRC) \
+  (arc_copy_symbol_attributes (DEST, SRC))
+#endif
+
+extern void arc_copy_symbol_attributes (symbolS *, symbolS *);
+extern int arc_convert_symbolic_attribute (const char *);
+extern void arc_md_end (void);
 extern void arc_adjust_symtab (void);
 extern int arc_pcrel_adjust (fragS *);
-extern bfd_boolean arc_parse_name (const char *, struct expressionS *);
+extern bool arc_parse_name (const char *, struct expressionS *);
 extern int tc_arc_fix_adjustable (struct fix *);
 extern void arc_handle_align (fragS *);
 extern void arc_cons_fix_new (fragS *, int, int, expressionS *,
@@ -225,7 +235,7 @@ struct arc_flags
   char name[MAX_FLAG_NAME_LENGTH + 1];
 
   /* Pointer to arc flags.  */
-  struct arc_flag_operand *flgp;
+  const struct arc_flag_operand *flgp;
 };
 
 extern const relax_typeS md_relax_table[];
@@ -257,3 +267,5 @@ struct arc_relax_type
   /* Number of flags.  Used for re-assembling in md_convert_frag.  */
   int nflg;
 };
+
+#endif