gas OBJ_PROCESS_STAB

This macro and the supporting functions have an unused "seg" first
argument.  Tidy that.

	* config/obj-aout.c (obj_aout_process_stab): Delete first param.
	* config/obj-ecoff.h (OBJ_PROCESS_STAB): Likewise.
	* config/obj-elf.c (elf_process_stab): Likewise.
	* config/obj-elf.h (OBJ_PROCESS_STAB): Likewise.
	* config/obj-macho.h (OBJ_PROCESS_STAB): Likewise.
	* config/obj-multi.h (OBJ_PROCESS_STAB): Likewise.
	* ecoff.c (ecoff_stab): Likewise.
	* ecoff.h (ecoff_stab): Likewise.
	* obj.h (struct format_ops <process_stab>): Likewise.
	* stabs.c (OBJ_PROCESS_STAB): Likewise.
This commit is contained in:
Alan Modra 2023-08-31 15:31:56 +09:30
parent 959db21230
commit 5333003969
10 changed files with 16 additions and 19 deletions

View File

@ -248,8 +248,7 @@ obj_aout_sec_sym_ok_for_reloc (asection *sec ATTRIBUTE_UNUSED)
} }
static void static void
obj_aout_process_stab (segT seg ATTRIBUTE_UNUSED, obj_aout_process_stab (int w,
int w,
const char *s, const char *s,
int t, int t,
int o, int o,

View File

@ -64,8 +64,8 @@ struct ecoff_sy_obj
#define obj_app_file(name) ecoff_new_file (name) #define obj_app_file(name) ecoff_new_file (name)
/* At the moment we don't want to do any stabs processing in read.c. */ /* At the moment we don't want to do any stabs processing in read.c. */
#define OBJ_PROCESS_STAB(seg, what, string, type, other, desc) \ #define OBJ_PROCESS_STAB(what, string, type, other, desc) \
ecoff_stab ((seg), (what), (string), (type), (other), (desc)) ecoff_stab ((what), (string), (type), (other), (desc))
#define EMIT_SECTION_SYMBOLS 0 #define EMIT_SECTION_SYMBOLS 0
#define obj_sec_sym_ok_for_reloc(SEC) 1 #define obj_sec_sym_ok_for_reloc(SEC) 1

View File

@ -3114,8 +3114,7 @@ elf_generate_asm_lineno (void)
} }
static void static void
elf_process_stab (segT sec ATTRIBUTE_UNUSED, elf_process_stab (int what ATTRIBUTE_UNUSED,
int what ATTRIBUTE_UNUSED,
const char *string ATTRIBUTE_UNUSED, const char *string ATTRIBUTE_UNUSED,
int type ATTRIBUTE_UNUSED, int type ATTRIBUTE_UNUSED,
int other ATTRIBUTE_UNUSED, int other ATTRIBUTE_UNUSED,
@ -3123,7 +3122,7 @@ elf_process_stab (segT sec ATTRIBUTE_UNUSED,
{ {
#ifdef NEED_ECOFF_DEBUG #ifdef NEED_ECOFF_DEBUG
if (ECOFF_DEBUGGING) if (ECOFF_DEBUGGING)
ecoff_stab (sec, what, string, type, other, desc); ecoff_stab (what, string, type, other, desc);
#endif #endif
} }

View File

@ -265,9 +265,9 @@ extern void obj_elf_init_stab_section (segT);
((void) (ECOFF_DEBUGGING ? 0 : (obj_elf_init_stab_section (seg), 0))) ((void) (ECOFF_DEBUGGING ? 0 : (obj_elf_init_stab_section (seg), 0)))
#undef OBJ_PROCESS_STAB #undef OBJ_PROCESS_STAB
#define OBJ_PROCESS_STAB(seg, what, string, type, other, desc) \ #define OBJ_PROCESS_STAB(what, string, type, other, desc) \
if (ECOFF_DEBUGGING) \ if (ECOFF_DEBUGGING) \
ecoff_stab ((seg), (what), (string), (type), (other), (desc)) ecoff_stab ((what), (string), (type), (other), (desc))
#endif /* ECOFF_DEBUGGING */ #endif /* ECOFF_DEBUGGING */
#endif /* SEPARATE_STAB_SECTIONS not defined. */ #endif /* SEPARATE_STAB_SECTIONS not defined. */

View File

@ -76,7 +76,7 @@ extern void obj_mach_o_frob_label (symbolS *);
#define obj_frob_symbol(s, punt) punt = obj_mach_o_frob_symbol(s) #define obj_frob_symbol(s, punt) punt = obj_mach_o_frob_symbol(s)
extern int obj_mach_o_frob_symbol (struct symbol *); extern int obj_mach_o_frob_symbol (struct symbol *);
#define OBJ_PROCESS_STAB(SEG,W,S,T,O,D) obj_mach_o_process_stab(W,S,T,O,D) #define OBJ_PROCESS_STAB(W,S,T,O,D) obj_mach_o_process_stab(W,S,T,O,D)
extern void obj_mach_o_process_stab (int, const char *,int, int, int); extern void obj_mach_o_process_stab (int, const char *,int, int, int);
struct obj_mach_o_frag_data struct obj_mach_o_frag_data

View File

@ -145,9 +145,9 @@
? (*this_format->copy_symbol_attributes) (d, s) \ ? (*this_format->copy_symbol_attributes) (d, s) \
: (void) 0) : (void) 0)
#define OBJ_PROCESS_STAB(SEG,W,S,T,O,D) \ #define OBJ_PROCESS_STAB(W,S,T,O,D) \
(this_format->process_stab \ (this_format->process_stab \
? (*this_format->process_stab) (SEG,W,S,T,O,D) \ ? (*this_format->process_stab) (W,S,T,O,D) \
: (void) 0) : (void) 0)
#define SEPARATE_STAB_SECTIONS \ #define SEPARATE_STAB_SECTIONS \

View File

@ -3402,8 +3402,7 @@ ecoff_directive_weakext (int ignore ATTRIBUTE_UNUSED)
value a numeric value or an address. */ value a numeric value or an address. */
void void
ecoff_stab (segT sec ATTRIBUTE_UNUSED, ecoff_stab (int what,
int what,
const char *string, const char *string,
int type, int type,
int other, int other,

View File

@ -82,7 +82,7 @@ extern void ecoff_directive_type (int);
extern void ecoff_directive_val (int); extern void ecoff_directive_val (int);
/* Handle stabs. */ /* Handle stabs. */
extern void ecoff_stab (segT sec, int what, const char *string, extern void ecoff_stab (int what, const char *string,
int type, int other, int desc); int type, int other, int desc);
/* Set the GP prologue size. */ /* Set the GP prologue size. */

View File

@ -63,7 +63,7 @@ struct format_ops {
void (*s_set_type) (symbolS *, int); void (*s_set_type) (symbolS *, int);
void (*copy_symbol_attributes) (symbolS *, symbolS *); void (*copy_symbol_attributes) (symbolS *, symbolS *);
void (*generate_asm_lineno) (void); void (*generate_asm_lineno) (void);
void (*process_stab) (segT, int, const char *, int, int, int); void (*process_stab) (int, const char *, int, int, int);
int (*separate_stab_sections) (void); int (*separate_stab_sections) (void);
void (*init_stab_section) (segT); void (*init_stab_section) (segT);
int (*sec_sym_ok_for_reloc) (asection *); int (*sec_sym_ok_for_reloc) (asection *);

View File

@ -145,7 +145,7 @@ get_stab_string_offset (const char *string, const char *stabstr_secname,
#ifdef AOUT_STABS #ifdef AOUT_STABS
#ifndef OBJ_PROCESS_STAB #ifndef OBJ_PROCESS_STAB
#define OBJ_PROCESS_STAB(SEG,W,S,T,O,D) aout_process_stab(W,S,T,O,D) #define OBJ_PROCESS_STAB(W,S,T,O,D) aout_process_stab(W,S,T,O,D)
#endif #endif
/* Here instead of obj-aout.c because other formats use it too. */ /* Here instead of obj-aout.c because other formats use it too. */
@ -401,7 +401,7 @@ s_stab_generic (int what,
} }
#ifdef OBJ_PROCESS_STAB #ifdef OBJ_PROCESS_STAB
OBJ_PROCESS_STAB (seg, what, string, type, other, desc); OBJ_PROCESS_STAB (what, string, type, other, desc);
#endif #endif
subseg_set (saved_seg, saved_subseg); subseg_set (saved_seg, saved_subseg);
@ -415,7 +415,7 @@ s_stab_generic (int what,
obstack_free (&notes, stab_secname); obstack_free (&notes, stab_secname);
} }
#ifdef OBJ_PROCESS_STAB #ifdef OBJ_PROCESS_STAB
OBJ_PROCESS_STAB (0, what, string, type, other, desc); OBJ_PROCESS_STAB (what, string, type, other, desc);
#else #else
abort (); abort ();
#endif #endif