aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2009-09-05 07:56:26 +0000
committerNick Clifton <nickc@redhat.com>2009-09-05 07:56:26 +0000
commit96d56e9f9150298df80355ce22ba007fe67f07ed (patch)
tree3d818a6048f9ebc3696508baafd4d4646a499be9 /bfd
parent4db61d312cce185840dce0ab8f0ad69b47daac69 (diff)
downloadgdb-96d56e9f9150298df80355ce22ba007fe67f07ed.zip
gdb-96d56e9f9150298df80355ce22ba007fe67f07ed.tar.gz
gdb-96d56e9f9150298df80355ce22ba007fe67f07ed.tar.bz2
* bfd/coff-arm.c (coff_arm_relocate_section)
(record_thumb_to_arm_glue, bfd_arm_process_before_allocation): Change member name class to symbol_class. * bfd/coff-i960.c (coff_i960_relocate_section) Rename variable class to class_val. Change member name class to symbol_class. * bfd/coff-rs6000.c (_bfd_xcoff_swap_aux_in) (_bfd_xcoff_swap_aux_out): Rename arguments class to in_class. * bfd/coff-stgo32.c (adjust_aux_in_post) (adjust_aux_out_pre, adjust_aux_out_post): Rename arguments class to in_class. * bfd/coff64-rs6000.c (_bfd_xcoff64_swap_aux_in) (_bfd_xcoff64_swap_aux_out): Rename arguments class to in_class. * bfd/coffcode.h (coff_pointerize_aux_hook): Rename variable class to n_sclass. * bfd/coffgen.c (coff_write_symbol, coff_pointerize_aux): Rename variables named class to n_sclass. (coff_write_symbols): Rename variable class to sym_class. (bfd_coff_set_symbol_class): Rename argument class to symbol_class. * bfd/cofflink.c (_bfd_coff_link_hash_newfunc) (coff_link_add_symbols, _bfd_coff_link_input_bfd) (_bfd_coff_write_global_sym, _bfd_coff_generic_relocate_section): Update code to use renamed members. * bfd/coffswap.h (coff_swap_aux_in, coff_swap_aux_out): Rename argument class to in_class. * bfd/libcoff-in.h (struct coff_link_hash_entry, struct coff_debug_merge_type) Renamed members class to symbol_class and type_class. * bfd/libcoff.h Regenerated. * bfd/peXXigen.c: (_bfd_XXi_swap_aux_in, _bfd_XXi_swap_aux_out): Rename argument class to in_class. * bfd/pef.c (bfd_pef_parse_imported_symbol): Update code to use renamed members. * bfd/pef.h (struct bfd_pef_imported_symbol): Changed name of member class to symbol_class. * binutils/ieee.c (ieee_read_cxx_misc, ieee_read_cxx_class) (ieee_read_reference): Rename variables named class to cxxclass. * gas/config/tc-arc.c (struct syntax_classes): Rename member class to s_class. (arc_extinst): Rename variable class to s_class. Update code to use renamed members. * gas/config/tc-mips.c (insn_uses_reg): Rename argument class to regclass. * gas/config/tc-ppc.c (ppc_csect, ppc_change_csect, ppc_function) (ppc_tc, ppc_is_toc_sym, ppc_symbol_new_hook, ppc_frob_label) (ppc_fix_adjustable, md_apply_fix): Update code to use renamed members. * gas/config/tc-ppc.h (struct ppc_tc_sy): Change name of member from class to symbol_class. (OBJ_COPY_SYMBOL_ATTRIBUTES): Update code to use renamed members. * gas/config/tc-score.c (s3_adjust_paritybit): Rename argument class to i_class. * gas/config/tc-score7.c (s7_adjust_paritybit): Rename argument class to i_class. * gprof/corefile.c (core_create_function_syms): Rename variable class to cxxclass. * include/coff/ti.h (GET_LNSZ_SIZE, PUT_LNSZ_SIZE): Updated name of class variable to in_class to match changes in function that use this macro. * include/opcode/ia64.h (struct ia64_operand): Renamed member class to op_class * ld/emultempl/elf32.em (gld${EMULATION_NAME}_load_symbols) (gld${EMULATION_NAME}_try_needed): Rename variable class to link_class * opcodes/ia64-dis.c (print_insn_ia64): Update code to use renamed member. * opcodes/m88k-dis.c (m88kdis): Rename variable class to in_class. * opcodes/tic80-opc.c (tic80_symbol_to_value) (tic80_value_to_symbol): Rename argument class to symbol_class.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog37
-rw-r--r--bfd/coff-arm.c20
-rw-r--r--bfd/coff-i960.c8
-rw-r--r--bfd/coff-rs6000.c18
-rw-r--r--bfd/coff-stgo32.c21
-rw-r--r--bfd/coff64-rs6000.c18
-rw-r--r--bfd/coffcode.h4
-rw-r--r--bfd/coffgen.c30
-rw-r--r--bfd/cofflink.c14
-rw-r--r--bfd/coffswap.h22
-rw-r--r--bfd/libcoff-in.h5
-rw-r--r--bfd/libcoff.h5
-rw-r--r--bfd/peXXigen.c14
-rw-r--r--bfd/pef.c2
-rw-r--r--bfd/pef.h2
15 files changed, 134 insertions, 86 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 63ce24d..ee64969 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,40 @@
+2009-09-05 Martin Thuresson <martin@mtme.org>
+
+ * coff-arm.c (coff_arm_relocate_section)
+ (record_thumb_to_arm_glue, bfd_arm_process_before_allocation):
+ Change member name class to symbol_class.
+ * coff-i960.c (coff_i960_relocate_section) Rename variable
+ class to class_val. Change member name class to symbol_class.
+ * coff-rs6000.c (_bfd_xcoff_swap_aux_in)
+ (_bfd_xcoff_swap_aux_out): Rename arguments class to in_class.
+ * coff-stgo32.c (adjust_aux_in_post)
+ (adjust_aux_out_pre, adjust_aux_out_post): Rename arguments class
+ to in_class.
+ * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in)
+ (_bfd_xcoff64_swap_aux_out): Rename arguments class to in_class.
+ * coffcode.h (coff_pointerize_aux_hook): Rename variable class
+ to n_sclass.
+ * coffgen.c (coff_write_symbol, coff_pointerize_aux): Rename
+ variables named class to n_sclass. (coff_write_symbols): Rename
+ variable class to sym_class. (bfd_coff_set_symbol_class): Rename
+ argument class to symbol_class.
+ * cofflink.c (_bfd_coff_link_hash_newfunc)
+ (coff_link_add_symbols, _bfd_coff_link_input_bfd)
+ (_bfd_coff_write_global_sym, _bfd_coff_generic_relocate_section):
+ Update code to use renamed members.
+ * coffswap.h (coff_swap_aux_in, coff_swap_aux_out): Rename
+ argument class to in_class.
+ * libcoff-in.h (struct coff_link_hash_entry, struct
+ coff_debug_merge_type) Renamed members class to symbol_class and
+ type_class.
+ * libcoff.h Regenerated.
+ * peXXigen.c: (_bfd_XXi_swap_aux_in, _bfd_XXi_swap_aux_out):
+ Rename argument class to in_class.
+ * pef.c (bfd_pef_parse_imported_symbol): Update code to use
+ renamed members.
+ * pef.h (struct bfd_pef_imported_symbol): Changed name of
+ member class to symbol_class.
+
2009-09-04 H.J. Lu <hongjiu.lu@intel.com>
* configure: Regenerated.
diff --git a/bfd/coff-arm.c b/bfd/coff-arm.c
index 4adbf36..422c53e 100644
--- a/bfd/coff-arm.c
+++ b/bfd/coff-arm.c
@@ -1332,8 +1332,8 @@ coff_arm_relocate_section (bfd *output_bfd,
if (howto->type == ARM_26)
{
- if ( h->class == C_THUMBSTATFUNC
- || h->class == C_THUMBEXTFUNC)
+ if ( h->symbol_class == C_THUMBSTATFUNC
+ || h->symbol_class == C_THUMBEXTFUNC)
{
/* Arm code calling a Thumb function. */
unsigned long int tmp;
@@ -1419,9 +1419,9 @@ coff_arm_relocate_section (bfd *output_bfd,
/* Note: We used to check for ARM_THUMB9 and ARM_THUMB12. */
else if (howto->type == ARM_THUMB23)
{
- if ( h->class == C_EXT
- || h->class == C_STAT
- || h->class == C_LABEL)
+ if ( h->symbol_class == C_EXT
+ || h->symbol_class == C_STAT
+ || h->symbol_class == C_LABEL)
{
/* Thumb code calling an ARM function. */
asection * s = 0;
@@ -1721,8 +1721,8 @@ coff_arm_relocate_section (bfd *output_bfd,
int patchit = FALSE;
if (h != NULL
- && ( h->class == C_THUMBSTATFUNC
- || h->class == C_THUMBEXTFUNC))
+ && ( h->symbol_class == C_THUMBSTATFUNC
+ || h->symbol_class == C_THUMBEXTFUNC))
{
patchit = TRUE;
}
@@ -1932,7 +1932,7 @@ record_thumb_to_arm_glue (struct bfd_link_info * info,
/* If we mark it 'thumb', the disassembler will do a better job. */
myh = (struct coff_link_hash_entry *) bh;
- myh->class = C_THUMBEXTFUNC;
+ myh->symbol_class = C_THUMBEXTFUNC;
free (tmp_name);
@@ -2096,7 +2096,7 @@ bfd_arm_process_before_allocation (bfd * abfd,
the target of the call. If it is a thumb target, we
insert glue. */
- if (h->class == C_THUMBEXTFUNC)
+ if (h->symbol_class == C_THUMBEXTFUNC)
record_arm_to_thumb_glue (info, h);
break;
@@ -2110,7 +2110,7 @@ bfd_arm_process_before_allocation (bfd * abfd,
for it. This is not really a problem, since the link
is doomed anyway. */
- switch (h->class)
+ switch (h->symbol_class)
{
case C_EXT:
case C_STAT:
diff --git a/bfd/coff-i960.c b/bfd/coff-i960.c
index c247417..d0374d2 100644
--- a/bfd/coff-i960.c
+++ b/bfd/coff-i960.c
@@ -488,14 +488,14 @@ coff_i960_relocate_section (output_bfd, info, input_bfd, input_section,
if (howto->type == R_OPTCALL && ! info->relocatable && symndx != -1)
{
- int class;
+ int class_val;
if (h != NULL)
- class = h->class;
+ class_val = h->symbol_class;
else
- class = sym->n_sclass;
+ class_val = sym->n_sclass;
- switch (class)
+ switch (class_val)
{
case C_NULL:
/* This symbol is apparently not from a COFF input file.
diff --git a/bfd/coff-rs6000.c b/bfd/coff-rs6000.c
index d193153..e8d5484 100644
--- a/bfd/coff-rs6000.c
+++ b/bfd/coff-rs6000.c
@@ -495,11 +495,11 @@ _bfd_xcoff_swap_sym_out (abfd, inp, extp)
}
void
-_bfd_xcoff_swap_aux_in (abfd, ext1, type, class, indx, numaux, in1)
+_bfd_xcoff_swap_aux_in (abfd, ext1, type, in_class, indx, numaux, in1)
bfd *abfd;
PTR ext1;
int type;
- int class;
+ int in_class;
int indx;
int numaux;
PTR in1;
@@ -507,7 +507,7 @@ _bfd_xcoff_swap_aux_in (abfd, ext1, type, class, indx, numaux, in1)
AUXENT * ext = (AUXENT *)ext1;
union internal_auxent *in = (union internal_auxent *)in1;
- switch (class)
+ switch (in_class)
{
case C_FILE:
if (ext->x_file.x_fname[0] == 0)
@@ -573,7 +573,8 @@ _bfd_xcoff_swap_aux_in (abfd, ext1, type, class, indx, numaux, in1)
in->x_sym.x_tagndx.l = H_GET_32 (abfd, ext->x_sym.x_tagndx);
in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
- if (class == C_BLOCK || class == C_FCN || ISFCN (type) || ISTAG (class))
+ if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
+ || ISTAG (in_class))
{
in->x_sym.x_fcnary.x_fcn.x_lnnoptr =
H_GET_32 (abfd, ext->x_sym.x_fcnary.x_fcn.x_lnnoptr);
@@ -614,11 +615,11 @@ unsigned int _bfd_xcoff_swap_aux_out
PARAMS ((bfd *, PTR, int, int, int, int, PTR));
unsigned int
-_bfd_xcoff_swap_aux_out (abfd, inp, type, class, indx, numaux, extp)
+_bfd_xcoff_swap_aux_out (abfd, inp, type, in_class, indx, numaux, extp)
bfd * abfd;
PTR inp;
int type;
- int class;
+ int in_class;
int indx ATTRIBUTE_UNUSED;
int numaux ATTRIBUTE_UNUSED;
PTR extp;
@@ -627,7 +628,7 @@ _bfd_xcoff_swap_aux_out (abfd, inp, type, class, indx, numaux, extp)
AUXENT *ext = (AUXENT *)extp;
memset ((PTR)ext, 0, bfd_coff_auxesz (abfd));
- switch (class)
+ switch (in_class)
{
case C_FILE:
if (in->x_file.x_fname[0] == 0)
@@ -677,7 +678,8 @@ _bfd_xcoff_swap_aux_out (abfd, inp, type, class, indx, numaux, extp)
H_PUT_32 (abfd, in->x_sym.x_tagndx.l, ext->x_sym.x_tagndx);
H_PUT_16 (abfd, in->x_sym.x_tvndx, ext->x_sym.x_tvndx);
- if (class == C_BLOCK || class == C_FCN || ISFCN (type) || ISTAG (class))
+ if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
+ || ISTAG (in_class))
{
H_PUT_32 (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr,
ext->x_sym.x_fcnary.x_fcn.x_lnnoptr);
diff --git a/bfd/coff-stgo32.c b/bfd/coff-stgo32.c
index a43bf14..78a4936 100644
--- a/bfd/coff-stgo32.c
+++ b/bfd/coff-stgo32.c
@@ -218,54 +218,57 @@ adjust_scnhdr_out_post (abfd, in, out)
}
static void
-adjust_aux_in_post (abfd, ext1, type, class, indx, numaux, in1)
+adjust_aux_in_post (abfd, ext1, type, in_class, indx, numaux, in1)
bfd *abfd ATTRIBUTE_UNUSED;
PTR ext1 ATTRIBUTE_UNUSED;
int type;
- int class;
+ int in_class;
int indx ATTRIBUTE_UNUSED;
int numaux ATTRIBUTE_UNUSED;
PTR in1;
{
union internal_auxent *in = (union internal_auxent *) in1;
- if (class == C_BLOCK || class == C_FCN || ISFCN (type) || ISTAG (class))
+ if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
+ || ISTAG (in_class))
{
ADJUST_VAL (in->x_sym.x_fcnary.x_fcn.x_lnnoptr, GO32_STUBSIZE);
}
}
static void
-adjust_aux_out_pre (abfd, inp, type, class, indx, numaux, extp)
+adjust_aux_out_pre (abfd, inp, type, in_class, indx, numaux, extp)
bfd *abfd ATTRIBUTE_UNUSED;
PTR inp;
int type;
- int class;
+ int in_class;
int indx ATTRIBUTE_UNUSED;
int numaux ATTRIBUTE_UNUSED;
PTR extp ATTRIBUTE_UNUSED;
{
union internal_auxent *in = (union internal_auxent *) inp;
- if (class == C_BLOCK || class == C_FCN || ISFCN (type) || ISTAG (class))
+ if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
+ || ISTAG (in_class))
{
ADJUST_VAL (in->x_sym.x_fcnary.x_fcn.x_lnnoptr, -GO32_STUBSIZE);
}
}
static void
-adjust_aux_out_post (abfd, inp, type, class, indx, numaux, extp)
+adjust_aux_out_post (abfd, inp, type, in_class, indx, numaux, extp)
bfd *abfd ATTRIBUTE_UNUSED;
PTR inp;
int type;
- int class;
+ int in_class;
int indx ATTRIBUTE_UNUSED;
int numaux ATTRIBUTE_UNUSED;
PTR extp ATTRIBUTE_UNUSED;
{
union internal_auxent *in = (union internal_auxent *) inp;
- if (class == C_BLOCK || class == C_FCN || ISFCN (type) || ISTAG (class))
+ if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
+ || ISTAG (in_class))
{
ADJUST_VAL (in->x_sym.x_fcnary.x_fcn.x_lnnoptr, GO32_STUBSIZE);
}
diff --git a/bfd/coff64-rs6000.c b/bfd/coff64-rs6000.c
index 3a27ee0..e202070 100644
--- a/bfd/coff64-rs6000.c
+++ b/bfd/coff64-rs6000.c
@@ -353,11 +353,11 @@ _bfd_xcoff64_swap_sym_out (abfd, inp, extp)
}
static void
-_bfd_xcoff64_swap_aux_in (abfd, ext1, type, class, indx, numaux, in1)
+_bfd_xcoff64_swap_aux_in (abfd, ext1, type, in_class, indx, numaux, in1)
bfd *abfd;
PTR ext1;
int type;
- int class;
+ int in_class;
int indx;
int numaux;
PTR in1;
@@ -365,7 +365,7 @@ _bfd_xcoff64_swap_aux_in (abfd, ext1, type, class, indx, numaux, in1)
union external_auxent *ext = (union external_auxent *) ext1;
union internal_auxent *in = (union internal_auxent *) in1;
- switch (class)
+ switch (in_class)
{
case C_FILE:
if (ext->x_file.x_n.x_zeroes[0] == 0)
@@ -420,7 +420,8 @@ _bfd_xcoff64_swap_aux_in (abfd, ext1, type, class, indx, numaux, in1)
break;
}
- if (class == C_BLOCK || class == C_FCN || ISFCN (type) || ISTAG (class))
+ if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
+ || ISTAG (in_class))
{
in->x_sym.x_fcnary.x_fcn.x_lnnoptr
= H_GET_64 (abfd, ext->x_sym.x_fcnary.x_fcn.x_lnnoptr);
@@ -444,11 +445,11 @@ _bfd_xcoff64_swap_aux_in (abfd, ext1, type, class, indx, numaux, in1)
}
static unsigned int
-_bfd_xcoff64_swap_aux_out (abfd, inp, type, class, indx, numaux, extp)
+_bfd_xcoff64_swap_aux_out (abfd, inp, type, in_class, indx, numaux, extp)
bfd *abfd;
PTR inp;
int type;
- int class;
+ int in_class;
int indx ATTRIBUTE_UNUSED;
int numaux ATTRIBUTE_UNUSED;
PTR extp;
@@ -457,7 +458,7 @@ _bfd_xcoff64_swap_aux_out (abfd, inp, type, class, indx, numaux, extp)
union external_auxent *ext = (union external_auxent *) extp;
memset ((PTR) ext, 0, bfd_coff_auxesz (abfd));
- switch (class)
+ switch (in_class)
{
case C_FILE:
if (in->x_file.x_n.x_zeroes == 0)
@@ -506,7 +507,8 @@ _bfd_xcoff64_swap_aux_out (abfd, inp, type, class, indx, numaux, extp)
break;
}
- if (class == C_BLOCK || class == C_FCN || ISFCN (type) || ISTAG (class))
+ if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
+ || ISTAG (in_class))
{
H_PUT_64 (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr,
ext->x_sym.x_fcnary.x_fcn.x_lnnoptr);
diff --git a/bfd/coffcode.h b/bfd/coffcode.h
index 1cc860a..9b9ab99 100644
--- a/bfd/coffcode.h
+++ b/bfd/coffcode.h
@@ -2443,9 +2443,9 @@ coff_pointerize_aux_hook (bfd *abfd ATTRIBUTE_UNUSED,
unsigned int indaux,
combined_entry_type *aux)
{
- int class = symbol->u.syment.n_sclass;
+ int n_sclass = symbol->u.syment.n_sclass;
- if (CSECT_SYM_P (class)
+ if (CSECT_SYM_P (n_sclass)
&& indaux + 1 == symbol->u.syment.n_numaux)
{
if (SMTYP_SMTYP (aux->u.auxent.x_csect.x_smtyp) == XTY_LD)
diff --git a/bfd/coffgen.c b/bfd/coffgen.c
index 26333d0..f03e23a 100644
--- a/bfd/coffgen.c
+++ b/bfd/coffgen.c
@@ -912,7 +912,7 @@ coff_write_symbol (bfd *abfd,
{
unsigned int numaux = native->u.syment.n_numaux;
int type = native->u.syment.n_type;
- int class = native->u.syment.n_sclass;
+ int n_sclass = native->u.syment.n_sclass;
void * buf;
bfd_size_type symesz;
@@ -958,7 +958,7 @@ coff_write_symbol (bfd *abfd,
{
bfd_coff_swap_aux_out (abfd,
&((native + j + 1)->u.auxent),
- type, class, (int) j,
+ type, n_sclass, (int) j,
native->u.syment.n_numaux,
buf);
if (bfd_bwrite (buf, auxesz, abfd) != auxesz)
@@ -1156,7 +1156,7 @@ coff_write_symbols (bfd *abfd)
if (coff_backend_info (abfd)->_bfd_coff_classify_symbol != NULL)
{
bfd_error_handler_type current_error_handler;
- enum coff_symbol_classification class;
+ enum coff_symbol_classification sym_class;
unsigned char *n_sclass;
/* Suppress error reporting by bfd_coff_classify_symbol.
@@ -1164,9 +1164,10 @@ coff_write_symbols (bfd *abfd)
symbol which has no associated section and we do not have to
worry about this, all we need to know is that it is local. */
current_error_handler = bfd_set_error_handler (null_error_handler);
- class = bfd_coff_classify_symbol (abfd, &c_symbol->native->u.syment);
+ sym_class = bfd_coff_classify_symbol (abfd,
+ &c_symbol->native->u.syment);
(void) bfd_set_error_handler (current_error_handler);
-
+
n_sclass = &c_symbol->native->u.syment.n_sclass;
/* If the symbol class has been changed (eg objcopy/ld script/etc)
@@ -1178,10 +1179,10 @@ coff_write_symbols (bfd *abfd)
if (symbol->flags & BSF_WEAK)
*n_sclass = obj_pe (abfd) ? C_NT_WEAK : C_WEAKEXT;
- else if (symbol->flags & BSF_LOCAL && class != COFF_SYMBOL_LOCAL)
+ else if (symbol->flags & BSF_LOCAL && sym_class != COFF_SYMBOL_LOCAL)
*n_sclass = C_STAT;
else if (symbol->flags & BSF_GLOBAL
- && (class != COFF_SYMBOL_GLOBAL
+ && (sym_class != COFF_SYMBOL_GLOBAL
#ifdef COFF_WITH_PE
|| *n_sclass == C_NT_WEAK
#endif
@@ -1390,7 +1391,7 @@ coff_pointerize_aux (bfd *abfd,
combined_entry_type *auxent)
{
unsigned int type = symbol->u.syment.n_type;
- unsigned int class = symbol->u.syment.n_sclass;
+ unsigned int n_sclass = symbol->u.syment.n_sclass;
if (coff_backend_info (abfd)->_bfd_coff_pointerize_aux_hook)
{
@@ -1400,16 +1401,17 @@ coff_pointerize_aux (bfd *abfd,
}
/* Don't bother if this is a file or a section. */
- if (class == C_STAT && type == T_NULL)
+ if (n_sclass == C_STAT && type == T_NULL)
return;
- if (class == C_FILE)
+ if (n_sclass == C_FILE)
return;
/* Otherwise patch up. */
#define N_TMASK coff_data (abfd)->local_n_tmask
#define N_BTSHFT coff_data (abfd)->local_n_btshft
- if ((ISFCN (type) || ISTAG (class) || class == C_BLOCK || class == C_FCN)
+ if ((ISFCN (type) || ISTAG (n_sclass) || n_sclass == C_BLOCK
+ || n_sclass == C_FCN)
&& auxent->u.auxent.x_sym.x_fcnary.x_fcn.x_endndx.l > 0)
{
auxent->u.auxent.x_sym.x_fcnary.x_fcn.x_endndx.p =
@@ -2316,7 +2318,7 @@ coff_sizeof_headers (bfd *abfd, struct bfd_link_info *info)
bfd_boolean
bfd_coff_set_symbol_class (bfd * abfd,
asymbol * symbol,
- unsigned int class)
+ unsigned int symbol_class)
{
coff_symbol_type * csym;
@@ -2341,7 +2343,7 @@ bfd_coff_set_symbol_class (bfd * abfd,
return FALSE;
native->u.syment.n_type = T_NULL;
- native->u.syment.n_sclass = class;
+ native->u.syment.n_sclass = symbol_class;
if (bfd_is_und_section (symbol->section))
{
@@ -2370,7 +2372,7 @@ bfd_coff_set_symbol_class (bfd * abfd,
csym->native = native;
}
else
- csym->native->u.syment.n_sclass = class;
+ csym->native->u.syment.n_sclass = symbol_class;
return TRUE;
}
diff --git a/bfd/cofflink.c b/bfd/cofflink.c
index c77b9e9..a292122 100644
--- a/bfd/cofflink.c
+++ b/bfd/cofflink.c
@@ -79,7 +79,7 @@ _bfd_coff_link_hash_newfunc (struct bfd_hash_entry *entry,
/* Set local fields. */
ret->indx = -1;
ret->type = T_NULL;
- ret->class = C_NULL;
+ ret->symbol_class = C_NULL;
ret->numaux = 0;
ret->auxbfd = NULL;
ret->aux = NULL;
@@ -488,14 +488,14 @@ coff_link_add_symbols (bfd *abfd,
the hash table, or if we are looking at a symbol
definition, then update the symbol class and type in
the hash table. */
- if (((*sym_hash)->class == C_NULL
+ if (((*sym_hash)->symbol_class == C_NULL
&& (*sym_hash)->type == T_NULL)
|| sym.n_scnum != 0
|| (sym.n_value != 0
&& (*sym_hash)->root.type != bfd_link_hash_defined
&& (*sym_hash)->root.type != bfd_link_hash_defweak))
{
- (*sym_hash)->class = sym.n_sclass;
+ (*sym_hash)->symbol_class = sym.n_sclass;
if (sym.n_type != T_NULL)
{
/* We want to warn if the type changed, but not
@@ -1605,7 +1605,7 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *finfo, bfd *input_bfd)
mt = bfd_alloc (input_bfd, amt);
if (mt == NULL)
return FALSE;
- mt->class = isym.n_sclass;
+ mt->type_class = isym.n_sclass;
/* Pick up the aux entry, which points to the end of the tag
entries. */
@@ -1694,7 +1694,7 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *finfo, bfd *input_bfd)
{
struct coff_debug_merge_element *me, *mel;
- if (mtl->class != mt->class)
+ if (mtl->type_class != mt->type_class)
continue;
for (me = mt->elements, mel = mtl->elements;
@@ -2556,7 +2556,7 @@ _bfd_coff_write_global_sym (struct coff_link_hash_entry *h, void *data)
isym._n._n_n._n_offset = STRING_SIZE_SIZE + indx;
}
- isym.n_sclass = h->class;
+ isym.n_sclass = h->symbol_class;
isym.n_type = h->type;
if (isym.n_sclass == C_NULL)
@@ -2942,7 +2942,7 @@ _bfd_coff_generic_relocate_section (bfd *output_bfd,
else if (h->root.type == bfd_link_hash_undefweak)
{
- if (h->class == C_NT_WEAK && h->numaux == 1)
+ if (h->symbol_class == C_NT_WEAK && h->numaux == 1)
{
/* See _Microsoft Portable Executable and Common Object
File Format Specification_, section 5.5.3.
diff --git a/bfd/coffswap.h b/bfd/coffswap.h
index 0ff5060..674fdc7 100644
--- a/bfd/coffswap.h
+++ b/bfd/coffswap.h
@@ -382,7 +382,7 @@ static void
coff_swap_aux_in (bfd *abfd,
void * ext1,
int type,
- int class,
+ int in_class,
int indx,
int numaux,
void * in1)
@@ -391,10 +391,10 @@ coff_swap_aux_in (bfd *abfd,
union internal_auxent *in = (union internal_auxent *) in1;
#ifdef COFF_ADJUST_AUX_IN_PRE
- COFF_ADJUST_AUX_IN_PRE (abfd, ext1, type, class, indx, numaux, in1);
+ COFF_ADJUST_AUX_IN_PRE (abfd, ext1, type, in_class, indx, numaux, in1);
#endif
- switch (class)
+ switch (in_class)
{
case C_FILE:
if (ext->x_file.x_fname[0] == 0)
@@ -446,7 +446,8 @@ coff_swap_aux_in (bfd *abfd,
in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
#endif
- if (class == C_BLOCK || class == C_FCN || ISFCN (type) || ISTAG (class))
+ if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
+ || ISTAG (in_class))
{
in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
in->x_sym.x_fcnary.x_fcn.x_endndx.l = GET_FCN_ENDNDX (abfd, ext);
@@ -477,7 +478,7 @@ coff_swap_aux_in (bfd *abfd,
end: ;
#ifdef COFF_ADJUST_AUX_IN_POST
- COFF_ADJUST_AUX_IN_POST (abfd, ext1, type, class, indx, numaux, in1);
+ COFF_ADJUST_AUX_IN_POST (abfd, ext1, type, in_class, indx, numaux, in1);
#endif
}
@@ -485,7 +486,7 @@ static unsigned int
coff_swap_aux_out (bfd * abfd,
void * inp,
int type,
- int class,
+ int in_class,
int indx ATTRIBUTE_UNUSED,
int numaux ATTRIBUTE_UNUSED,
void * extp)
@@ -494,12 +495,12 @@ coff_swap_aux_out (bfd * abfd,
AUXENT *ext = (AUXENT *) extp;
#ifdef COFF_ADJUST_AUX_OUT_PRE
- COFF_ADJUST_AUX_OUT_PRE (abfd, inp, type, class, indx, numaux, extp);
+ COFF_ADJUST_AUX_OUT_PRE (abfd, inp, type, in_class, indx, numaux, extp);
#endif
memset (ext, 0, AUXESZ);
- switch (class)
+ switch (in_class)
{
case C_FILE:
if (in->x_file.x_fname[0] == 0)
@@ -537,7 +538,8 @@ coff_swap_aux_out (bfd * abfd,
H_PUT_16 (abfd, in->x_sym.x_tvndx, ext->x_sym.x_tvndx);
#endif
- if (class == C_BLOCK || class == C_FCN || ISFCN (type) || ISTAG (class))
+ if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
+ || ISTAG (in_class))
{
PUT_FCN_LNNOPTR (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr, ext);
PUT_FCN_ENDNDX (abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.l, ext);
@@ -567,7 +569,7 @@ coff_swap_aux_out (bfd * abfd,
end:
#ifdef COFF_ADJUST_AUX_OUT_POST
- COFF_ADJUST_AUX_OUT_POST (abfd, inp, type, class, indx, numaux, extp);
+ COFF_ADJUST_AUX_OUT_POST (abfd, inp, type, in_class, indx, numaux, extp);
#endif
return AUXESZ;
}
diff --git a/bfd/libcoff-in.h b/bfd/libcoff-in.h
index f3108ee..cf0a319 100644
--- a/bfd/libcoff-in.h
+++ b/bfd/libcoff-in.h
@@ -254,7 +254,7 @@ struct coff_link_hash_entry
unsigned short type;
/* Symbol class. */
- unsigned char class;
+ unsigned char symbol_class;
/* Number of auxiliary entries. */
char numaux;
@@ -394,7 +394,7 @@ struct coff_debug_merge_type
struct coff_debug_merge_type *next;
/* Class of type. */
- int class;
+ int type_class;
/* Symbol index where this type is defined. */
long indx;
@@ -603,4 +603,3 @@ extern bfd_boolean ppc_allocate_toc_section
(struct bfd_link_info *);
extern bfd_boolean ppc_process_before_allocation
(bfd *, struct bfd_link_info *);
-
diff --git a/bfd/libcoff.h b/bfd/libcoff.h
index 4bb43f3..db5e290 100644
--- a/bfd/libcoff.h
+++ b/bfd/libcoff.h
@@ -258,7 +258,7 @@ struct coff_link_hash_entry
unsigned short type;
/* Symbol class. */
- unsigned char class;
+ unsigned char symbol_class;
/* Number of auxiliary entries. */
char numaux;
@@ -398,7 +398,7 @@ struct coff_debug_merge_type
struct coff_debug_merge_type *next;
/* Class of type. */
- int class;
+ int type_class;
/* Symbol index where this type is defined. */
long indx;
@@ -607,7 +607,6 @@ extern bfd_boolean ppc_allocate_toc_section
(struct bfd_link_info *);
extern bfd_boolean ppc_process_before_allocation
(bfd *, struct bfd_link_info *);
-
/* Extracted from coffcode.h. */
typedef struct coff_ptr_struct
{
diff --git a/bfd/peXXigen.c b/bfd/peXXigen.c
index 17dafeb..ad4cced 100644
--- a/bfd/peXXigen.c
+++ b/bfd/peXXigen.c
@@ -231,7 +231,7 @@ void
_bfd_XXi_swap_aux_in (bfd * abfd,
void * ext1,
int type,
- int class,
+ int in_class,
int indx ATTRIBUTE_UNUSED,
int numaux ATTRIBUTE_UNUSED,
void * in1)
@@ -239,7 +239,7 @@ _bfd_XXi_swap_aux_in (bfd * abfd,
AUXENT *ext = (AUXENT *) ext1;
union internal_auxent *in = (union internal_auxent *) in1;
- switch (class)
+ switch (in_class)
{
case C_FILE:
if (ext->x_file.x_fname[0] == 0)
@@ -270,7 +270,8 @@ _bfd_XXi_swap_aux_in (bfd * abfd,
in->x_sym.x_tagndx.l = H_GET_32 (abfd, ext->x_sym.x_tagndx);
in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
- if (class == C_BLOCK || class == C_FCN || ISFCN (type) || ISTAG (class))
+ if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
+ || ISTAG (in_class))
{
in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
in->x_sym.x_fcnary.x_fcn.x_endndx.l = GET_FCN_ENDNDX (abfd, ext);
@@ -302,7 +303,7 @@ unsigned int
_bfd_XXi_swap_aux_out (bfd * abfd,
void * inp,
int type,
- int class,
+ int in_class,
int indx ATTRIBUTE_UNUSED,
int numaux ATTRIBUTE_UNUSED,
void * extp)
@@ -312,7 +313,7 @@ _bfd_XXi_swap_aux_out (bfd * abfd,
memset (ext, 0, AUXESZ);
- switch (class)
+ switch (in_class)
{
case C_FILE:
if (in->x_file.x_fname[0] == 0)
@@ -344,7 +345,8 @@ _bfd_XXi_swap_aux_out (bfd * abfd,
H_PUT_32 (abfd, in->x_sym.x_tagndx.l, ext->x_sym.x_tagndx);
H_PUT_16 (abfd, in->x_sym.x_tvndx, ext->x_sym.x_tvndx);
- if (class == C_BLOCK || class == C_FCN || ISFCN (type) || ISTAG (class))
+ if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
+ || ISTAG (in_class))
{
PUT_FCN_LNNOPTR (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr, ext);
PUT_FCN_ENDNDX (abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.l, ext);
diff --git a/bfd/pef.c b/bfd/pef.c
index bb59724..4fcae1e 100644
--- a/bfd/pef.c
+++ b/bfd/pef.c
@@ -361,7 +361,7 @@ bfd_pef_parse_imported_symbol (bfd *abfd ATTRIBUTE_UNUSED,
BFD_ASSERT (len == 4);
value = bfd_getb32 (buf);
- symbol->class = value >> 24;
+ symbol->symbol_class = value >> 24;
symbol->name = value & 0x00ffffff;
return 0;
diff --git a/bfd/pef.h b/bfd/pef.h
index d8c0d27..db8d18c 100644
--- a/bfd/pef.h
+++ b/bfd/pef.h
@@ -79,7 +79,7 @@ enum bfd_pef_imported_library_options
struct bfd_pef_imported_symbol
{
- unsigned char class;
+ unsigned char symbol_class;
unsigned long name;
};
typedef struct bfd_pef_imported_symbol bfd_pef_imported_symbol;