* 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.
This commit is contained in:
Nick Clifton 2009-09-05 07:56:26 +00:00
parent 4db61d312c
commit 96d56e9f91
36 changed files with 292 additions and 192 deletions

View file

@ -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> 2009-09-04 H.J. Lu <hongjiu.lu@intel.com>
* configure: Regenerated. * configure: Regenerated.

View file

@ -1332,8 +1332,8 @@ coff_arm_relocate_section (bfd *output_bfd,
if (howto->type == ARM_26) if (howto->type == ARM_26)
{ {
if ( h->class == C_THUMBSTATFUNC if ( h->symbol_class == C_THUMBSTATFUNC
|| h->class == C_THUMBEXTFUNC) || h->symbol_class == C_THUMBEXTFUNC)
{ {
/* Arm code calling a Thumb function. */ /* Arm code calling a Thumb function. */
unsigned long int tmp; 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. */ /* Note: We used to check for ARM_THUMB9 and ARM_THUMB12. */
else if (howto->type == ARM_THUMB23) else if (howto->type == ARM_THUMB23)
{ {
if ( h->class == C_EXT if ( h->symbol_class == C_EXT
|| h->class == C_STAT || h->symbol_class == C_STAT
|| h->class == C_LABEL) || h->symbol_class == C_LABEL)
{ {
/* Thumb code calling an ARM function. */ /* Thumb code calling an ARM function. */
asection * s = 0; asection * s = 0;
@ -1721,8 +1721,8 @@ coff_arm_relocate_section (bfd *output_bfd,
int patchit = FALSE; int patchit = FALSE;
if (h != NULL if (h != NULL
&& ( h->class == C_THUMBSTATFUNC && ( h->symbol_class == C_THUMBSTATFUNC
|| h->class == C_THUMBEXTFUNC)) || h->symbol_class == C_THUMBEXTFUNC))
{ {
patchit = TRUE; 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. */ /* If we mark it 'thumb', the disassembler will do a better job. */
myh = (struct coff_link_hash_entry *) bh; myh = (struct coff_link_hash_entry *) bh;
myh->class = C_THUMBEXTFUNC; myh->symbol_class = C_THUMBEXTFUNC;
free (tmp_name); 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 the target of the call. If it is a thumb target, we
insert glue. */ insert glue. */
if (h->class == C_THUMBEXTFUNC) if (h->symbol_class == C_THUMBEXTFUNC)
record_arm_to_thumb_glue (info, h); record_arm_to_thumb_glue (info, h);
break; break;
@ -2110,7 +2110,7 @@ bfd_arm_process_before_allocation (bfd * abfd,
for it. This is not really a problem, since the link for it. This is not really a problem, since the link
is doomed anyway. */ is doomed anyway. */
switch (h->class) switch (h->symbol_class)
{ {
case C_EXT: case C_EXT:
case C_STAT: case C_STAT:

View file

@ -488,14 +488,14 @@ coff_i960_relocate_section (output_bfd, info, input_bfd, input_section,
if (howto->type == R_OPTCALL && ! info->relocatable && symndx != -1) if (howto->type == R_OPTCALL && ! info->relocatable && symndx != -1)
{ {
int class; int class_val;
if (h != NULL) if (h != NULL)
class = h->class; class_val = h->symbol_class;
else else
class = sym->n_sclass; class_val = sym->n_sclass;
switch (class) switch (class_val)
{ {
case C_NULL: case C_NULL:
/* This symbol is apparently not from a COFF input file. /* This symbol is apparently not from a COFF input file.

View file

@ -495,11 +495,11 @@ _bfd_xcoff_swap_sym_out (abfd, inp, extp)
} }
void 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; bfd *abfd;
PTR ext1; PTR ext1;
int type; int type;
int class; int in_class;
int indx; int indx;
int numaux; int numaux;
PTR in1; PTR in1;
@ -507,7 +507,7 @@ _bfd_xcoff_swap_aux_in (abfd, ext1, type, class, indx, numaux, in1)
AUXENT * ext = (AUXENT *)ext1; AUXENT * ext = (AUXENT *)ext1;
union internal_auxent *in = (union internal_auxent *)in1; union internal_auxent *in = (union internal_auxent *)in1;
switch (class) switch (in_class)
{ {
case C_FILE: case C_FILE:
if (ext->x_file.x_fname[0] == 0) 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_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); 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 = in->x_sym.x_fcnary.x_fcn.x_lnnoptr =
H_GET_32 (abfd, ext->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)); PARAMS ((bfd *, PTR, int, int, int, int, PTR));
unsigned int 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; bfd * abfd;
PTR inp; PTR inp;
int type; int type;
int class; int in_class;
int indx ATTRIBUTE_UNUSED; int indx ATTRIBUTE_UNUSED;
int numaux ATTRIBUTE_UNUSED; int numaux ATTRIBUTE_UNUSED;
PTR extp; PTR extp;
@ -627,7 +628,7 @@ _bfd_xcoff_swap_aux_out (abfd, inp, type, class, indx, numaux, extp)
AUXENT *ext = (AUXENT *)extp; AUXENT *ext = (AUXENT *)extp;
memset ((PTR)ext, 0, bfd_coff_auxesz (abfd)); memset ((PTR)ext, 0, bfd_coff_auxesz (abfd));
switch (class) switch (in_class)
{ {
case C_FILE: case C_FILE:
if (in->x_file.x_fname[0] == 0) 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_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); 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, H_PUT_32 (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr,
ext->x_sym.x_fcnary.x_fcn.x_lnnoptr); ext->x_sym.x_fcnary.x_fcn.x_lnnoptr);

View file

@ -218,54 +218,57 @@ adjust_scnhdr_out_post (abfd, in, out)
} }
static void 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; bfd *abfd ATTRIBUTE_UNUSED;
PTR ext1 ATTRIBUTE_UNUSED; PTR ext1 ATTRIBUTE_UNUSED;
int type; int type;
int class; int in_class;
int indx ATTRIBUTE_UNUSED; int indx ATTRIBUTE_UNUSED;
int numaux ATTRIBUTE_UNUSED; int numaux ATTRIBUTE_UNUSED;
PTR in1; PTR in1;
{ {
union internal_auxent *in = (union internal_auxent *) 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); ADJUST_VAL (in->x_sym.x_fcnary.x_fcn.x_lnnoptr, GO32_STUBSIZE);
} }
} }
static void 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; bfd *abfd ATTRIBUTE_UNUSED;
PTR inp; PTR inp;
int type; int type;
int class; int in_class;
int indx ATTRIBUTE_UNUSED; int indx ATTRIBUTE_UNUSED;
int numaux ATTRIBUTE_UNUSED; int numaux ATTRIBUTE_UNUSED;
PTR extp ATTRIBUTE_UNUSED; PTR extp ATTRIBUTE_UNUSED;
{ {
union internal_auxent *in = (union internal_auxent *) inp; 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); ADJUST_VAL (in->x_sym.x_fcnary.x_fcn.x_lnnoptr, -GO32_STUBSIZE);
} }
} }
static void 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; bfd *abfd ATTRIBUTE_UNUSED;
PTR inp; PTR inp;
int type; int type;
int class; int in_class;
int indx ATTRIBUTE_UNUSED; int indx ATTRIBUTE_UNUSED;
int numaux ATTRIBUTE_UNUSED; int numaux ATTRIBUTE_UNUSED;
PTR extp ATTRIBUTE_UNUSED; PTR extp ATTRIBUTE_UNUSED;
{ {
union internal_auxent *in = (union internal_auxent *) inp; 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); ADJUST_VAL (in->x_sym.x_fcnary.x_fcn.x_lnnoptr, GO32_STUBSIZE);
} }

View file

@ -353,11 +353,11 @@ _bfd_xcoff64_swap_sym_out (abfd, inp, extp)
} }
static void 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; bfd *abfd;
PTR ext1; PTR ext1;
int type; int type;
int class; int in_class;
int indx; int indx;
int numaux; int numaux;
PTR in1; 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 external_auxent *ext = (union external_auxent *) ext1;
union internal_auxent *in = (union internal_auxent *) in1; union internal_auxent *in = (union internal_auxent *) in1;
switch (class) switch (in_class)
{ {
case C_FILE: case C_FILE:
if (ext->x_file.x_n.x_zeroes[0] == 0) 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; 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 in->x_sym.x_fcnary.x_fcn.x_lnnoptr
= H_GET_64 (abfd, ext->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 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; bfd *abfd;
PTR inp; PTR inp;
int type; int type;
int class; int in_class;
int indx ATTRIBUTE_UNUSED; int indx ATTRIBUTE_UNUSED;
int numaux ATTRIBUTE_UNUSED; int numaux ATTRIBUTE_UNUSED;
PTR extp; 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; union external_auxent *ext = (union external_auxent *) extp;
memset ((PTR) ext, 0, bfd_coff_auxesz (abfd)); memset ((PTR) ext, 0, bfd_coff_auxesz (abfd));
switch (class) switch (in_class)
{ {
case C_FILE: case C_FILE:
if (in->x_file.x_n.x_zeroes == 0) 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; 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, H_PUT_64 (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr,
ext->x_sym.x_fcnary.x_fcn.x_lnnoptr); ext->x_sym.x_fcnary.x_fcn.x_lnnoptr);

View file

@ -2443,9 +2443,9 @@ coff_pointerize_aux_hook (bfd *abfd ATTRIBUTE_UNUSED,
unsigned int indaux, unsigned int indaux,
combined_entry_type *aux) 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) && indaux + 1 == symbol->u.syment.n_numaux)
{ {
if (SMTYP_SMTYP (aux->u.auxent.x_csect.x_smtyp) == XTY_LD) if (SMTYP_SMTYP (aux->u.auxent.x_csect.x_smtyp) == XTY_LD)

View file

@ -912,7 +912,7 @@ coff_write_symbol (bfd *abfd,
{ {
unsigned int numaux = native->u.syment.n_numaux; unsigned int numaux = native->u.syment.n_numaux;
int type = native->u.syment.n_type; int type = native->u.syment.n_type;
int class = native->u.syment.n_sclass; int n_sclass = native->u.syment.n_sclass;
void * buf; void * buf;
bfd_size_type symesz; bfd_size_type symesz;
@ -958,7 +958,7 @@ coff_write_symbol (bfd *abfd,
{ {
bfd_coff_swap_aux_out (abfd, bfd_coff_swap_aux_out (abfd,
&((native + j + 1)->u.auxent), &((native + j + 1)->u.auxent),
type, class, (int) j, type, n_sclass, (int) j,
native->u.syment.n_numaux, native->u.syment.n_numaux,
buf); buf);
if (bfd_bwrite (buf, auxesz, abfd) != auxesz) 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) if (coff_backend_info (abfd)->_bfd_coff_classify_symbol != NULL)
{ {
bfd_error_handler_type current_error_handler; bfd_error_handler_type current_error_handler;
enum coff_symbol_classification class; enum coff_symbol_classification sym_class;
unsigned char *n_sclass; unsigned char *n_sclass;
/* Suppress error reporting by bfd_coff_classify_symbol. /* 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 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. */ worry about this, all we need to know is that it is local. */
current_error_handler = bfd_set_error_handler (null_error_handler); 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); (void) bfd_set_error_handler (current_error_handler);
n_sclass = &c_symbol->native->u.syment.n_sclass; n_sclass = &c_symbol->native->u.syment.n_sclass;
/* If the symbol class has been changed (eg objcopy/ld script/etc) /* 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) if (symbol->flags & BSF_WEAK)
*n_sclass = obj_pe (abfd) ? C_NT_WEAK : C_WEAKEXT; *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; *n_sclass = C_STAT;
else if (symbol->flags & BSF_GLOBAL else if (symbol->flags & BSF_GLOBAL
&& (class != COFF_SYMBOL_GLOBAL && (sym_class != COFF_SYMBOL_GLOBAL
#ifdef COFF_WITH_PE #ifdef COFF_WITH_PE
|| *n_sclass == C_NT_WEAK || *n_sclass == C_NT_WEAK
#endif #endif
@ -1390,7 +1391,7 @@ coff_pointerize_aux (bfd *abfd,
combined_entry_type *auxent) combined_entry_type *auxent)
{ {
unsigned int type = symbol->u.syment.n_type; 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) 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. */ /* 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; return;
if (class == C_FILE) if (n_sclass == C_FILE)
return; return;
/* Otherwise patch up. */ /* Otherwise patch up. */
#define N_TMASK coff_data (abfd)->local_n_tmask #define N_TMASK coff_data (abfd)->local_n_tmask
#define N_BTSHFT coff_data (abfd)->local_n_btshft #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.l > 0)
{ {
auxent->u.auxent.x_sym.x_fcnary.x_fcn.x_endndx.p = 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_boolean
bfd_coff_set_symbol_class (bfd * abfd, bfd_coff_set_symbol_class (bfd * abfd,
asymbol * symbol, asymbol * symbol,
unsigned int class) unsigned int symbol_class)
{ {
coff_symbol_type * csym; coff_symbol_type * csym;
@ -2341,7 +2343,7 @@ bfd_coff_set_symbol_class (bfd * abfd,
return FALSE; return FALSE;
native->u.syment.n_type = T_NULL; 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)) if (bfd_is_und_section (symbol->section))
{ {
@ -2370,7 +2372,7 @@ bfd_coff_set_symbol_class (bfd * abfd,
csym->native = native; csym->native = native;
} }
else else
csym->native->u.syment.n_sclass = class; csym->native->u.syment.n_sclass = symbol_class;
return TRUE; return TRUE;
} }

View file

@ -79,7 +79,7 @@ _bfd_coff_link_hash_newfunc (struct bfd_hash_entry *entry,
/* Set local fields. */ /* Set local fields. */
ret->indx = -1; ret->indx = -1;
ret->type = T_NULL; ret->type = T_NULL;
ret->class = C_NULL; ret->symbol_class = C_NULL;
ret->numaux = 0; ret->numaux = 0;
ret->auxbfd = NULL; ret->auxbfd = NULL;
ret->aux = 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 the hash table, or if we are looking at a symbol
definition, then update the symbol class and type in definition, then update the symbol class and type in
the hash table. */ the hash table. */
if (((*sym_hash)->class == C_NULL if (((*sym_hash)->symbol_class == C_NULL
&& (*sym_hash)->type == T_NULL) && (*sym_hash)->type == T_NULL)
|| sym.n_scnum != 0 || sym.n_scnum != 0
|| (sym.n_value != 0 || (sym.n_value != 0
&& (*sym_hash)->root.type != bfd_link_hash_defined && (*sym_hash)->root.type != bfd_link_hash_defined
&& (*sym_hash)->root.type != bfd_link_hash_defweak)) && (*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) if (sym.n_type != T_NULL)
{ {
/* We want to warn if the type changed, but not /* 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); mt = bfd_alloc (input_bfd, amt);
if (mt == NULL) if (mt == NULL)
return FALSE; 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 /* Pick up the aux entry, which points to the end of the tag
entries. */ 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; struct coff_debug_merge_element *me, *mel;
if (mtl->class != mt->class) if (mtl->type_class != mt->type_class)
continue; continue;
for (me = mt->elements, mel = mtl->elements; 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._n_n._n_offset = STRING_SIZE_SIZE + indx;
} }
isym.n_sclass = h->class; isym.n_sclass = h->symbol_class;
isym.n_type = h->type; isym.n_type = h->type;
if (isym.n_sclass == C_NULL) 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) 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 /* See _Microsoft Portable Executable and Common Object
File Format Specification_, section 5.5.3. File Format Specification_, section 5.5.3.

View file

@ -382,7 +382,7 @@ static void
coff_swap_aux_in (bfd *abfd, coff_swap_aux_in (bfd *abfd,
void * ext1, void * ext1,
int type, int type,
int class, int in_class,
int indx, int indx,
int numaux, int numaux,
void * in1) void * in1)
@ -391,10 +391,10 @@ coff_swap_aux_in (bfd *abfd,
union internal_auxent *in = (union internal_auxent *) in1; union internal_auxent *in = (union internal_auxent *) in1;
#ifdef COFF_ADJUST_AUX_IN_PRE #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 #endif
switch (class) switch (in_class)
{ {
case C_FILE: case C_FILE:
if (ext->x_file.x_fname[0] == 0) 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); in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
#endif #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_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
in->x_sym.x_fcnary.x_fcn.x_endndx.l = GET_FCN_ENDNDX (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: ; end: ;
#ifdef COFF_ADJUST_AUX_IN_POST #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 #endif
} }
@ -485,7 +486,7 @@ static unsigned int
coff_swap_aux_out (bfd * abfd, coff_swap_aux_out (bfd * abfd,
void * inp, void * inp,
int type, int type,
int class, int in_class,
int indx ATTRIBUTE_UNUSED, int indx ATTRIBUTE_UNUSED,
int numaux ATTRIBUTE_UNUSED, int numaux ATTRIBUTE_UNUSED,
void * extp) void * extp)
@ -494,12 +495,12 @@ coff_swap_aux_out (bfd * abfd,
AUXENT *ext = (AUXENT *) extp; AUXENT *ext = (AUXENT *) extp;
#ifdef COFF_ADJUST_AUX_OUT_PRE #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 #endif
memset (ext, 0, AUXESZ); memset (ext, 0, AUXESZ);
switch (class) switch (in_class)
{ {
case C_FILE: case C_FILE:
if (in->x_file.x_fname[0] == 0) 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); H_PUT_16 (abfd, in->x_sym.x_tvndx, ext->x_sym.x_tvndx);
#endif #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_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); 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: end:
#ifdef COFF_ADJUST_AUX_OUT_POST #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 #endif
return AUXESZ; return AUXESZ;
} }

View file

@ -254,7 +254,7 @@ struct coff_link_hash_entry
unsigned short type; unsigned short type;
/* Symbol class. */ /* Symbol class. */
unsigned char class; unsigned char symbol_class;
/* Number of auxiliary entries. */ /* Number of auxiliary entries. */
char numaux; char numaux;
@ -394,7 +394,7 @@ struct coff_debug_merge_type
struct coff_debug_merge_type *next; struct coff_debug_merge_type *next;
/* Class of type. */ /* Class of type. */
int class; int type_class;
/* Symbol index where this type is defined. */ /* Symbol index where this type is defined. */
long indx; long indx;
@ -603,4 +603,3 @@ extern bfd_boolean ppc_allocate_toc_section
(struct bfd_link_info *); (struct bfd_link_info *);
extern bfd_boolean ppc_process_before_allocation extern bfd_boolean ppc_process_before_allocation
(bfd *, struct bfd_link_info *); (bfd *, struct bfd_link_info *);

View file

@ -258,7 +258,7 @@ struct coff_link_hash_entry
unsigned short type; unsigned short type;
/* Symbol class. */ /* Symbol class. */
unsigned char class; unsigned char symbol_class;
/* Number of auxiliary entries. */ /* Number of auxiliary entries. */
char numaux; char numaux;
@ -398,7 +398,7 @@ struct coff_debug_merge_type
struct coff_debug_merge_type *next; struct coff_debug_merge_type *next;
/* Class of type. */ /* Class of type. */
int class; int type_class;
/* Symbol index where this type is defined. */ /* Symbol index where this type is defined. */
long indx; long indx;
@ -607,7 +607,6 @@ extern bfd_boolean ppc_allocate_toc_section
(struct bfd_link_info *); (struct bfd_link_info *);
extern bfd_boolean ppc_process_before_allocation extern bfd_boolean ppc_process_before_allocation
(bfd *, struct bfd_link_info *); (bfd *, struct bfd_link_info *);
/* Extracted from coffcode.h. */ /* Extracted from coffcode.h. */
typedef struct coff_ptr_struct typedef struct coff_ptr_struct
{ {

View file

@ -231,7 +231,7 @@ void
_bfd_XXi_swap_aux_in (bfd * abfd, _bfd_XXi_swap_aux_in (bfd * abfd,
void * ext1, void * ext1,
int type, int type,
int class, int in_class,
int indx ATTRIBUTE_UNUSED, int indx ATTRIBUTE_UNUSED,
int numaux ATTRIBUTE_UNUSED, int numaux ATTRIBUTE_UNUSED,
void * in1) void * in1)
@ -239,7 +239,7 @@ _bfd_XXi_swap_aux_in (bfd * abfd,
AUXENT *ext = (AUXENT *) ext1; AUXENT *ext = (AUXENT *) ext1;
union internal_auxent *in = (union internal_auxent *) in1; union internal_auxent *in = (union internal_auxent *) in1;
switch (class) switch (in_class)
{ {
case C_FILE: case C_FILE:
if (ext->x_file.x_fname[0] == 0) 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_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); 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_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
in->x_sym.x_fcnary.x_fcn.x_endndx.l = GET_FCN_ENDNDX (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, _bfd_XXi_swap_aux_out (bfd * abfd,
void * inp, void * inp,
int type, int type,
int class, int in_class,
int indx ATTRIBUTE_UNUSED, int indx ATTRIBUTE_UNUSED,
int numaux ATTRIBUTE_UNUSED, int numaux ATTRIBUTE_UNUSED,
void * extp) void * extp)
@ -312,7 +313,7 @@ _bfd_XXi_swap_aux_out (bfd * abfd,
memset (ext, 0, AUXESZ); memset (ext, 0, AUXESZ);
switch (class) switch (in_class)
{ {
case C_FILE: case C_FILE:
if (in->x_file.x_fname[0] == 0) 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_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); 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_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); PUT_FCN_ENDNDX (abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.l, ext);

View file

@ -361,7 +361,7 @@ bfd_pef_parse_imported_symbol (bfd *abfd ATTRIBUTE_UNUSED,
BFD_ASSERT (len == 4); BFD_ASSERT (len == 4);
value = bfd_getb32 (buf); value = bfd_getb32 (buf);
symbol->class = value >> 24; symbol->symbol_class = value >> 24;
symbol->name = value & 0x00ffffff; symbol->name = value & 0x00ffffff;
return 0; return 0;

View file

@ -79,7 +79,7 @@ enum bfd_pef_imported_library_options
struct bfd_pef_imported_symbol struct bfd_pef_imported_symbol
{ {
unsigned char class; unsigned char symbol_class;
unsigned long name; unsigned long name;
}; };
typedef struct bfd_pef_imported_symbol bfd_pef_imported_symbol; typedef struct bfd_pef_imported_symbol bfd_pef_imported_symbol;

View file

@ -1,3 +1,8 @@
2009-09-05 Martin Thuresson <martin@mtme.org>
* ieee.c (ieee_read_cxx_misc, ieee_read_cxx_class,
ieee_read_reference): Rename variables named class to cxxclass.
2009-09-04 Tristan Gingold <gingold@adacore.com> 2009-09-04 Tristan Gingold <gingold@adacore.com>
* BRANCHES: Add binutils-2_20-branch. * BRANCHES: Add binutils-2_20-branch.

View file

@ -2500,7 +2500,7 @@ ieee_read_cxx_misc (struct ieee_info *info, const bfd_byte **pp,
case 'z': case 'z':
{ {
const char *name, *mangled, *class; const char *name, *mangled, *cxx_class;
unsigned long namlen, mangledlen, classlen; unsigned long namlen, mangledlen, classlen;
bfd_vma control; bfd_vma control;
@ -2508,7 +2508,7 @@ ieee_read_cxx_misc (struct ieee_info *info, const bfd_byte **pp,
if (! ieee_require_atn65 (info, pp, &name, &namlen) if (! ieee_require_atn65 (info, pp, &name, &namlen)
|| ! ieee_require_atn65 (info, pp, &mangled, &mangledlen) || ! ieee_require_atn65 (info, pp, &mangled, &mangledlen)
|| ! ieee_require_atn65 (info, pp, &class, &classlen) || ! ieee_require_atn65 (info, pp, &cxx_class, &classlen)
|| ! ieee_require_asn (info, pp, &control)) || ! ieee_require_asn (info, pp, &control))
return FALSE; return FALSE;
@ -2533,7 +2533,7 @@ ieee_read_cxx_class (struct ieee_info *info, const bfd_byte **pp,
unsigned long count) unsigned long count)
{ {
const bfd_byte *start; const bfd_byte *start;
bfd_vma class; bfd_vma cxx_class;
const char *tag; const char *tag;
unsigned long taglen; unsigned long taglen;
struct ieee_tag *it; struct ieee_tag *it;
@ -2558,7 +2558,7 @@ ieee_read_cxx_class (struct ieee_info *info, const bfd_byte **pp,
start = *pp; start = *pp;
if (! ieee_require_asn (info, pp, &class)) if (! ieee_require_asn (info, pp, &cxx_class))
return FALSE; return FALSE;
--count; --count;
@ -3180,7 +3180,7 @@ ieee_read_cxx_class (struct ieee_info *info, const bfd_byte **pp,
it->slot. We update it->slot to automatically update all it->slot. We update it->slot to automatically update all
references to this struct. */ references to this struct. */
it->slot = debug_make_object_type (dhandle, it->slot = debug_make_object_type (dhandle,
class != 'u', cxx_class != 'u',
debug_get_type_size (dhandle, debug_get_type_size (dhandle,
it->slot), it->slot),
fields, baseclasses, dmethods, fields, baseclasses, dmethods,
@ -3303,7 +3303,7 @@ ieee_read_reference (struct ieee_info *info, const bfd_byte **pp)
{ {
const bfd_byte *start; const bfd_byte *start;
bfd_vma flags; bfd_vma flags;
const char *class, *name; const char *cxx_class, *name;
unsigned long classlen, namlen; unsigned long classlen, namlen;
debug_type *pslot; debug_type *pslot;
debug_type target; debug_type target;
@ -3317,7 +3317,7 @@ ieee_read_reference (struct ieee_info *info, const bfd_byte **pp)
the spec. */ the spec. */
if (flags == 3) if (flags == 3)
{ {
if (! ieee_require_atn65 (info, pp, &class, &classlen)) if (! ieee_require_atn65 (info, pp, &cxx_class, &classlen))
return FALSE; return FALSE;
} }
@ -3407,8 +3407,8 @@ ieee_read_reference (struct ieee_info *info, const bfd_byte **pp)
for (it = info->tags; it != NULL; it = it->next) for (it = info->tags; it != NULL; it = it->next)
{ {
if (it->name[0] == class[0] if (it->name[0] == cxx_class[0]
&& strncmp (it->name, class, classlen) == 0 && strncmp (it->name, cxx_class, classlen) == 0
&& strlen (it->name) == classlen) && strlen (it->name) == classlen)
{ {
if (it->fslots != NULL) if (it->fslots != NULL)

View file

@ -1,3 +1,22 @@
2009-09-05 Martin Thuresson <martin@mtme.org>
* 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.
* config/tc-mips.c (insn_uses_reg): Rename argument class to
regclass.
* 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.
* 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.
* config/tc-score.c (s3_adjust_paritybit): Rename argument
class to i_class.
* config/tc-score7.c (s7_adjust_paritybit): Rename argument
class to i_class.
2009-09-04 Tristan Gingold <gingold@adacore.com> 2009-09-04 Tristan Gingold <gingold@adacore.com>
* NEWS: Add marker for 2.20. * NEWS: Add marker for 2.20.

View file

@ -47,7 +47,7 @@ const struct syntax_classes
{ {
char *name; char *name;
int len; int len;
int class; int s_class;
} syntaxclass[] = } syntaxclass[] =
{ {
{ "SYNTAX_3OP|OP1_MUST_BE_IMM", 26, SYNTAX_3OP|OP1_MUST_BE_IMM|SYNTAX_VALID }, { "SYNTAX_3OP|OP1_MUST_BE_IMM", 26, SYNTAX_3OP|OP1_MUST_BE_IMM|SYNTAX_VALID },
@ -646,7 +646,7 @@ arc_extinst (int ignore ATTRIBUTE_UNUSED)
int suffixcode = -1; int suffixcode = -1;
int opcode, subopcode; int opcode, subopcode;
int i; int i;
int class = 0; int s_class = 0;
int name_len; int name_len;
struct arc_opcode *ext_op; struct arc_opcode *ext_op;
@ -756,20 +756,20 @@ arc_extinst (int ignore ATTRIBUTE_UNUSED)
{ {
if (!strncmp (syntaxclass[i].name,input_line_pointer, syntaxclass[i].len)) if (!strncmp (syntaxclass[i].name,input_line_pointer, syntaxclass[i].len))
{ {
class = syntaxclass[i].class; s_class = syntaxclass[i].s_class;
input_line_pointer += syntaxclass[i].len; input_line_pointer += syntaxclass[i].len;
break; break;
} }
} }
if (0 == (SYNTAX_VALID & class)) if (0 == (SYNTAX_VALID & s_class))
{ {
as_bad (_("invalid syntax class")); as_bad (_("invalid syntax class"));
ignore_rest_of_line (); ignore_rest_of_line ();
return; return;
} }
if ((0x3 == opcode) & (class & SYNTAX_3OP)) if ((0x3 == opcode) & (s_class & SYNTAX_3OP))
{ {
as_bad (_("opcode 0x3 and SYNTAX_3OP invalid")); as_bad (_("opcode 0x3 and SYNTAX_3OP invalid"));
ignore_rest_of_line (); ignore_rest_of_line ();
@ -797,7 +797,7 @@ arc_extinst (int ignore ATTRIBUTE_UNUSED)
break; break;
}; };
strcat (syntax, ((opcode == 0x3) ? "%a,%b" : ((class & SYNTAX_3OP) ? "%a,%b,%c" : "%b,%c"))); strcat (syntax, ((opcode == 0x3) ? "%a,%b" : ((s_class & SYNTAX_3OP) ? "%a,%b,%c" : "%b,%c")));
if (suffixcode < 2) if (suffixcode < 2)
strcat (syntax, "%F"); strcat (syntax, "%F");
strcat (syntax, "%S%L"); strcat (syntax, "%S%L");
@ -807,7 +807,7 @@ arc_extinst (int ignore ATTRIBUTE_UNUSED)
ext_op->mask = I (-1) | ((0x3 == opcode) ? C (-1) : 0); ext_op->mask = I (-1) | ((0x3 == opcode) ? C (-1) : 0);
ext_op->value = I (opcode) | ((0x3 == opcode) ? C (subopcode) : 0); ext_op->value = I (opcode) | ((0x3 == opcode) ? C (subopcode) : 0);
ext_op->flags = class; ext_op->flags = s_class;
ext_op->next_asm = arc_ext_opcodes; ext_op->next_asm = arc_ext_opcodes;
ext_op->next_dis = arc_ext_opcodes; ext_op->next_dis = arc_ext_opcodes;
arc_ext_opcodes = ext_op; arc_ext_opcodes = ext_op;
@ -829,7 +829,7 @@ arc_extinst (int ignore ATTRIBUTE_UNUSED)
p = frag_more (1); p = frag_more (1);
*p = subopcode; *p = subopcode;
p = frag_more (1); p = frag_more (1);
*p = (class & (OP1_MUST_BE_IMM | OP1_IMM_IMPLIED) ? IGNORE_FIRST_OPD : 0); *p = (s_class & (OP1_MUST_BE_IMM | OP1_IMM_IMPLIED) ? IGNORE_FIRST_OPD : 0);
p = frag_more (name_len); p = frag_more (name_len);
strncpy (p, syntax, name_len); strncpy (p, syntax, name_len);
p = frag_more (1); p = frag_more (1);

View file

@ -2221,20 +2221,20 @@ fixup_has_matching_lo_p (fixS *fixp)
static int static int
insn_uses_reg (const struct mips_cl_insn *ip, unsigned int reg, insn_uses_reg (const struct mips_cl_insn *ip, unsigned int reg,
enum mips_regclass class) enum mips_regclass regclass)
{ {
if (class == MIPS16_REG) if (regclass == MIPS16_REG)
{ {
gas_assert (mips_opts.mips16); gas_assert (mips_opts.mips16);
reg = mips16_to_32_reg_map[reg]; reg = mips16_to_32_reg_map[reg];
class = MIPS_GR_REG; regclass = MIPS_GR_REG;
} }
/* Don't report on general register ZERO, since it never changes. */ /* Don't report on general register ZERO, since it never changes. */
if (class == MIPS_GR_REG && reg == ZERO) if (regclass == MIPS_GR_REG && reg == ZERO)
return 0; return 0;
if (class == MIPS_FP_REG) if (regclass == MIPS_FP_REG)
{ {
gas_assert (! mips_opts.mips16); gas_assert (! mips_opts.mips16);
/* If we are called with either $f0 or $f1, we must check $f0. /* If we are called with either $f0 or $f1, we must check $f0.

View file

@ -3338,7 +3338,7 @@ ppc_csect (int ignore ATTRIBUTE_UNUSED)
if (S_GET_NAME (sym)[0] == '\0') if (S_GET_NAME (sym)[0] == '\0')
{ {
/* An unnamed csect is assumed to be [PR]. */ /* An unnamed csect is assumed to be [PR]. */
symbol_get_tc (sym)->class = XMC_PR; symbol_get_tc (sym)->symbol_class = XMC_PR;
} }
align = 2; align = 2;
@ -3374,7 +3374,7 @@ ppc_change_csect (symbolS *sym, offsetT align)
data section. */ data section. */
after_toc = 0; after_toc = 0;
is_code = 0; is_code = 0;
switch (symbol_get_tc (sym)->class) switch (symbol_get_tc (sym)->symbol_class)
{ {
case XMC_PR: case XMC_PR:
case XMC_RO: case XMC_RO:
@ -3764,8 +3764,8 @@ ppc_function (int ignore ATTRIBUTE_UNUSED)
symbol_set_value_expression (ext_sym, &exp); symbol_set_value_expression (ext_sym, &exp);
} }
if (symbol_get_tc (ext_sym)->class == -1) if (symbol_get_tc (ext_sym)->symbol_class == -1)
symbol_get_tc (ext_sym)->class = XMC_PR; symbol_get_tc (ext_sym)->symbol_class = XMC_PR;
symbol_get_tc (ext_sym)->output = 1; symbol_get_tc (ext_sym)->output = 1;
if (*input_line_pointer == ',') if (*input_line_pointer == ',')
@ -4198,7 +4198,7 @@ ppc_tc (int ignore ATTRIBUTE_UNUSED)
symbolS *label; symbolS *label;
label = symbol_get_tc (ppc_current_csect)->within; label = symbol_get_tc (ppc_current_csect)->within;
if (symbol_get_tc (label)->class != XMC_TC0) if (symbol_get_tc (label)->symbol_class != XMC_TC0)
{ {
as_bad (_(".tc with no label")); as_bad (_(".tc with no label"));
ignore_rest_of_line (); ignore_rest_of_line ();
@ -4218,7 +4218,7 @@ ppc_tc (int ignore ATTRIBUTE_UNUSED)
S_SET_SEGMENT (sym, now_seg); S_SET_SEGMENT (sym, now_seg);
symbol_set_frag (sym, frag_now); symbol_set_frag (sym, frag_now);
S_SET_VALUE (sym, (valueT) frag_now_fix ()); S_SET_VALUE (sym, (valueT) frag_now_fix ());
symbol_get_tc (sym)->class = XMC_TC; symbol_get_tc (sym)->symbol_class = XMC_TC;
symbol_get_tc (sym)->output = 1; symbol_get_tc (sym)->output = 1;
ppc_frob_label (sym); ppc_frob_label (sym);
@ -4322,7 +4322,7 @@ static int
ppc_is_toc_sym (symbolS *sym) ppc_is_toc_sym (symbolS *sym)
{ {
#ifdef OBJ_XCOFF #ifdef OBJ_XCOFF
return symbol_get_tc (sym)->class == XMC_TC; return symbol_get_tc (sym)->symbol_class == XMC_TC;
#endif #endif
#ifdef OBJ_ELF #ifdef OBJ_ELF
const char *sname = segment_name (S_GET_SEGMENT (sym)); const char *sname = segment_name (S_GET_SEGMENT (sym));
@ -4972,7 +4972,7 @@ ppc_symbol_new_hook (symbolS *sym)
tc = symbol_get_tc (sym); tc = symbol_get_tc (sym);
tc->next = NULL; tc->next = NULL;
tc->output = 0; tc->output = 0;
tc->class = -1; tc->symbol_class = -1;
tc->real_name = NULL; tc->real_name = NULL;
tc->subseg = 0; tc->subseg = 0;
tc->align = 0; tc->align = 0;
@ -4995,55 +4995,55 @@ ppc_symbol_new_hook (symbolS *sym)
{ {
case 'B': case 'B':
if (strcmp (s, "BS]") == 0) if (strcmp (s, "BS]") == 0)
tc->class = XMC_BS; tc->symbol_class = XMC_BS;
break; break;
case 'D': case 'D':
if (strcmp (s, "DB]") == 0) if (strcmp (s, "DB]") == 0)
tc->class = XMC_DB; tc->symbol_class = XMC_DB;
else if (strcmp (s, "DS]") == 0) else if (strcmp (s, "DS]") == 0)
tc->class = XMC_DS; tc->symbol_class = XMC_DS;
break; break;
case 'G': case 'G':
if (strcmp (s, "GL]") == 0) if (strcmp (s, "GL]") == 0)
tc->class = XMC_GL; tc->symbol_class = XMC_GL;
break; break;
case 'P': case 'P':
if (strcmp (s, "PR]") == 0) if (strcmp (s, "PR]") == 0)
tc->class = XMC_PR; tc->symbol_class = XMC_PR;
break; break;
case 'R': case 'R':
if (strcmp (s, "RO]") == 0) if (strcmp (s, "RO]") == 0)
tc->class = XMC_RO; tc->symbol_class = XMC_RO;
else if (strcmp (s, "RW]") == 0) else if (strcmp (s, "RW]") == 0)
tc->class = XMC_RW; tc->symbol_class = XMC_RW;
break; break;
case 'S': case 'S':
if (strcmp (s, "SV]") == 0) if (strcmp (s, "SV]") == 0)
tc->class = XMC_SV; tc->symbol_class = XMC_SV;
break; break;
case 'T': case 'T':
if (strcmp (s, "TC]") == 0) if (strcmp (s, "TC]") == 0)
tc->class = XMC_TC; tc->symbol_class = XMC_TC;
else if (strcmp (s, "TI]") == 0) else if (strcmp (s, "TI]") == 0)
tc->class = XMC_TI; tc->symbol_class = XMC_TI;
else if (strcmp (s, "TB]") == 0) else if (strcmp (s, "TB]") == 0)
tc->class = XMC_TB; tc->symbol_class = XMC_TB;
else if (strcmp (s, "TC0]") == 0 || strcmp (s, "T0]") == 0) else if (strcmp (s, "TC0]") == 0 || strcmp (s, "T0]") == 0)
tc->class = XMC_TC0; tc->symbol_class = XMC_TC0;
break; break;
case 'U': case 'U':
if (strcmp (s, "UA]") == 0) if (strcmp (s, "UA]") == 0)
tc->class = XMC_UA; tc->symbol_class = XMC_UA;
else if (strcmp (s, "UC]") == 0) else if (strcmp (s, "UC]") == 0)
tc->class = XMC_UC; tc->symbol_class = XMC_UC;
break; break;
case 'X': case 'X':
if (strcmp (s, "XO]") == 0) if (strcmp (s, "XO]") == 0)
tc->class = XMC_XO; tc->symbol_class = XMC_XO;
break; break;
} }
if (tc->class == -1) if (tc->symbol_class == -1)
as_bad (_("Unrecognized symbol suffix")); as_bad (_("Unrecognized symbol suffix"));
} }
@ -5056,8 +5056,8 @@ ppc_frob_label (symbolS *sym)
{ {
if (ppc_current_csect != (symbolS *) NULL) if (ppc_current_csect != (symbolS *) NULL)
{ {
if (symbol_get_tc (sym)->class == -1) if (symbol_get_tc (sym)->symbol_class == -1)
symbol_get_tc (sym)->class = symbol_get_tc (ppc_current_csect)->class; symbol_get_tc (sym)->symbol_class = symbol_get_tc (ppc_current_csect)->symbol_class;
symbol_remove (sym, &symbol_rootP, &symbol_lastP); symbol_remove (sym, &symbol_rootP, &symbol_lastP);
symbol_append (sym, symbol_get_tc (ppc_current_csect)->within, symbol_append (sym, symbol_get_tc (ppc_current_csect)->within,
@ -5180,7 +5180,7 @@ ppc_frob_symbol (symbolS *sym)
i = S_GET_NUMBER_AUXILIARY (sym); i = S_GET_NUMBER_AUXILIARY (sym);
S_SET_NUMBER_AUXILIARY (sym, i + 1); S_SET_NUMBER_AUXILIARY (sym, i + 1);
a = &coffsymbol (symbol_get_bfdsym (sym))->native[i + 1].u.auxent; a = &coffsymbol (symbol_get_bfdsym (sym))->native[i + 1].u.auxent;
if (symbol_get_tc (sym)->class == XMC_TC0) if (symbol_get_tc (sym)->symbol_class == XMC_TC0)
{ {
/* This is the TOC table. */ /* This is the TOC table. */
know (strcmp (S_GET_NAME (sym), "TOC") == 0); know (strcmp (S_GET_NAME (sym), "TOC") == 0);
@ -5209,9 +5209,9 @@ ppc_frob_symbol (symbolS *sym)
a->x_csect.x_scnlen.l = symbol_get_frag (sym)->fr_offset; a->x_csect.x_scnlen.l = symbol_get_frag (sym)->fr_offset;
a->x_csect.x_smtyp = (symbol_get_tc (sym)->align << 3) | XTY_CM; a->x_csect.x_smtyp = (symbol_get_tc (sym)->align << 3) | XTY_CM;
if (S_IS_EXTERNAL (sym)) if (S_IS_EXTERNAL (sym))
symbol_get_tc (sym)->class = XMC_RW; symbol_get_tc (sym)->symbol_class = XMC_RW;
else else
symbol_get_tc (sym)->class = XMC_BS; symbol_get_tc (sym)->symbol_class = XMC_BS;
} }
else if (S_GET_SEGMENT (sym) == absolute_section) else if (S_GET_SEGMENT (sym) == absolute_section)
{ {
@ -5219,8 +5219,8 @@ ppc_frob_symbol (symbolS *sym)
ppc_adjust_symtab. */ ppc_adjust_symtab. */
ppc_saw_abs = TRUE; ppc_saw_abs = TRUE;
a->x_csect.x_smtyp = XTY_LD; a->x_csect.x_smtyp = XTY_LD;
if (symbol_get_tc (sym)->class == -1) if (symbol_get_tc (sym)->symbol_class == -1)
symbol_get_tc (sym)->class = XMC_XO; symbol_get_tc (sym)->symbol_class = XMC_XO;
} }
else if (! S_IS_DEFINED (sym)) else if (! S_IS_DEFINED (sym))
{ {
@ -5228,17 +5228,17 @@ ppc_frob_symbol (symbolS *sym)
a->x_csect.x_scnlen.l = 0; a->x_csect.x_scnlen.l = 0;
a->x_csect.x_smtyp = XTY_ER; a->x_csect.x_smtyp = XTY_ER;
} }
else if (symbol_get_tc (sym)->class == XMC_TC) else if (symbol_get_tc (sym)->symbol_class == XMC_TC)
{ {
symbolS *next; symbolS *next;
/* This is a TOC definition. x_scnlen is the size of the /* This is a TOC definition. x_scnlen is the size of the
TOC entry. */ TOC entry. */
next = symbol_next (sym); next = symbol_next (sym);
while (symbol_get_tc (next)->class == XMC_TC0) while (symbol_get_tc (next)->symbol_class == XMC_TC0)
next = symbol_next (next); next = symbol_next (next);
if (next == (symbolS *) NULL if (next == (symbolS *) NULL
|| symbol_get_tc (next)->class != XMC_TC) || symbol_get_tc (next)->symbol_class != XMC_TC)
{ {
if (ppc_after_toc_frag == (fragS *) NULL) if (ppc_after_toc_frag == (fragS *) NULL)
a->x_csect.x_scnlen.l = (bfd_section_size (stdoutput, a->x_csect.x_scnlen.l = (bfd_section_size (stdoutput,
@ -5298,10 +5298,10 @@ ppc_frob_symbol (symbolS *sym)
a->x_csect.x_parmhash = 0; a->x_csect.x_parmhash = 0;
a->x_csect.x_snhash = 0; a->x_csect.x_snhash = 0;
if (symbol_get_tc (sym)->class == -1) if (symbol_get_tc (sym)->symbol_class == -1)
a->x_csect.x_smclas = XMC_PR; a->x_csect.x_smclas = XMC_PR;
else else
a->x_csect.x_smclas = symbol_get_tc (sym)->class; a->x_csect.x_smclas = symbol_get_tc (sym)->symbol_class;
a->x_csect.x_stab = 0; a->x_csect.x_stab = 0;
a->x_csect.x_snstab = 0; a->x_csect.x_snstab = 0;
@ -5506,9 +5506,9 @@ ppc_fix_adjustable (fixS *fix)
{ {
TC_SYMFIELD_TYPE *sy_tc = symbol_get_tc (sy); TC_SYMFIELD_TYPE *sy_tc = symbol_get_tc (sy);
if (sy_tc->class == XMC_TC0) if (sy_tc->symbol_class == XMC_TC0)
continue; continue;
if (sy_tc->class != XMC_TC) if (sy_tc->symbol_class != XMC_TC)
break; break;
if (val == resolve_symbol_value (sy)) if (val == resolve_symbol_value (sy))
{ {
@ -5525,8 +5525,8 @@ ppc_fix_adjustable (fixS *fix)
/* Possibly adjust the reloc to be against the csect. */ /* Possibly adjust the reloc to be against the csect. */
tc = symbol_get_tc (fix->fx_addsy); tc = symbol_get_tc (fix->fx_addsy);
if (tc->subseg == 0 if (tc->subseg == 0
&& tc->class != XMC_TC0 && tc->symbol_class != XMC_TC0
&& tc->class != XMC_TC && tc->symbol_class != XMC_TC
&& symseg != bss_section && symseg != bss_section
/* Don't adjust if this is a reloc in the toc section. */ /* Don't adjust if this is a reloc in the toc section. */
&& (symseg != data_section && (symseg != data_section
@ -5791,8 +5791,8 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED)
&& (operand->insert == NULL || ppc_obj64) && (operand->insert == NULL || ppc_obj64)
&& fixP->fx_addsy != NULL && fixP->fx_addsy != NULL
&& symbol_get_tc (fixP->fx_addsy)->subseg != 0 && symbol_get_tc (fixP->fx_addsy)->subseg != 0
&& symbol_get_tc (fixP->fx_addsy)->class != XMC_TC && symbol_get_tc (fixP->fx_addsy)->symbol_class != XMC_TC
&& symbol_get_tc (fixP->fx_addsy)->class != XMC_TC0 && symbol_get_tc (fixP->fx_addsy)->symbol_class != XMC_TC0
&& S_GET_SEGMENT (fixP->fx_addsy) != bss_section) && S_GET_SEGMENT (fixP->fx_addsy) != bss_section)
{ {
value = fixP->fx_offset; value = fixP->fx_offset;

View file

@ -134,7 +134,7 @@ struct ppc_tc_sy
.globl or .lglobl statement. */ .globl or .lglobl statement. */
int output; int output;
/* The symbol class. */ /* The symbol class. */
int class; int symbol_class;
/* The real name, if the symbol was renamed. */ /* The real name, if the symbol was renamed. */
char *real_name; char *real_name;
/* For a csect symbol, the subsegment we are using. This is zero /* For a csect symbol, the subsegment we are using. This is zero
@ -195,7 +195,7 @@ do { \
S_SET_SEGMENT (dest, S_GET_SEGMENT (src)); \ S_SET_SEGMENT (dest, S_GET_SEGMENT (src)); \
symbol_get_tc (dest)->size = symbol_get_tc (src)->size; \ symbol_get_tc (dest)->size = symbol_get_tc (src)->size; \
symbol_get_tc (dest)->align = symbol_get_tc (src)->align; \ symbol_get_tc (dest)->align = symbol_get_tc (src)->align; \
symbol_get_tc (dest)->class = symbol_get_tc (src)->class; \ symbol_get_tc (dest)->symbol_class = symbol_get_tc (src)->symbol_class; \
symbol_get_tc (dest)->within = symbol_get_tc (src)->within; \ symbol_get_tc (dest)->within = symbol_get_tc (src)->within; \
} while (0) } while (0)

View file

@ -2490,7 +2490,7 @@ s3_get_insn_class_from_type (enum score_insn_type type)
32-bit instruction: 1, 0. 32-bit instruction: 1, 0.
16-bit instruction: 0. */ 16-bit instruction: 0. */
static bfd_vma static bfd_vma
s3_adjust_paritybit (bfd_vma m_code, enum insn_class class) s3_adjust_paritybit (bfd_vma m_code, enum insn_class i_class)
{ {
bfd_vma result = 0; bfd_vma result = 0;
bfd_vma m_code_high = 0; bfd_vma m_code_high = 0;
@ -2500,7 +2500,7 @@ s3_adjust_paritybit (bfd_vma m_code, enum insn_class class)
unsigned long pb_middle = 0; unsigned long pb_middle = 0;
unsigned long pb_low = 0; unsigned long pb_low = 0;
if (class == INSN_CLASS_48) if (i_class == INSN_CLASS_48)
{ {
pb_high = 0x800000000000LL; pb_high = 0x800000000000LL;
pb_middle = 0x80000000; pb_middle = 0x80000000;
@ -2512,7 +2512,7 @@ s3_adjust_paritybit (bfd_vma m_code, enum insn_class class)
pb_middle | (m_code_middle << 1) | pb_middle | (m_code_middle << 1) |
pb_low | m_code_low; pb_low | m_code_low;
} }
else if (class == INSN_CLASS_32 || class == INSN_CLASS_SYN) else if (i_class == INSN_CLASS_32 || i_class == INSN_CLASS_SYN)
{ {
pb_high = 0x80000000; pb_high = 0x80000000;
pb_low = 0x00000000; pb_low = 0x00000000;
@ -2520,7 +2520,7 @@ s3_adjust_paritybit (bfd_vma m_code, enum insn_class class)
m_code_low = m_code & 0x00007fff; m_code_low = m_code & 0x00007fff;
result = pb_high | (m_code_high << 1) | pb_low | m_code_low; result = pb_high | (m_code_high << 1) | pb_low | m_code_low;
} }
else if (class == INSN_CLASS_16) else if (i_class == INSN_CLASS_16)
{ {
pb_high = 0; pb_high = 0;
pb_low = 0; pb_low = 0;
@ -2528,7 +2528,7 @@ s3_adjust_paritybit (bfd_vma m_code, enum insn_class class)
m_code_low = m_code & 0x00007fff; m_code_low = m_code & 0x00007fff;
result = pb_high | (m_code_high << 1) | pb_low | m_code_low; result = pb_high | (m_code_high << 1) | pb_low | m_code_low;
} }
else if (class == INSN_CLASS_PCE) else if (i_class == INSN_CLASS_PCE)
{ {
/* Keep original. */ /* Keep original. */
pb_high = 0; pb_high = 0;

View file

@ -2620,7 +2620,7 @@ s7_get_insn_class_from_type (enum score_insn_type type)
} }
static unsigned long static unsigned long
s7_adjust_paritybit (unsigned long m_code, enum insn_class class) s7_adjust_paritybit (unsigned long m_code, enum insn_class i_class)
{ {
unsigned long result = 0; unsigned long result = 0;
unsigned long m_code_high = 0; unsigned long m_code_high = 0;
@ -2628,22 +2628,22 @@ s7_adjust_paritybit (unsigned long m_code, enum insn_class class)
unsigned long pb_high = 0; unsigned long pb_high = 0;
unsigned long pb_low = 0; unsigned long pb_low = 0;
if (class == INSN_CLASS_32) if (i_class == INSN_CLASS_32)
{ {
pb_high = 0x80000000; pb_high = 0x80000000;
pb_low = 0x00008000; pb_low = 0x00008000;
} }
else if (class == INSN_CLASS_16) else if (i_class == INSN_CLASS_16)
{ {
pb_high = 0; pb_high = 0;
pb_low = 0; pb_low = 0;
} }
else if (class == INSN_CLASS_PCE) else if (i_class == INSN_CLASS_PCE)
{ {
pb_high = 0; pb_high = 0;
pb_low = 0x00008000; pb_low = 0x00008000;
} }
else if (class == INSN_CLASS_SYN) else if (i_class == INSN_CLASS_SYN)
{ {
/* FIXME. at this time, INSN_CLASS_SYN must be 32 bit, but, instruction type should /* FIXME. at this time, INSN_CLASS_SYN must be 32 bit, but, instruction type should
be changed if macro instruction has been expanded. */ be changed if macro instruction has been expanded. */

View file

@ -1,3 +1,8 @@
2009-09-05 Martin Thuresson <martin@mtme.org>
* corefile.c (core_create_function_syms): Rename variable
class to cxxclass.
2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* Makefile.am (AM_CPPFLAGS): Renamed from ... * Makefile.am (AM_CPPFLAGS): Renamed from ...

View file

@ -562,7 +562,7 @@ core_create_function_syms (void)
{ {
bfd_vma min_vma = ~ (bfd_vma) 0; bfd_vma min_vma = ~ (bfd_vma) 0;
bfd_vma max_vma = 0; bfd_vma max_vma = 0;
int class; int cxxclass;
long i; long i;
struct function_map * found; struct function_map * found;
@ -598,9 +598,9 @@ core_create_function_syms (void)
{ {
asection *sym_sec; asection *sym_sec;
class = core_sym_class (core_syms[i]); cxxclass = core_sym_class (core_syms[i]);
if (!class) if (!cxxclass)
{ {
DBG (AOUTDEBUG, DBG (AOUTDEBUG,
printf ("[core_create_function_syms] rejecting: 0x%lx %s\n", printf ("[core_create_function_syms] rejecting: 0x%lx %s\n",
@ -670,7 +670,7 @@ core_create_function_syms (void)
symtab.limit->is_func = (core_syms[i]->flags & BSF_FUNCTION) != 0; symtab.limit->is_func = (core_syms[i]->flags & BSF_FUNCTION) != 0;
symtab.limit->is_bb_head = TRUE; symtab.limit->is_bb_head = TRUE;
if (class == 't') if (cxxclass == 't')
symtab.limit->is_static = TRUE; symtab.limit->is_static = TRUE;
/* Keep track of the minimum and maximum vma addresses used by all /* Keep track of the minimum and maximum vma addresses used by all

View file

@ -1,3 +1,9 @@
2009-09-05 Martin Thuresson <martin@mtme.org>
* 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.
2009-08-10 Jan Kratochvil <jan.kratochvil@redhat.com> 2009-08-10 Jan Kratochvil <jan.kratochvil@redhat.com>
Fix references past allocated memory for i386-*-go32. Fix references past allocated memory for i386-*-go32.

View file

@ -476,10 +476,10 @@ union external_auxent {
/* lnsz size is in bits in COFF file, in bytes in BFD */ /* lnsz size is in bits in COFF file, in bytes in BFD */
#define GET_LNSZ_SIZE(abfd, ext) \ #define GET_LNSZ_SIZE(abfd, ext) \
(H_GET_16 (abfd, ext->x_sym.x_misc.x_lnsz.x_size) / (class != C_FIELD ? 8 : 1)) (H_GET_16 (abfd, ext->x_sym.x_misc.x_lnsz.x_size) / (in_class != C_FIELD ? 8 : 1))
#define PUT_LNSZ_SIZE(abfd, in, ext) \ #define PUT_LNSZ_SIZE(abfd, in, ext) \
H_PUT_16 (abfd, ((class != C_FIELD) ? (in) * 8 : (in)), \ H_PUT_16 (abfd, ((in_class != C_FIELD) ? (in) * 8 : (in)), \
ext->x_sym.x_misc.x_lnsz.x_size) ext->x_sym.x_misc.x_lnsz.x_size)
/* TI COFF stores offsets for MOS and MOU in bits; BFD expects bytes /* TI COFF stores offsets for MOS and MOU in bits; BFD expects bytes

View file

@ -1,3 +1,7 @@
2009-09-05 Martin Thuresson <martin@mtme.org>
* ia64.h (struct ia64_operand): Renamed member class to op_class.
2009-08-29 Martin Thuresson <martin@mtme.org> 2009-08-29 Martin Thuresson <martin@mtme.org>
* tic30.h (template): Rename type template to * tic30.h (template): Rename type template to

View file

@ -327,7 +327,7 @@ enum ia64_operand_class
struct ia64_operand struct ia64_operand
{ {
enum ia64_operand_class class; enum ia64_operand_class op_class;
/* Set VALUE as the operand bits for the operand of type SELF in the /* Set VALUE as the operand bits for the operand of type SELF in the
instruction pointed to by CODE. If an error occurs, *CODE is not instruction pointed to by CODE. If an error occurs, *CODE is not

View file

@ -1,3 +1,9 @@
2009-09-05 Martin Thuresson <martin@mtme.org>
* emultempl/elf32.em (gld${EMULATION_NAME}_load_symbols,
gld${EMULATION_NAME}_try_needed): Rename variable class to
link_class.
2009-09-04 Tristan Gingold <gingold@adacore.com> 2009-09-04 Tristan Gingold <gingold@adacore.com>
* NEWS: Add marker for 2.20. * NEWS: Add marker for 2.20.

View file

@ -114,30 +114,30 @@ fragment <<EOF
static bfd_boolean static bfd_boolean
gld${EMULATION_NAME}_load_symbols (lang_input_statement_type *entry) gld${EMULATION_NAME}_load_symbols (lang_input_statement_type *entry)
{ {
int class = 0; int link_class = 0;
/* Tell the ELF linker that we don't want the output file to have a /* Tell the ELF linker that we don't want the output file to have a
DT_NEEDED entry for this file, unless it is used to resolve DT_NEEDED entry for this file, unless it is used to resolve
references in a regular object. */ references in a regular object. */
if (entry->as_needed) if (entry->as_needed)
class = DYN_AS_NEEDED; link_class = DYN_AS_NEEDED;
/* Tell the ELF linker that we don't want the output file to have a /* Tell the ELF linker that we don't want the output file to have a
DT_NEEDED entry for any dynamic library in DT_NEEDED tags from DT_NEEDED entry for any dynamic library in DT_NEEDED tags from
this file at all. */ this file at all. */
if (!entry->add_needed) if (!entry->add_needed)
class |= DYN_NO_ADD_NEEDED; link_class |= DYN_NO_ADD_NEEDED;
if (entry->just_syms_flag if (entry->just_syms_flag
&& (bfd_get_file_flags (entry->the_bfd) & DYNAMIC) != 0) && (bfd_get_file_flags (entry->the_bfd) & DYNAMIC) != 0)
einfo (_("%P%F: --just-symbols may not be used on DSO: %B\n"), einfo (_("%P%F: --just-symbols may not be used on DSO: %B\n"),
entry->the_bfd); entry->the_bfd);
if (!class if (!link_class
|| (bfd_get_file_flags (entry->the_bfd) & DYNAMIC) == 0) || (bfd_get_file_flags (entry->the_bfd) & DYNAMIC) == 0)
return FALSE; return FALSE;
bfd_elf_set_dyn_lib_class (entry->the_bfd, class); bfd_elf_set_dyn_lib_class (entry->the_bfd, link_class);
/* Continue on with normal load_symbols processing. */ /* Continue on with normal load_symbols processing. */
return FALSE; return FALSE;
@ -306,7 +306,7 @@ gld${EMULATION_NAME}_try_needed (struct dt_needed *needed,
bfd *abfd; bfd *abfd;
const char *name = needed->name; const char *name = needed->name;
const char *soname; const char *soname;
int class; int link_class;
abfd = bfd_openr (name, bfd_get_target (link_info.output_bfd)); abfd = bfd_openr (name, bfd_get_target (link_info.output_bfd));
if (abfd == NULL) if (abfd == NULL)
@ -419,16 +419,16 @@ fragment <<EOF
/* Tell the ELF linker that we don't want the output file to have a /* Tell the ELF linker that we don't want the output file to have a
DT_NEEDED entry for this file, unless it is used to resolve DT_NEEDED entry for this file, unless it is used to resolve
references in a regular object. */ references in a regular object. */
class = DYN_DT_NEEDED; link_class = DYN_DT_NEEDED;
/* Tell the ELF linker that we don't want the output file to have a /* Tell the ELF linker that we don't want the output file to have a
DT_NEEDED entry for this file at all if the entry is from a file DT_NEEDED entry for this file at all if the entry is from a file
with DYN_NO_ADD_NEEDED. */ with DYN_NO_ADD_NEEDED. */
if (needed->by != NULL if (needed->by != NULL
&& (bfd_elf_get_dyn_lib_class (needed->by) & DYN_NO_ADD_NEEDED) != 0) && (bfd_elf_get_dyn_lib_class (needed->by) & DYN_NO_ADD_NEEDED) != 0)
class |= DYN_NO_NEEDED | DYN_NO_ADD_NEEDED; link_class |= DYN_NO_NEEDED | DYN_NO_ADD_NEEDED;
bfd_elf_set_dyn_lib_class (abfd, class); bfd_elf_set_dyn_lib_class (abfd, link_class);
/* Add this file into the symbol table. */ /* Add this file into the symbol table. */
if (! bfd_link_add_symbols (abfd, &link_info)) if (! bfd_link_add_symbols (abfd, &link_info))

View file

@ -1,3 +1,10 @@
2009-09-05 Martin Thuresson <martin@mtme.org>
* ia64-dis.c (print_insn_ia64): Update code to use renamed member.
* m88k-dis.c (m88kdis): Rename variable class to in_class.
* tic80-opc.c (tic80_symbol_to_value, tic80_value_to_symbol):
Rename argument class to symbol_class.
2009-09-04 Jie Zhang <jie.zhang@analog.com> 2009-09-04 Jie Zhang <jie.zhang@analog.com>
* bfin-dis.c (decode_pseudodbg_assert_0): Change according * bfin-dis.c (decode_pseudodbg_assert_0): Change according

View file

@ -183,7 +183,7 @@ print_insn_ia64 (bfd_vma memaddr, struct disassemble_info *info)
} }
} }
switch (odesc->class) switch (odesc->op_class)
{ {
case IA64_OPND_CLASS_CST: case IA64_OPND_CLASS_CST:
(*info->fprintf_func) (info->stream, "%s", odesc->str); (*info->fprintf_func) (info->stream, "%s", odesc->str);

View file

@ -696,7 +696,7 @@ m88kdis (bfd_vma pc,
unsigned int opcode; unsigned int opcode;
const HASHTAB *entry_ptr; const HASHTAB *entry_ptr;
int opmask; int opmask;
unsigned int class; unsigned int in_class;
if (! ihashtab_initialized) if (! ihashtab_initialized)
{ {
@ -706,17 +706,17 @@ m88kdis (bfd_vma pc,
/* Create the appropriate mask to isolate the opcode. */ /* Create the appropriate mask to isolate the opcode. */
opmask = DEFMASK; opmask = DEFMASK;
class = instruction & DEFMASK; in_class = instruction & DEFMASK;
if ((class >= SFU0) && (class <= SFU7)) if ((in_class >= SFU0) && (in_class <= SFU7))
{ {
if (instruction < SFU1) if (instruction < SFU1)
opmask = CTRLMASK; opmask = CTRLMASK;
else else
opmask = SFUMASK; opmask = SFUMASK;
} }
else if (class == RRR) else if (in_class == RRR)
opmask = RRRMASK; opmask = RRRMASK;
else if (class == RRI10) else if (in_class == RRI10)
opmask = RRI10MASK; opmask = RRI10MASK;
/* Isolate the opcode. */ /* Isolate the opcode. */

View file

@ -219,7 +219,7 @@ const int tic80_num_predefined_symbols = sizeof (tic80_predefined_symbols) / siz
in CLASS, and translates it to a numeric value, which it returns. in CLASS, and translates it to a numeric value, which it returns.
If CLASS is zero, any symbol that matches NAME is translated. If If CLASS is zero, any symbol that matches NAME is translated. If
CLASS is non-zero, then only a symbol that has class CLASS is CLASS is non-zero, then only a symbol that has symbol_class CLASS is
matched. matched.
If no translation is possible, it returns -1, a value not used by If no translation is possible, it returns -1, a value not used by
@ -233,9 +233,9 @@ const int tic80_num_predefined_symbols = sizeof (tic80_predefined_symbols) / siz
*/ */
int int
tic80_symbol_to_value (name, class) tic80_symbol_to_value (name, symbol_class)
char *name; char *name;
int class; int symbol_class;
{ {
const struct predefined_symbol *pdsp; const struct predefined_symbol *pdsp;
int low = 0; int low = 0;
@ -259,7 +259,7 @@ tic80_symbol_to_value (name, class)
else else
{ {
pdsp = &tic80_predefined_symbols[middle]; pdsp = &tic80_predefined_symbols[middle];
if ((class == 0) || (class & PDS_VALUE (pdsp))) if ((symbol_class == 0) || (symbol_class & PDS_VALUE (pdsp)))
{ {
rtnval = PDS_VALUE (pdsp); rtnval = PDS_VALUE (pdsp);
} }
@ -271,13 +271,13 @@ tic80_symbol_to_value (name, class)
} }
/* This function takes a value VAL and finds a matching predefined /* This function takes a value VAL and finds a matching predefined
symbol that is in the operand class specified by CLASS. If CLASS symbol that is in the operand symbol_class specified by CLASS. If CLASS
is zero, the first matching symbol is returned. */ is zero, the first matching symbol is returned. */
const char * const char *
tic80_value_to_symbol (val, class) tic80_value_to_symbol (val, symbol_class)
int val; int val;
int class; int symbol_class;
{ {
const struct predefined_symbol *pdsp; const struct predefined_symbol *pdsp;
int ival; int ival;
@ -291,7 +291,7 @@ tic80_value_to_symbol (val, class)
ival = PDS_VALUE (pdsp) & ~TIC80_OPERAND_MASK; ival = PDS_VALUE (pdsp) & ~TIC80_OPERAND_MASK;
if (ival == val) if (ival == val)
{ {
if ((class == 0) || (class & PDS_VALUE (pdsp))) if ((symbol_class == 0) || (symbol_class & PDS_VALUE (pdsp)))
{ {
/* Found the desired match */ /* Found the desired match */
name = PDS_NAME (pdsp); name = PDS_NAME (pdsp);