This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
I have updated this patch, and also written one for the keyword new. Build and ran "make check" without any new errors for the following targets: alpha-freebsd alpha-linux arc-elf arm-aout arm-eabi cr16-linux cris-linux crx-linux d30v-linux dlx-elf hppa-linux i370-linux i686-linux i960-elf ia64-linux iq2000-elf m32c-elf m32r-linux m68hc11-linux m68k-linux mcore-elf mep-elf microblaze-elf microblaze-elf mips-linux mmix-linux mn10300-linux moxie-elf ns32k-netbsd pdp11-aout pj-linux ppc-linux rs6000-aix4 s390-linux score-elf sh-elf sh-linux sh64-linux sparc-linux spu-elf tic4x-coff vax-linux x86_64-linux x86_64-linux xtensa-linux z8k-coff Thanks, Martin
Attachment:
class.changelog
Description: Binary data
diff -prc src.head/bfd/coff-arm.c src.class/bfd/coff-arm.c *** src.head/bfd/coff-arm.c Tue Jun 16 09:07:18 2009 --- src.class/bfd/coff-arm.c Wed Aug 19 16:46:10 2009 *************** coff_arm_relocate_section (bfd *output_b *** 1332,1339 **** if (howto->type == ARM_26) { ! if ( h->class == C_THUMBSTATFUNC ! || h->class == C_THUMBEXTFUNC) { /* Arm code calling a Thumb function. */ unsigned long int tmp; --- 1332,1339 ---- if (howto->type == ARM_26) { ! if ( h->symbol_class == C_THUMBSTATFUNC ! || h->symbol_class == C_THUMBEXTFUNC) { /* Arm code calling a Thumb function. */ unsigned long int tmp; *************** coff_arm_relocate_section (bfd *output_b *** 1419,1427 **** /* 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) { /* Thumb code calling an ARM function. */ asection * s = 0; --- 1419,1427 ---- /* Note: We used to check for ARM_THUMB9 and ARM_THUMB12. */ else if (howto->type == ARM_THUMB23) { ! 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; *************** coff_arm_relocate_section (bfd *output_b *** 1721,1728 **** int patchit = FALSE; if (h != NULL ! && ( h->class == C_THUMBSTATFUNC ! || h->class == C_THUMBEXTFUNC)) { patchit = TRUE; } --- 1721,1728 ---- int patchit = FALSE; if (h != NULL ! && ( h->symbol_class == C_THUMBSTATFUNC ! || h->symbol_class == C_THUMBEXTFUNC)) { patchit = TRUE; } *************** record_thumb_to_arm_glue (struct bfd_lin *** 1932,1938 **** /* If we mark it 'thumb', the disassembler will do a better job. */ myh = (struct coff_link_hash_entry *) bh; ! myh->class = C_THUMBEXTFUNC; free (tmp_name); --- 1932,1938 ---- /* If we mark it 'thumb', the disassembler will do a better job. */ myh = (struct coff_link_hash_entry *) bh; ! myh->symbol_class = C_THUMBEXTFUNC; free (tmp_name); *************** bfd_arm_process_before_allocation (bfd * *** 2096,2102 **** the target of the call. If it is a thumb target, we insert glue. */ ! if (h->class == C_THUMBEXTFUNC) record_arm_to_thumb_glue (info, h); break; --- 2096,2102 ---- the target of the call. If it is a thumb target, we insert glue. */ ! if (h->symbol_class == C_THUMBEXTFUNC) record_arm_to_thumb_glue (info, h); break; *************** bfd_arm_process_before_allocation (bfd * *** 2110,2116 **** for it. This is not really a problem, since the link is doomed anyway. */ ! switch (h->class) { case C_EXT: case C_STAT: --- 2110,2116 ---- for it. This is not really a problem, since the link is doomed anyway. */ ! switch (h->symbol_class) { case C_EXT: case C_STAT: diff -prc src.head/bfd/coff-i960.c src.class/bfd/coff-i960.c *** src.head/bfd/coff-i960.c Tue Jun 16 09:07:18 2009 --- src.class/bfd/coff-i960.c Sun Aug 16 14:10:35 2009 *************** coff_i960_relocate_section (output_bfd, *** 488,501 **** if (howto->type == R_OPTCALL && ! info->relocatable && symndx != -1) { ! int class; if (h != NULL) ! class = h->class; else ! class = sym->n_sclass; ! switch (class) { case C_NULL: /* This symbol is apparently not from a COFF input file. --- 488,501 ---- if (howto->type == R_OPTCALL && ! info->relocatable && symndx != -1) { ! int class_val; if (h != NULL) ! class_val = h->symbol_class; else ! class_val = sym->n_sclass; ! switch (class_val) { case C_NULL: /* This symbol is apparently not from a COFF input file. diff -prc src.head/bfd/coff-rs6000.c src.class/bfd/coff-rs6000.c *** src.head/bfd/coff-rs6000.c Tue Jun 16 09:07:18 2009 --- src.class/bfd/coff-rs6000.c Sun Aug 16 14:10:35 2009 *************** _bfd_xcoff_swap_sym_out (abfd, inp, extp *** 495,505 **** } void ! _bfd_xcoff_swap_aux_in (abfd, ext1, type, class, indx, numaux, in1) bfd *abfd; PTR ext1; int type; ! int class; int indx; int numaux; PTR in1; --- 495,505 ---- } void ! _bfd_xcoff_swap_aux_in (abfd, ext1, type, in_class, indx, numaux, in1) bfd *abfd; PTR ext1; int type; ! int in_class; int indx; int numaux; PTR in1; *************** _bfd_xcoff_swap_aux_in (abfd, ext1, type *** 507,513 **** AUXENT * ext = (AUXENT *)ext1; union internal_auxent *in = (union internal_auxent *)in1; ! switch (class) { case C_FILE: if (ext->x_file.x_fname[0] == 0) --- 507,513 ---- AUXENT * ext = (AUXENT *)ext1; union internal_auxent *in = (union internal_auxent *)in1; ! switch (in_class) { case C_FILE: if (ext->x_file.x_fname[0] == 0) *************** _bfd_xcoff_swap_aux_in (abfd, ext1, type *** 573,579 **** 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)) { in->x_sym.x_fcnary.x_fcn.x_lnnoptr = H_GET_32 (abfd, ext->x_sym.x_fcnary.x_fcn.x_lnnoptr); --- 573,580 ---- 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 (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); *************** unsigned int _bfd_xcoff_swap_aux_out *** 614,624 **** PARAMS ((bfd *, PTR, int, int, int, int, PTR)); unsigned int ! _bfd_xcoff_swap_aux_out (abfd, inp, type, class, indx, numaux, extp) bfd * abfd; PTR inp; int type; ! int class; int indx ATTRIBUTE_UNUSED; int numaux ATTRIBUTE_UNUSED; PTR extp; --- 615,625 ---- PARAMS ((bfd *, PTR, int, int, int, int, PTR)); unsigned int ! _bfd_xcoff_swap_aux_out (abfd, inp, type, in_class, indx, numaux, extp) bfd * abfd; PTR inp; int type; ! int in_class; int indx ATTRIBUTE_UNUSED; int numaux ATTRIBUTE_UNUSED; PTR extp; *************** _bfd_xcoff_swap_aux_out (abfd, inp, type *** 627,633 **** AUXENT *ext = (AUXENT *)extp; memset ((PTR)ext, 0, bfd_coff_auxesz (abfd)); ! switch (class) { case C_FILE: if (in->x_file.x_fname[0] == 0) --- 628,634 ---- AUXENT *ext = (AUXENT *)extp; memset ((PTR)ext, 0, bfd_coff_auxesz (abfd)); ! switch (in_class) { case C_FILE: if (in->x_file.x_fname[0] == 0) *************** _bfd_xcoff_swap_aux_out (abfd, inp, type *** 677,683 **** 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)) { H_PUT_32 (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr, ext->x_sym.x_fcnary.x_fcn.x_lnnoptr); --- 678,685 ---- 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 (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 -prc src.head/bfd/coff-stgo32.c src.class/bfd/coff-stgo32.c *** src.head/bfd/coff-stgo32.c Fri Aug 14 10:58:55 2009 --- src.class/bfd/coff-stgo32.c Wed Aug 19 16:52:03 2009 *************** adjust_scnhdr_out_post (abfd, in, out) *** 218,271 **** } static void ! adjust_aux_in_post (abfd, ext1, type, class, indx, numaux, in1) bfd *abfd ATTRIBUTE_UNUSED; PTR ext1 ATTRIBUTE_UNUSED; int type; ! int 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)) { 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) bfd *abfd ATTRIBUTE_UNUSED; PTR inp; int type; ! int 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)) { 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) bfd *abfd ATTRIBUTE_UNUSED; PTR inp; int type; ! int 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)) { ADJUST_VAL (in->x_sym.x_fcnary.x_fcn.x_lnnoptr, GO32_STUBSIZE); } --- 218,274 ---- } static void ! adjust_aux_in_post (abfd, ext1, type, in_class, indx, numaux, in1) bfd *abfd ATTRIBUTE_UNUSED; PTR ext1 ATTRIBUTE_UNUSED; int type; ! int in_class; int indx ATTRIBUTE_UNUSED; int numaux ATTRIBUTE_UNUSED; PTR in1; { union internal_auxent *in = (union internal_auxent *) in1; ! 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, in_class, indx, numaux, extp) bfd *abfd ATTRIBUTE_UNUSED; PTR inp; int type; ! int in_class; int indx ATTRIBUTE_UNUSED; int numaux ATTRIBUTE_UNUSED; PTR extp ATTRIBUTE_UNUSED; { union internal_auxent *in = (union internal_auxent *) inp; ! 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, in_class, indx, numaux, extp) bfd *abfd ATTRIBUTE_UNUSED; PTR inp; int type; ! int in_class; int indx ATTRIBUTE_UNUSED; int numaux ATTRIBUTE_UNUSED; PTR extp ATTRIBUTE_UNUSED; { union internal_auxent *in = (union internal_auxent *) inp; ! 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 -prc src.head/bfd/coff64-rs6000.c src.class/bfd/coff64-rs6000.c *** src.head/bfd/coff64-rs6000.c Tue Jun 16 09:07:18 2009 --- src.class/bfd/coff64-rs6000.c Wed Aug 26 10:21:30 2009 *************** _bfd_xcoff64_swap_sym_out (abfd, inp, ex *** 353,363 **** } static void ! _bfd_xcoff64_swap_aux_in (abfd, ext1, type, class, indx, numaux, in1) bfd *abfd; PTR ext1; int type; ! int class; int indx; int numaux; PTR in1; --- 353,363 ---- } static void ! _bfd_xcoff64_swap_aux_in (abfd, ext1, type, in_class, indx, numaux, in1) bfd *abfd; PTR ext1; int type; ! int in_class; int indx; int numaux; PTR in1; *************** _bfd_xcoff64_swap_aux_in (abfd, ext1, ty *** 365,371 **** union external_auxent *ext = (union external_auxent *) ext1; union internal_auxent *in = (union internal_auxent *) in1; ! switch (class) { case C_FILE: if (ext->x_file.x_n.x_zeroes[0] == 0) --- 365,371 ---- union external_auxent *ext = (union external_auxent *) ext1; union internal_auxent *in = (union internal_auxent *) in1; ! switch (in_class) { case C_FILE: if (ext->x_file.x_n.x_zeroes[0] == 0) *************** _bfd_xcoff64_swap_aux_in (abfd, ext1, ty *** 420,426 **** break; } ! if (class == C_BLOCK || class == C_FCN || ISFCN (type) || ISTAG (class)) { in->x_sym.x_fcnary.x_fcn.x_lnnoptr = H_GET_64 (abfd, ext->x_sym.x_fcnary.x_fcn.x_lnnoptr); --- 420,427 ---- break; } ! 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); *************** _bfd_xcoff64_swap_aux_in (abfd, ext1, ty *** 444,454 **** } static unsigned int ! _bfd_xcoff64_swap_aux_out (abfd, inp, type, class, indx, numaux, extp) bfd *abfd; PTR inp; int type; ! int class; int indx ATTRIBUTE_UNUSED; int numaux ATTRIBUTE_UNUSED; PTR extp; --- 445,455 ---- } static unsigned int ! _bfd_xcoff64_swap_aux_out (abfd, inp, type, in_class, indx, numaux, extp) bfd *abfd; PTR inp; int type; ! int in_class; int indx ATTRIBUTE_UNUSED; int numaux ATTRIBUTE_UNUSED; PTR extp; *************** _bfd_xcoff64_swap_aux_out (abfd, inp, ty *** 457,463 **** union external_auxent *ext = (union external_auxent *) extp; memset ((PTR) ext, 0, bfd_coff_auxesz (abfd)); ! switch (class) { case C_FILE: if (in->x_file.x_n.x_zeroes == 0) --- 458,464 ---- union external_auxent *ext = (union external_auxent *) extp; memset ((PTR) ext, 0, bfd_coff_auxesz (abfd)); ! switch (in_class) { case C_FILE: if (in->x_file.x_n.x_zeroes == 0) *************** _bfd_xcoff64_swap_aux_out (abfd, inp, ty *** 506,512 **** break; } ! if (class == C_BLOCK || class == C_FCN || ISFCN (type) || ISTAG (class)) { H_PUT_64 (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr, ext->x_sym.x_fcnary.x_fcn.x_lnnoptr); --- 507,514 ---- break; } ! 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 -prc src.head/bfd/coffcode.h src.class/bfd/coffcode.h *** src.head/bfd/coffcode.h Fri Aug 14 10:58:55 2009 --- src.class/bfd/coffcode.h Sun Aug 16 14:10:35 2009 *************** coff_pointerize_aux_hook (bfd *abfd ATTR *** 2443,2451 **** unsigned int indaux, combined_entry_type *aux) { ! int class = symbol->u.syment.n_sclass; ! if (CSECT_SYM_P (class) && indaux + 1 == symbol->u.syment.n_numaux) { if (SMTYP_SMTYP (aux->u.auxent.x_csect.x_smtyp) == XTY_LD) --- 2443,2451 ---- unsigned int indaux, combined_entry_type *aux) { ! int n_sclass = symbol->u.syment.n_sclass; ! 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) Only in src.class/bfd: coffcode.h.orig diff -prc src.head/bfd/coffgen.c src.class/bfd/coffgen.c *** src.head/bfd/coffgen.c Tue Jun 16 09:07:18 2009 --- src.class/bfd/coffgen.c Sun Aug 16 15:00:09 2009 *************** coff_write_symbol (bfd *abfd, *** 912,918 **** { unsigned int numaux = native->u.syment.n_numaux; int type = native->u.syment.n_type; ! int class = native->u.syment.n_sclass; void * buf; bfd_size_type symesz; --- 912,918 ---- { unsigned int numaux = native->u.syment.n_numaux; int type = native->u.syment.n_type; ! int n_sclass = native->u.syment.n_sclass; void * buf; bfd_size_type symesz; *************** coff_write_symbol (bfd *abfd, *** 958,964 **** { bfd_coff_swap_aux_out (abfd, &((native + j + 1)->u.auxent), ! type, class, (int) j, native->u.syment.n_numaux, buf); if (bfd_bwrite (buf, auxesz, abfd) != auxesz) --- 958,964 ---- { bfd_coff_swap_aux_out (abfd, &((native + j + 1)->u.auxent), ! type, n_sclass, (int) j, native->u.syment.n_numaux, buf); if (bfd_bwrite (buf, auxesz, abfd) != auxesz) *************** coff_write_symbols (bfd *abfd) *** 1156,1162 **** if (coff_backend_info (abfd)->_bfd_coff_classify_symbol != NULL) { bfd_error_handler_type current_error_handler; ! enum coff_symbol_classification class; unsigned char *n_sclass; /* Suppress error reporting by bfd_coff_classify_symbol. --- 1156,1162 ---- if (coff_backend_info (abfd)->_bfd_coff_classify_symbol != NULL) { bfd_error_handler_type current_error_handler; ! enum coff_symbol_classification sym_class; unsigned char *n_sclass; /* Suppress error reporting by bfd_coff_classify_symbol. *************** coff_write_symbols (bfd *abfd) *** 1164,1172 **** 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); (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) --- 1164,1173 ---- 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); ! 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) *************** coff_write_symbols (bfd *abfd) *** 1178,1187 **** 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) *n_sclass = C_STAT; else if (symbol->flags & BSF_GLOBAL ! && (class != COFF_SYMBOL_GLOBAL #ifdef COFF_WITH_PE || *n_sclass == C_NT_WEAK #endif --- 1179,1188 ---- if (symbol->flags & BSF_WEAK) *n_sclass = obj_pe (abfd) ? C_NT_WEAK : C_WEAKEXT; ! else if (symbol->flags & BSF_LOCAL && sym_class != COFF_SYMBOL_LOCAL) *n_sclass = C_STAT; else if (symbol->flags & BSF_GLOBAL ! && (sym_class != COFF_SYMBOL_GLOBAL #ifdef COFF_WITH_PE || *n_sclass == C_NT_WEAK #endif *************** coff_pointerize_aux (bfd *abfd, *** 1390,1396 **** combined_entry_type *auxent) { unsigned int type = symbol->u.syment.n_type; ! unsigned int class = symbol->u.syment.n_sclass; if (coff_backend_info (abfd)->_bfd_coff_pointerize_aux_hook) { --- 1391,1397 ---- combined_entry_type *auxent) { unsigned int type = symbol->u.syment.n_type; ! unsigned int n_sclass = symbol->u.syment.n_sclass; if (coff_backend_info (abfd)->_bfd_coff_pointerize_aux_hook) { *************** coff_pointerize_aux (bfd *abfd, *** 1400,1415 **** } /* Don't bother if this is a file or a section. */ ! if (class == C_STAT && type == T_NULL) return; ! if (class == 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) && 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 = --- 1401,1417 ---- } /* Don't bother if this is a file or a section. */ ! if (n_sclass == C_STAT && type == T_NULL) return; ! 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 (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 = *************** coff_sizeof_headers (bfd *abfd, struct b *** 2316,2322 **** bfd_boolean bfd_coff_set_symbol_class (bfd * abfd, asymbol * symbol, ! unsigned int class) { coff_symbol_type * csym; --- 2318,2324 ---- bfd_boolean bfd_coff_set_symbol_class (bfd * abfd, asymbol * symbol, ! unsigned int symbol_class) { coff_symbol_type * csym; *************** bfd_coff_set_symbol_class (bfd * *** 2341,2347 **** return FALSE; native->u.syment.n_type = T_NULL; ! native->u.syment.n_sclass = class; if (bfd_is_und_section (symbol->section)) { --- 2343,2349 ---- return FALSE; native->u.syment.n_type = T_NULL; ! native->u.syment.n_sclass = symbol_class; if (bfd_is_und_section (symbol->section)) { *************** bfd_coff_set_symbol_class (bfd * *** 2370,2376 **** csym->native = native; } else ! csym->native->u.syment.n_sclass = class; return TRUE; } --- 2372,2378 ---- csym->native = native; } else ! csym->native->u.syment.n_sclass = symbol_class; return TRUE; } diff -prc src.head/bfd/cofflink.c src.class/bfd/cofflink.c *** src.head/bfd/cofflink.c Tue Jun 16 09:07:18 2009 --- src.class/bfd/cofflink.c Sun Aug 16 14:10:35 2009 *************** _bfd_coff_link_hash_newfunc (struct bfd_ *** 79,85 **** /* Set local fields. */ ret->indx = -1; ret->type = T_NULL; ! ret->class = C_NULL; ret->numaux = 0; ret->auxbfd = NULL; ret->aux = NULL; --- 79,85 ---- /* Set local fields. */ ret->indx = -1; ret->type = T_NULL; ! ret->symbol_class = C_NULL; ret->numaux = 0; ret->auxbfd = NULL; ret->aux = NULL; *************** coff_link_add_symbols (bfd *abfd, *** 488,501 **** 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 && (*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; if (sym.n_type != T_NULL) { /* We want to warn if the type changed, but not --- 488,501 ---- 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)->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)->symbol_class = sym.n_sclass; if (sym.n_type != T_NULL) { /* We want to warn if the type changed, but not *************** _bfd_coff_link_input_bfd (struct coff_fi *** 1605,1611 **** mt = bfd_alloc (input_bfd, amt); if (mt == NULL) return FALSE; ! mt->class = isym.n_sclass; /* Pick up the aux entry, which points to the end of the tag entries. */ --- 1605,1611 ---- mt = bfd_alloc (input_bfd, amt); if (mt == NULL) return FALSE; ! mt->type_class = isym.n_sclass; /* Pick up the aux entry, which points to the end of the tag entries. */ *************** _bfd_coff_link_input_bfd (struct coff_fi *** 1694,1700 **** { struct coff_debug_merge_element *me, *mel; ! if (mtl->class != mt->class) continue; for (me = mt->elements, mel = mtl->elements; --- 1694,1700 ---- { struct coff_debug_merge_element *me, *mel; ! if (mtl->type_class != mt->type_class) continue; for (me = mt->elements, mel = mtl->elements; *************** _bfd_coff_write_global_sym (struct coff_ *** 2556,2562 **** isym._n._n_n._n_offset = STRING_SIZE_SIZE + indx; } ! isym.n_sclass = h->class; isym.n_type = h->type; if (isym.n_sclass == C_NULL) --- 2556,2562 ---- isym._n._n_n._n_offset = STRING_SIZE_SIZE + indx; } ! isym.n_sclass = h->symbol_class; isym.n_type = h->type; if (isym.n_sclass == C_NULL) *************** _bfd_coff_generic_relocate_section (bfd *** 2942,2948 **** else if (h->root.type == bfd_link_hash_undefweak) { ! if (h->class == C_NT_WEAK && h->numaux == 1) { /* See _Microsoft Portable Executable and Common Object File Format Specification_, section 5.5.3. --- 2942,2948 ---- else if (h->root.type == bfd_link_hash_undefweak) { ! 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 -prc src.head/bfd/coffswap.h src.class/bfd/coffswap.h *** src.head/bfd/coffswap.h Tue Jun 16 09:07:18 2009 --- src.class/bfd/coffswap.h Thu Aug 27 09:16:28 2009 *************** static void *** 382,388 **** coff_swap_aux_in (bfd *abfd, void * ext1, int type, ! int class, int indx, int numaux, void * in1) --- 382,388 ---- coff_swap_aux_in (bfd *abfd, void * ext1, int type, ! int in_class, int indx, int numaux, void * in1) *************** coff_swap_aux_in (bfd *abfd, *** 391,400 **** 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); #endif ! switch (class) { case C_FILE: if (ext->x_file.x_fname[0] == 0) --- 391,400 ---- union internal_auxent *in = (union internal_auxent *) in1; #ifdef COFF_ADJUST_AUX_IN_PRE ! COFF_ADJUST_AUX_IN_PRE (abfd, ext1, type, in_class, indx, numaux, in1); #endif ! switch (in_class) { case C_FILE: if (ext->x_file.x_fname[0] == 0) *************** coff_swap_aux_in (bfd *abfd, *** 446,452 **** 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)) { 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); --- 446,453 ---- in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx); #endif ! 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); *************** coff_swap_aux_in (bfd *abfd, *** 477,483 **** end: ; #ifdef COFF_ADJUST_AUX_IN_POST ! COFF_ADJUST_AUX_IN_POST (abfd, ext1, type, class, indx, numaux, in1); #endif } --- 478,484 ---- end: ; #ifdef COFF_ADJUST_AUX_IN_POST ! COFF_ADJUST_AUX_IN_POST (abfd, ext1, type, in_class, indx, numaux, in1); #endif } *************** static unsigned int *** 485,491 **** coff_swap_aux_out (bfd * abfd, void * inp, int type, ! int class, int indx ATTRIBUTE_UNUSED, int numaux ATTRIBUTE_UNUSED, void * extp) --- 486,492 ---- coff_swap_aux_out (bfd * abfd, void * inp, int type, ! int in_class, int indx ATTRIBUTE_UNUSED, int numaux ATTRIBUTE_UNUSED, void * extp) *************** coff_swap_aux_out (bfd * abfd, *** 494,505 **** AUXENT *ext = (AUXENT *) extp; #ifdef COFF_ADJUST_AUX_OUT_PRE ! COFF_ADJUST_AUX_OUT_PRE (abfd, inp, type, class, indx, numaux, extp); #endif memset (ext, 0, AUXESZ); ! switch (class) { case C_FILE: if (in->x_file.x_fname[0] == 0) --- 495,506 ---- AUXENT *ext = (AUXENT *) extp; #ifdef COFF_ADJUST_AUX_OUT_PRE ! COFF_ADJUST_AUX_OUT_PRE (abfd, inp, type, in_class, indx, numaux, extp); #endif memset (ext, 0, AUXESZ); ! switch (in_class) { case C_FILE: if (in->x_file.x_fname[0] == 0) *************** coff_swap_aux_out (bfd * abfd, *** 537,543 **** 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)) { 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); --- 538,545 ---- H_PUT_16 (abfd, in->x_sym.x_tvndx, ext->x_sym.x_tvndx); #endif ! 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); *************** coff_swap_aux_out (bfd * abfd, *** 567,573 **** end: #ifdef COFF_ADJUST_AUX_OUT_POST ! COFF_ADJUST_AUX_OUT_POST (abfd, inp, type, class, indx, numaux, extp); #endif return AUXESZ; } --- 569,575 ---- end: #ifdef COFF_ADJUST_AUX_OUT_POST ! COFF_ADJUST_AUX_OUT_POST (abfd, inp, type, in_class, indx, numaux, extp); #endif return AUXESZ; } diff -prc src.head/bfd/libcoff-in.h src.class/bfd/libcoff-in.h *** src.head/bfd/libcoff-in.h Fri Aug 14 10:59:08 2009 --- src.class/bfd/libcoff-in.h Wed Aug 19 10:35:53 2009 *************** struct coff_link_hash_entry *** 254,260 **** unsigned short type; /* Symbol class. */ ! unsigned char class; /* Number of auxiliary entries. */ char numaux; --- 254,260 ---- unsigned short type; /* Symbol class. */ ! unsigned char symbol_class; /* Number of auxiliary entries. */ char numaux; *************** struct coff_debug_merge_type *** 394,400 **** struct coff_debug_merge_type *next; /* Class of type. */ ! int class; /* Symbol index where this type is defined. */ long indx; --- 394,400 ---- struct coff_debug_merge_type *next; /* Class of type. */ ! int type_class; /* Symbol index where this type is defined. */ long indx; *************** extern bfd_boolean ppc_allocate_toc_sect *** 603,606 **** (struct bfd_link_info *); extern bfd_boolean ppc_process_before_allocation (bfd *, struct bfd_link_info *); - --- 603,605 ---- Only in src.class/bfd: libcoff-in.h.orig diff -prc src.head/bfd/libcoff.h src.class/bfd/libcoff.h *** src.head/bfd/libcoff.h Fri Aug 14 10:59:08 2009 --- src.class/bfd/libcoff.h Wed Aug 19 10:35:59 2009 *************** struct coff_link_hash_entry *** 258,264 **** unsigned short type; /* Symbol class. */ ! unsigned char class; /* Number of auxiliary entries. */ char numaux; --- 258,264 ---- unsigned short type; /* Symbol class. */ ! unsigned char symbol_class; /* Number of auxiliary entries. */ char numaux; *************** struct coff_debug_merge_type *** 398,404 **** struct coff_debug_merge_type *next; /* Class of type. */ ! int class; /* Symbol index where this type is defined. */ long indx; --- 398,404 ---- struct coff_debug_merge_type *next; /* Class of type. */ ! int type_class; /* Symbol index where this type is defined. */ long indx; *************** extern bfd_boolean ppc_allocate_toc_sect *** 607,613 **** (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 { --- 607,612 ---- Only in src.class/bfd: libcoff.h.old Only in src.class/bfd: libcoff.h.orig diff -prc src.head/bfd/peXXigen.c src.class/bfd/peXXigen.c *** src.head/bfd/peXXigen.c Tue Jun 16 09:07:20 2009 --- src.class/bfd/peXXigen.c Sun Aug 16 14:10:36 2009 *************** void *** 231,237 **** _bfd_XXi_swap_aux_in (bfd * abfd, void * ext1, int type, ! int class, int indx ATTRIBUTE_UNUSED, int numaux ATTRIBUTE_UNUSED, void * in1) --- 231,237 ---- _bfd_XXi_swap_aux_in (bfd * abfd, void * ext1, int type, ! int in_class, int indx ATTRIBUTE_UNUSED, int numaux ATTRIBUTE_UNUSED, void * in1) *************** _bfd_XXi_swap_aux_in (bfd * abfd, *** 239,245 **** AUXENT *ext = (AUXENT *) ext1; union internal_auxent *in = (union internal_auxent *) in1; ! switch (class) { case C_FILE: if (ext->x_file.x_fname[0] == 0) --- 239,245 ---- AUXENT *ext = (AUXENT *) ext1; union internal_auxent *in = (union internal_auxent *) in1; ! switch (in_class) { case C_FILE: if (ext->x_file.x_fname[0] == 0) *************** _bfd_XXi_swap_aux_in (bfd * abfd, *** 270,276 **** 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)) { 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); --- 270,277 ---- 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 (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); *************** unsigned int *** 302,308 **** _bfd_XXi_swap_aux_out (bfd * abfd, void * inp, int type, ! int class, int indx ATTRIBUTE_UNUSED, int numaux ATTRIBUTE_UNUSED, void * extp) --- 303,309 ---- _bfd_XXi_swap_aux_out (bfd * abfd, void * inp, int type, ! int in_class, int indx ATTRIBUTE_UNUSED, int numaux ATTRIBUTE_UNUSED, void * extp) *************** _bfd_XXi_swap_aux_out (bfd * abfd, *** 312,318 **** memset (ext, 0, AUXESZ); ! switch (class) { case C_FILE: if (in->x_file.x_fname[0] == 0) --- 313,319 ---- memset (ext, 0, AUXESZ); ! switch (in_class) { case C_FILE: if (in->x_file.x_fname[0] == 0) *************** _bfd_XXi_swap_aux_out (bfd * abfd, *** 344,350 **** 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)) { 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); --- 345,352 ---- 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 (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 -prc src.head/bfd/pef.c src.class/bfd/pef.c *** src.head/bfd/pef.c Tue Jun 16 09:07:20 2009 --- src.class/bfd/pef.c Wed Aug 19 17:01:26 2009 *************** bfd_pef_parse_imported_symbol (bfd *abfd *** 361,367 **** BFD_ASSERT (len == 4); value = bfd_getb32 (buf); ! symbol->class = value >> 24; symbol->name = value & 0x00ffffff; return 0; --- 361,367 ---- BFD_ASSERT (len == 4); value = bfd_getb32 (buf); ! symbol->symbol_class = value >> 24; symbol->name = value & 0x00ffffff; return 0; diff -prc src.head/bfd/pef.h src.class/bfd/pef.h *** src.head/bfd/pef.h Tue Jun 16 09:07:21 2009 --- src.class/bfd/pef.h Wed Aug 19 17:01:27 2009 *************** enum bfd_pef_imported_library_options *** 79,85 **** struct bfd_pef_imported_symbol { ! unsigned char class; unsigned long name; }; typedef struct bfd_pef_imported_symbol bfd_pef_imported_symbol; --- 79,85 ---- struct bfd_pef_imported_symbol { ! unsigned char symbol_class; unsigned long name; }; typedef struct bfd_pef_imported_symbol bfd_pef_imported_symbol; diff -prc src.head/binutils/ieee.c src.class/binutils/ieee.c *** src.head/binutils/ieee.c Tue Jun 16 09:07:12 2009 --- src.class/binutils/ieee.c Sun Aug 16 14:10:36 2009 *************** ieee_read_cxx_misc (struct ieee_info *in *** 2500,2506 **** case 'z': { ! const char *name, *mangled, *class; unsigned long namlen, mangledlen, classlen; bfd_vma control; --- 2500,2506 ---- case 'z': { ! const char *name, *mangled, *cxx_class; unsigned long namlen, mangledlen, classlen; bfd_vma control; *************** ieee_read_cxx_misc (struct ieee_info *in *** 2508,2514 **** if (! ieee_require_atn65 (info, pp, &name, &namlen) || ! ieee_require_atn65 (info, pp, &mangled, &mangledlen) ! || ! ieee_require_atn65 (info, pp, &class, &classlen) || ! ieee_require_asn (info, pp, &control)) return FALSE; --- 2508,2514 ---- if (! ieee_require_atn65 (info, pp, &name, &namlen) || ! ieee_require_atn65 (info, pp, &mangled, &mangledlen) ! || ! ieee_require_atn65 (info, pp, &cxx_class, &classlen) || ! ieee_require_asn (info, pp, &control)) return FALSE; *************** ieee_read_cxx_class (struct ieee_info *i *** 2533,2539 **** unsigned long count) { const bfd_byte *start; ! bfd_vma class; const char *tag; unsigned long taglen; struct ieee_tag *it; --- 2533,2539 ---- unsigned long count) { const bfd_byte *start; ! bfd_vma cxx_class; const char *tag; unsigned long taglen; struct ieee_tag *it; *************** ieee_read_cxx_class (struct ieee_info *i *** 2558,2564 **** start = *pp; ! if (! ieee_require_asn (info, pp, &class)) return FALSE; --count; --- 2558,2564 ---- start = *pp; ! if (! ieee_require_asn (info, pp, &cxx_class)) return FALSE; --count; *************** ieee_read_cxx_class (struct ieee_info *i *** 3180,3186 **** it->slot. We update it->slot to automatically update all references to this struct. */ it->slot = debug_make_object_type (dhandle, ! class != 'u', debug_get_type_size (dhandle, it->slot), fields, baseclasses, dmethods, --- 3180,3186 ---- it->slot. We update it->slot to automatically update all references to this struct. */ it->slot = debug_make_object_type (dhandle, ! cxx_class != 'u', debug_get_type_size (dhandle, it->slot), fields, baseclasses, dmethods, *************** ieee_read_reference (struct ieee_info *i *** 3303,3309 **** { const bfd_byte *start; bfd_vma flags; ! const char *class, *name; unsigned long classlen, namlen; debug_type *pslot; debug_type target; --- 3303,3309 ---- { const bfd_byte *start; bfd_vma flags; ! const char *cxx_class, *name; unsigned long classlen, namlen; debug_type *pslot; debug_type target; *************** ieee_read_reference (struct ieee_info *i *** 3317,3323 **** the spec. */ if (flags == 3) { ! if (! ieee_require_atn65 (info, pp, &class, &classlen)) return FALSE; } --- 3317,3323 ---- the spec. */ if (flags == 3) { ! if (! ieee_require_atn65 (info, pp, &cxx_class, &classlen)) return FALSE; } *************** ieee_read_reference (struct ieee_info *i *** 3407,3414 **** for (it = info->tags; it != NULL; it = it->next) { ! if (it->name[0] == class[0] ! && strncmp (it->name, class, classlen) == 0 && strlen (it->name) == classlen) { if (it->fslots != NULL) --- 3407,3414 ---- for (it = info->tags; it != NULL; it = it->next) { ! if (it->name[0] == cxx_class[0] ! && strncmp (it->name, cxx_class, classlen) == 0 && strlen (it->name) == classlen) { if (it->fslots != NULL) Only in src.head: cvs.diff diff -prc src.head/gas/config/tc-arc.c src.class/gas/config/tc-arc.c *** src.head/gas/config/tc-arc.c Fri Aug 14 10:59:49 2009 --- src.class/gas/config/tc-arc.c Sun Aug 16 14:10:36 2009 *************** const struct syntax_classes *** 47,53 **** { char *name; int len; ! int class; } syntaxclass[] = { { "SYNTAX_3OP|OP1_MUST_BE_IMM", 26, SYNTAX_3OP|OP1_MUST_BE_IMM|SYNTAX_VALID }, --- 47,53 ---- { char *name; int len; ! int s_class; } syntaxclass[] = { { "SYNTAX_3OP|OP1_MUST_BE_IMM", 26, SYNTAX_3OP|OP1_MUST_BE_IMM|SYNTAX_VALID }, *************** arc_extinst (int ignore ATTRIBUTE_UNUSED *** 646,652 **** int suffixcode = -1; int opcode, subopcode; int i; ! int class = 0; int name_len; struct arc_opcode *ext_op; --- 646,652 ---- int suffixcode = -1; int opcode, subopcode; int i; ! int s_class = 0; int name_len; struct arc_opcode *ext_op; *************** arc_extinst (int ignore ATTRIBUTE_UNUSED *** 756,775 **** { if (!strncmp (syntaxclass[i].name,input_line_pointer, syntaxclass[i].len)) { ! class = syntaxclass[i].class; input_line_pointer += syntaxclass[i].len; break; } } ! if (0 == (SYNTAX_VALID & class)) { as_bad (_("invalid syntax class")); ignore_rest_of_line (); return; } ! if ((0x3 == opcode) & (class & SYNTAX_3OP)) { as_bad (_("opcode 0x3 and SYNTAX_3OP invalid")); ignore_rest_of_line (); --- 756,775 ---- { if (!strncmp (syntaxclass[i].name,input_line_pointer, syntaxclass[i].len)) { ! s_class = syntaxclass[i].s_class; input_line_pointer += syntaxclass[i].len; break; } } ! if (0 == (SYNTAX_VALID & s_class)) { as_bad (_("invalid syntax class")); ignore_rest_of_line (); return; } ! if ((0x3 == opcode) & (s_class & SYNTAX_3OP)) { as_bad (_("opcode 0x3 and SYNTAX_3OP invalid")); ignore_rest_of_line (); *************** arc_extinst (int ignore ATTRIBUTE_UNUSED *** 797,803 **** break; }; ! strcat (syntax, ((opcode == 0x3) ? "%a,%b" : ((class & SYNTAX_3OP) ? "%a,%b,%c" : "%b,%c"))); if (suffixcode < 2) strcat (syntax, "%F"); strcat (syntax, "%S%L"); --- 797,803 ---- break; }; ! strcat (syntax, ((opcode == 0x3) ? "%a,%b" : ((s_class & SYNTAX_3OP) ? "%a,%b,%c" : "%b,%c"))); if (suffixcode < 2) strcat (syntax, "%F"); strcat (syntax, "%S%L"); *************** arc_extinst (int ignore ATTRIBUTE_UNUSED *** 807,813 **** ext_op->mask = I (-1) | ((0x3 == opcode) ? C (-1) : 0); ext_op->value = I (opcode) | ((0x3 == opcode) ? C (subopcode) : 0); ! ext_op->flags = class; ext_op->next_asm = arc_ext_opcodes; ext_op->next_dis = arc_ext_opcodes; arc_ext_opcodes = ext_op; --- 807,813 ---- ext_op->mask = I (-1) | ((0x3 == opcode) ? C (-1) : 0); ext_op->value = I (opcode) | ((0x3 == opcode) ? C (subopcode) : 0); ! ext_op->flags = s_class; ext_op->next_asm = arc_ext_opcodes; ext_op->next_dis = arc_ext_opcodes; arc_ext_opcodes = ext_op; *************** arc_extinst (int ignore ATTRIBUTE_UNUSED *** 829,835 **** p = frag_more (1); *p = subopcode; p = frag_more (1); ! *p = (class & (OP1_MUST_BE_IMM | OP1_IMM_IMPLIED) ? IGNORE_FIRST_OPD : 0); p = frag_more (name_len); strncpy (p, syntax, name_len); p = frag_more (1); --- 829,835 ---- p = frag_more (1); *p = subopcode; p = frag_more (1); ! *p = (s_class & (OP1_MUST_BE_IMM | OP1_IMM_IMPLIED) ? IGNORE_FIRST_OPD : 0); p = frag_more (name_len); strncpy (p, syntax, name_len); p = frag_more (1); diff -prc src.head/gas/config/tc-mips.c src.class/gas/config/tc-mips.c *** src.head/gas/config/tc-mips.c Fri Aug 14 10:59:53 2009 --- src.class/gas/config/tc-mips.c Sun Aug 16 14:10:36 2009 *************** fixup_has_matching_lo_p (fixS *fixp) *** 2221,2240 **** static int insn_uses_reg (const struct mips_cl_insn *ip, unsigned int reg, ! enum mips_regclass class) { ! if (class == MIPS16_REG) { gas_assert (mips_opts.mips16); reg = mips16_to_32_reg_map[reg]; ! class = MIPS_GR_REG; } /* Don't report on general register ZERO, since it never changes. */ ! if (class == MIPS_GR_REG && reg == ZERO) return 0; ! if (class == MIPS_FP_REG) { gas_assert (! mips_opts.mips16); /* If we are called with either $f0 or $f1, we must check $f0. --- 2221,2240 ---- static int insn_uses_reg (const struct mips_cl_insn *ip, unsigned int reg, ! enum mips_regclass regclass) { ! if (regclass == MIPS16_REG) { gas_assert (mips_opts.mips16); reg = mips16_to_32_reg_map[reg]; ! regclass = MIPS_GR_REG; } /* Don't report on general register ZERO, since it never changes. */ ! if (regclass == MIPS_GR_REG && reg == ZERO) return 0; ! if (regclass == MIPS_FP_REG) { gas_assert (! mips_opts.mips16); /* If we are called with either $f0 or $f1, we must check $f0. Only in src.class/gas/config: tc-mips.c.orig Only in src.head/gas/config: tc-moxie.c.~1.5.~ diff -prc src.head/gas/config/tc-ppc.c src.class/gas/config/tc-ppc.c *** src.head/gas/config/tc-ppc.c Fri Aug 14 10:59:54 2009 --- src.class/gas/config/tc-ppc.c Wed Aug 19 17:09:55 2009 *************** ppc_csect (int ignore ATTRIBUTE_UNUSED) *** 3338,3344 **** if (S_GET_NAME (sym)[0] == '\0') { /* An unnamed csect is assumed to be [PR]. */ ! symbol_get_tc (sym)->class = XMC_PR; } align = 2; --- 3338,3344 ---- if (S_GET_NAME (sym)[0] == '\0') { /* An unnamed csect is assumed to be [PR]. */ ! symbol_get_tc (sym)->symbol_class = XMC_PR; } align = 2; *************** ppc_change_csect (symbolS *sym, offsetT *** 3374,3380 **** data section. */ after_toc = 0; is_code = 0; ! switch (symbol_get_tc (sym)->class) { case XMC_PR: case XMC_RO: --- 3374,3380 ---- data section. */ after_toc = 0; is_code = 0; ! switch (symbol_get_tc (sym)->symbol_class) { case XMC_PR: case XMC_RO: *************** ppc_function (int ignore ATTRIBUTE_UNUSE *** 3764,3771 **** symbol_set_value_expression (ext_sym, &exp); } ! if (symbol_get_tc (ext_sym)->class == -1) ! symbol_get_tc (ext_sym)->class = XMC_PR; symbol_get_tc (ext_sym)->output = 1; if (*input_line_pointer == ',') --- 3764,3771 ---- symbol_set_value_expression (ext_sym, &exp); } ! if (symbol_get_tc (ext_sym)->symbol_class == -1) ! symbol_get_tc (ext_sym)->symbol_class = XMC_PR; symbol_get_tc (ext_sym)->output = 1; if (*input_line_pointer == ',') *************** ppc_tc (int ignore ATTRIBUTE_UNUSED) *** 4198,4204 **** symbolS *label; label = symbol_get_tc (ppc_current_csect)->within; ! if (symbol_get_tc (label)->class != XMC_TC0) { as_bad (_(".tc with no label")); ignore_rest_of_line (); --- 4198,4204 ---- symbolS *label; label = symbol_get_tc (ppc_current_csect)->within; ! if (symbol_get_tc (label)->symbol_class != XMC_TC0) { as_bad (_(".tc with no label")); ignore_rest_of_line (); *************** ppc_tc (int ignore ATTRIBUTE_UNUSED) *** 4218,4224 **** S_SET_SEGMENT (sym, now_seg); symbol_set_frag (sym, frag_now); S_SET_VALUE (sym, (valueT) frag_now_fix ()); ! symbol_get_tc (sym)->class = XMC_TC; symbol_get_tc (sym)->output = 1; ppc_frob_label (sym); --- 4218,4224 ---- S_SET_SEGMENT (sym, now_seg); symbol_set_frag (sym, frag_now); S_SET_VALUE (sym, (valueT) frag_now_fix ()); ! symbol_get_tc (sym)->symbol_class = XMC_TC; symbol_get_tc (sym)->output = 1; ppc_frob_label (sym); *************** static int *** 4322,4328 **** ppc_is_toc_sym (symbolS *sym) { #ifdef OBJ_XCOFF ! return symbol_get_tc (sym)->class == XMC_TC; #endif #ifdef OBJ_ELF const char *sname = segment_name (S_GET_SEGMENT (sym)); --- 4322,4328 ---- ppc_is_toc_sym (symbolS *sym) { #ifdef OBJ_XCOFF ! return symbol_get_tc (sym)->symbol_class == XMC_TC; #endif #ifdef OBJ_ELF const char *sname = segment_name (S_GET_SEGMENT (sym)); *************** ppc_symbol_new_hook (symbolS *sym) *** 4972,4978 **** tc = symbol_get_tc (sym); tc->next = NULL; tc->output = 0; ! tc->class = -1; tc->real_name = NULL; tc->subseg = 0; tc->align = 0; --- 4972,4978 ---- tc = symbol_get_tc (sym); tc->next = NULL; tc->output = 0; ! tc->symbol_class = -1; tc->real_name = NULL; tc->subseg = 0; tc->align = 0; *************** ppc_symbol_new_hook (symbolS *sym) *** 4995,5049 **** { case 'B': if (strcmp (s, "BS]") == 0) ! tc->class = XMC_BS; break; case 'D': if (strcmp (s, "DB]") == 0) ! tc->class = XMC_DB; else if (strcmp (s, "DS]") == 0) ! tc->class = XMC_DS; break; case 'G': if (strcmp (s, "GL]") == 0) ! tc->class = XMC_GL; break; case 'P': if (strcmp (s, "PR]") == 0) ! tc->class = XMC_PR; break; case 'R': if (strcmp (s, "RO]") == 0) ! tc->class = XMC_RO; else if (strcmp (s, "RW]") == 0) ! tc->class = XMC_RW; break; case 'S': if (strcmp (s, "SV]") == 0) ! tc->class = XMC_SV; break; case 'T': if (strcmp (s, "TC]") == 0) ! tc->class = XMC_TC; else if (strcmp (s, "TI]") == 0) ! tc->class = XMC_TI; else if (strcmp (s, "TB]") == 0) ! tc->class = XMC_TB; else if (strcmp (s, "TC0]") == 0 || strcmp (s, "T0]") == 0) ! tc->class = XMC_TC0; break; case 'U': if (strcmp (s, "UA]") == 0) ! tc->class = XMC_UA; else if (strcmp (s, "UC]") == 0) ! tc->class = XMC_UC; break; case 'X': if (strcmp (s, "XO]") == 0) ! tc->class = XMC_XO; break; } ! if (tc->class == -1) as_bad (_("Unrecognized symbol suffix")); } --- 4995,5049 ---- { case 'B': if (strcmp (s, "BS]") == 0) ! tc->symbol_class = XMC_BS; break; case 'D': if (strcmp (s, "DB]") == 0) ! tc->symbol_class = XMC_DB; else if (strcmp (s, "DS]") == 0) ! tc->symbol_class = XMC_DS; break; case 'G': if (strcmp (s, "GL]") == 0) ! tc->symbol_class = XMC_GL; break; case 'P': if (strcmp (s, "PR]") == 0) ! tc->symbol_class = XMC_PR; break; case 'R': if (strcmp (s, "RO]") == 0) ! tc->symbol_class = XMC_RO; else if (strcmp (s, "RW]") == 0) ! tc->symbol_class = XMC_RW; break; case 'S': if (strcmp (s, "SV]") == 0) ! tc->symbol_class = XMC_SV; break; case 'T': if (strcmp (s, "TC]") == 0) ! tc->symbol_class = XMC_TC; else if (strcmp (s, "TI]") == 0) ! tc->symbol_class = XMC_TI; else if (strcmp (s, "TB]") == 0) ! tc->symbol_class = XMC_TB; else if (strcmp (s, "TC0]") == 0 || strcmp (s, "T0]") == 0) ! tc->symbol_class = XMC_TC0; break; case 'U': if (strcmp (s, "UA]") == 0) ! tc->symbol_class = XMC_UA; else if (strcmp (s, "UC]") == 0) ! tc->symbol_class = XMC_UC; break; case 'X': if (strcmp (s, "XO]") == 0) ! tc->symbol_class = XMC_XO; break; } ! if (tc->symbol_class == -1) as_bad (_("Unrecognized symbol suffix")); } *************** ppc_frob_label (symbolS *sym) *** 5056,5063 **** { if (ppc_current_csect != (symbolS *) NULL) { ! if (symbol_get_tc (sym)->class == -1) ! symbol_get_tc (sym)->class = symbol_get_tc (ppc_current_csect)->class; symbol_remove (sym, &symbol_rootP, &symbol_lastP); symbol_append (sym, symbol_get_tc (ppc_current_csect)->within, --- 5056,5063 ---- { if (ppc_current_csect != (symbolS *) NULL) { ! if (symbol_get_tc (sym)->symbol_class == -1) ! symbol_get_tc (sym)->symbol_class = symbol_get_tc (ppc_current_csect)->symbol_class; symbol_remove (sym, &symbol_rootP, &symbol_lastP); symbol_append (sym, symbol_get_tc (ppc_current_csect)->within, *************** ppc_frob_symbol (symbolS *sym) *** 5180,5186 **** i = S_GET_NUMBER_AUXILIARY (sym); S_SET_NUMBER_AUXILIARY (sym, i + 1); a = &coffsymbol (symbol_get_bfdsym (sym))->native[i + 1].u.auxent; ! if (symbol_get_tc (sym)->class == XMC_TC0) { /* This is the TOC table. */ know (strcmp (S_GET_NAME (sym), "TOC") == 0); --- 5180,5186 ---- i = S_GET_NUMBER_AUXILIARY (sym); S_SET_NUMBER_AUXILIARY (sym, i + 1); a = &coffsymbol (symbol_get_bfdsym (sym))->native[i + 1].u.auxent; ! if (symbol_get_tc (sym)->symbol_class == XMC_TC0) { /* This is the TOC table. */ know (strcmp (S_GET_NAME (sym), "TOC") == 0); *************** ppc_frob_symbol (symbolS *sym) *** 5209,5217 **** 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; if (S_IS_EXTERNAL (sym)) ! symbol_get_tc (sym)->class = XMC_RW; else ! symbol_get_tc (sym)->class = XMC_BS; } else if (S_GET_SEGMENT (sym) == absolute_section) { --- 5209,5217 ---- 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; if (S_IS_EXTERNAL (sym)) ! symbol_get_tc (sym)->symbol_class = XMC_RW; else ! symbol_get_tc (sym)->symbol_class = XMC_BS; } else if (S_GET_SEGMENT (sym) == absolute_section) { *************** ppc_frob_symbol (symbolS *sym) *** 5219,5226 **** ppc_adjust_symtab. */ ppc_saw_abs = TRUE; a->x_csect.x_smtyp = XTY_LD; ! if (symbol_get_tc (sym)->class == -1) ! symbol_get_tc (sym)->class = XMC_XO; } else if (! S_IS_DEFINED (sym)) { --- 5219,5226 ---- ppc_adjust_symtab. */ ppc_saw_abs = TRUE; a->x_csect.x_smtyp = XTY_LD; ! if (symbol_get_tc (sym)->symbol_class == -1) ! symbol_get_tc (sym)->symbol_class = XMC_XO; } else if (! S_IS_DEFINED (sym)) { *************** ppc_frob_symbol (symbolS *sym) *** 5228,5244 **** a->x_csect.x_scnlen.l = 0; a->x_csect.x_smtyp = XTY_ER; } ! else if (symbol_get_tc (sym)->class == XMC_TC) { symbolS *next; /* This is a TOC definition. x_scnlen is the size of the TOC entry. */ next = symbol_next (sym); ! while (symbol_get_tc (next)->class == XMC_TC0) next = symbol_next (next); if (next == (symbolS *) NULL ! || symbol_get_tc (next)->class != XMC_TC) { if (ppc_after_toc_frag == (fragS *) NULL) a->x_csect.x_scnlen.l = (bfd_section_size (stdoutput, --- 5228,5244 ---- a->x_csect.x_scnlen.l = 0; a->x_csect.x_smtyp = XTY_ER; } ! else if (symbol_get_tc (sym)->symbol_class == XMC_TC) { symbolS *next; /* This is a TOC definition. x_scnlen is the size of the TOC entry. */ next = symbol_next (sym); ! while (symbol_get_tc (next)->symbol_class == XMC_TC0) next = symbol_next (next); if (next == (symbolS *) NULL ! || symbol_get_tc (next)->symbol_class != XMC_TC) { if (ppc_after_toc_frag == (fragS *) NULL) a->x_csect.x_scnlen.l = (bfd_section_size (stdoutput, *************** ppc_frob_symbol (symbolS *sym) *** 5298,5307 **** a->x_csect.x_parmhash = 0; a->x_csect.x_snhash = 0; ! if (symbol_get_tc (sym)->class == -1) a->x_csect.x_smclas = XMC_PR; else ! a->x_csect.x_smclas = symbol_get_tc (sym)->class; a->x_csect.x_stab = 0; a->x_csect.x_snstab = 0; --- 5298,5307 ---- a->x_csect.x_parmhash = 0; a->x_csect.x_snhash = 0; ! if (symbol_get_tc (sym)->symbol_class == -1) a->x_csect.x_smclas = XMC_PR; else ! a->x_csect.x_smclas = symbol_get_tc (sym)->symbol_class; a->x_csect.x_stab = 0; a->x_csect.x_snstab = 0; *************** ppc_fix_adjustable (fixS *fix) *** 5506,5514 **** { TC_SYMFIELD_TYPE *sy_tc = symbol_get_tc (sy); ! if (sy_tc->class == XMC_TC0) continue; ! if (sy_tc->class != XMC_TC) break; if (val == resolve_symbol_value (sy)) { --- 5506,5514 ---- { TC_SYMFIELD_TYPE *sy_tc = symbol_get_tc (sy); ! if (sy_tc->symbol_class == XMC_TC0) continue; ! if (sy_tc->symbol_class != XMC_TC) break; if (val == resolve_symbol_value (sy)) { *************** ppc_fix_adjustable (fixS *fix) *** 5525,5532 **** /* Possibly adjust the reloc to be against the csect. */ tc = symbol_get_tc (fix->fx_addsy); if (tc->subseg == 0 ! && tc->class != XMC_TC0 ! && tc->class != XMC_TC && symseg != bss_section /* Don't adjust if this is a reloc in the toc section. */ && (symseg != data_section --- 5525,5532 ---- /* Possibly adjust the reloc to be against the csect. */ tc = symbol_get_tc (fix->fx_addsy); if (tc->subseg == 0 ! && tc->symbol_class != XMC_TC0 ! && tc->symbol_class != XMC_TC && symseg != bss_section /* Don't adjust if this is a reloc in the toc section. */ && (symseg != data_section *************** md_apply_fix (fixS *fixP, valueT *valP, *** 5791,5798 **** && (operand->insert == NULL || ppc_obj64) && fixP->fx_addsy != NULL && symbol_get_tc (fixP->fx_addsy)->subseg != 0 ! && symbol_get_tc (fixP->fx_addsy)->class != XMC_TC ! && symbol_get_tc (fixP->fx_addsy)->class != XMC_TC0 && S_GET_SEGMENT (fixP->fx_addsy) != bss_section) { value = fixP->fx_offset; --- 5791,5798 ---- && (operand->insert == NULL || ppc_obj64) && fixP->fx_addsy != NULL && symbol_get_tc (fixP->fx_addsy)->subseg != 0 ! && symbol_get_tc (fixP->fx_addsy)->symbol_class != XMC_TC ! && symbol_get_tc (fixP->fx_addsy)->symbol_class != XMC_TC0 && S_GET_SEGMENT (fixP->fx_addsy) != bss_section) { value = fixP->fx_offset; diff -prc src.head/gas/config/tc-ppc.h src.class/gas/config/tc-ppc.h *** src.head/gas/config/tc-ppc.h Tue Jun 16 09:07:25 2009 --- src.class/gas/config/tc-ppc.h Wed Aug 19 17:08:33 2009 *************** struct ppc_tc_sy *** 134,140 **** .globl or .lglobl statement. */ int output; /* The symbol class. */ ! int class; /* The real name, if the symbol was renamed. */ char *real_name; /* For a csect symbol, the subsegment we are using. This is zero --- 134,140 ---- .globl or .lglobl statement. */ int output; /* The symbol class. */ ! int symbol_class; /* The real name, if the symbol was renamed. */ char *real_name; /* For a csect symbol, the subsegment we are using. This is zero *************** do { \ *** 195,201 **** S_SET_SEGMENT (dest, S_GET_SEGMENT (src)); \ symbol_get_tc (dest)->size = symbol_get_tc (src)->size; \ symbol_get_tc (dest)->align = symbol_get_tc (src)->align; \ ! symbol_get_tc (dest)->class = symbol_get_tc (src)->class; \ symbol_get_tc (dest)->within = symbol_get_tc (src)->within; \ } while (0) --- 195,201 ---- S_SET_SEGMENT (dest, S_GET_SEGMENT (src)); \ symbol_get_tc (dest)->size = symbol_get_tc (src)->size; \ symbol_get_tc (dest)->align = symbol_get_tc (src)->align; \ ! symbol_get_tc (dest)->symbol_class = symbol_get_tc (src)->symbol_class; \ symbol_get_tc (dest)->within = symbol_get_tc (src)->within; \ } while (0) diff -prc src.head/gas/config/tc-score.c src.class/gas/config/tc-score.c *** src.head/gas/config/tc-score.c Fri Aug 14 10:59:54 2009 --- src.class/gas/config/tc-score.c Sun Aug 16 14:10:36 2009 *************** s3_get_insn_class_from_type (enum score_ *** 2490,2496 **** 32-bit instruction: 1, 0. 16-bit instruction: 0. */ static bfd_vma ! s3_adjust_paritybit (bfd_vma m_code, enum insn_class class) { bfd_vma result = 0; bfd_vma m_code_high = 0; --- 2490,2496 ---- 32-bit instruction: 1, 0. 16-bit instruction: 0. */ static bfd_vma ! s3_adjust_paritybit (bfd_vma m_code, enum insn_class i_class) { bfd_vma result = 0; bfd_vma m_code_high = 0; *************** s3_adjust_paritybit (bfd_vma m_code, enu *** 2500,2506 **** unsigned long pb_middle = 0; unsigned long pb_low = 0; ! if (class == INSN_CLASS_48) { pb_high = 0x800000000000LL; pb_middle = 0x80000000; --- 2500,2506 ---- unsigned long pb_middle = 0; unsigned long pb_low = 0; ! if (i_class == INSN_CLASS_48) { pb_high = 0x800000000000LL; pb_middle = 0x80000000; *************** s3_adjust_paritybit (bfd_vma m_code, enu *** 2512,2518 **** pb_middle | (m_code_middle << 1) | pb_low | m_code_low; } ! else if (class == INSN_CLASS_32 || class == INSN_CLASS_SYN) { pb_high = 0x80000000; pb_low = 0x00000000; --- 2512,2518 ---- pb_middle | (m_code_middle << 1) | pb_low | m_code_low; } ! else if (i_class == INSN_CLASS_32 || i_class == INSN_CLASS_SYN) { pb_high = 0x80000000; pb_low = 0x00000000; *************** s3_adjust_paritybit (bfd_vma m_code, enu *** 2520,2526 **** m_code_low = m_code & 0x00007fff; result = pb_high | (m_code_high << 1) | pb_low | m_code_low; } ! else if (class == INSN_CLASS_16) { pb_high = 0; pb_low = 0; --- 2520,2526 ---- m_code_low = m_code & 0x00007fff; result = pb_high | (m_code_high << 1) | pb_low | m_code_low; } ! else if (i_class == INSN_CLASS_16) { pb_high = 0; pb_low = 0; *************** s3_adjust_paritybit (bfd_vma m_code, enu *** 2528,2534 **** m_code_low = m_code & 0x00007fff; result = pb_high | (m_code_high << 1) | pb_low | m_code_low; } ! else if (class == INSN_CLASS_PCE) { /* Keep original. */ pb_high = 0; --- 2528,2534 ---- m_code_low = m_code & 0x00007fff; result = pb_high | (m_code_high << 1) | pb_low | m_code_low; } ! else if (i_class == INSN_CLASS_PCE) { /* Keep original. */ pb_high = 0; diff -prc src.head/gas/config/tc-score7.c src.class/gas/config/tc-score7.c *** src.head/gas/config/tc-score7.c Fri Aug 14 10:59:54 2009 --- src.class/gas/config/tc-score7.c Sun Aug 16 14:10:36 2009 *************** s7_get_insn_class_from_type (enum score_ *** 2620,2626 **** } static unsigned long ! s7_adjust_paritybit (unsigned long m_code, enum insn_class class) { unsigned long result = 0; unsigned long m_code_high = 0; --- 2620,2626 ---- } static unsigned long ! s7_adjust_paritybit (unsigned long m_code, enum insn_class i_class) { unsigned long result = 0; unsigned long m_code_high = 0; *************** s7_adjust_paritybit (unsigned long m_cod *** 2628,2649 **** unsigned long pb_high = 0; unsigned long pb_low = 0; ! if (class == INSN_CLASS_32) { pb_high = 0x80000000; pb_low = 0x00008000; } ! else if (class == INSN_CLASS_16) { pb_high = 0; pb_low = 0; } ! else if (class == INSN_CLASS_PCE) { pb_high = 0; pb_low = 0x00008000; } ! else if (class == INSN_CLASS_SYN) { /* FIXME. at this time, INSN_CLASS_SYN must be 32 bit, but, instruction type should be changed if macro instruction has been expanded. */ --- 2628,2649 ---- unsigned long pb_high = 0; unsigned long pb_low = 0; ! if (i_class == INSN_CLASS_32) { pb_high = 0x80000000; pb_low = 0x00008000; } ! else if (i_class == INSN_CLASS_16) { pb_high = 0; pb_low = 0; } ! else if (i_class == INSN_CLASS_PCE) { pb_high = 0; pb_low = 0x00008000; } ! else if (i_class == INSN_CLASS_SYN) { /* FIXME. at this time, INSN_CLASS_SYN must be 32 bit, but, instruction type should be changed if macro instruction has been expanded. */ diff -prc src.head/gprof/corefile.c src.class/gprof/corefile.c *** src.head/gprof/corefile.c Tue Jun 16 09:08:11 2009 --- src.class/gprof/corefile.c Sun Aug 16 14:10:36 2009 *************** core_create_function_syms (void) *** 562,568 **** { bfd_vma min_vma = ~ (bfd_vma) 0; bfd_vma max_vma = 0; ! int class; long i; struct function_map * found; --- 562,568 ---- { bfd_vma min_vma = ~ (bfd_vma) 0; bfd_vma max_vma = 0; ! int cxxclass; long i; struct function_map * found; *************** core_create_function_syms (void) *** 598,606 **** { asection *sym_sec; ! class = core_sym_class (core_syms[i]); ! if (!class) { DBG (AOUTDEBUG, printf ("[core_create_function_syms] rejecting: 0x%lx %s\n", --- 598,606 ---- { asection *sym_sec; ! cxxclass = core_sym_class (core_syms[i]); ! if (!cxxclass) { DBG (AOUTDEBUG, printf ("[core_create_function_syms] rejecting: 0x%lx %s\n", *************** core_create_function_syms (void) *** 670,676 **** symtab.limit->is_func = (core_syms[i]->flags & BSF_FUNCTION) != 0; symtab.limit->is_bb_head = TRUE; ! if (class == 't') symtab.limit->is_static = TRUE; /* Keep track of the minimum and maximum vma addresses used by all --- 670,676 ---- symtab.limit->is_func = (core_syms[i]->flags & BSF_FUNCTION) != 0; symtab.limit->is_bb_head = TRUE; ! if (cxxclass == 't') symtab.limit->is_static = TRUE; /* Keep track of the minimum and maximum vma addresses used by all diff -prc src.head/include/coff/ti.h src.class/include/coff/ti.h *** src.head/include/coff/ti.h Fri Aug 14 11:06:19 2009 --- src.class/include/coff/ti.h Thu Aug 27 09:19:49 2009 *************** union external_auxent { *** 475,484 **** /* lnsz size is in bits in COFF file, in bytes in BFD */ #define GET_LNSZ_SIZE(abfd, ext) \ ! (H_GET_16 (abfd, ext->x_sym.x_misc.x_lnsz.x_size) / (class != C_FIELD ? 8 : 1)) #define PUT_LNSZ_SIZE(abfd, in, ext) \ ! H_PUT_16 (abfd, ((class != C_FIELD) ? (in) * 8 : (in)), \ ext->x_sym.x_misc.x_lnsz.x_size) /* TI COFF stores offsets for MOS and MOU in bits; BFD expects bytes --- 475,484 ---- /* lnsz size is in bits in COFF file, in bytes in BFD */ #define GET_LNSZ_SIZE(abfd, ext) \ ! (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) \ ! H_PUT_16 (abfd, ((in_class != C_FIELD) ? (in) * 8 : (in)), \ ext->x_sym.x_misc.x_lnsz.x_size) /* TI COFF stores offsets for MOS and MOU in bits; BFD expects bytes diff -prc src.head/include/opcode/ia64.h src.class/include/opcode/ia64.h *** src.head/include/opcode/ia64.h Tue Jun 16 09:07:24 2009 --- src.class/include/opcode/ia64.h Sun Aug 16 14:10:36 2009 *************** enum ia64_operand_class *** 327,333 **** struct ia64_operand { ! enum ia64_operand_class class; /* 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 --- 327,333 ---- struct ia64_operand { ! enum ia64_operand_class op_class; /* 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 diff -prc src.head/ld/emultempl/elf32.em src.class/ld/emultempl/elf32.em *** src.head/ld/emultempl/elf32.em Fri Aug 14 11:07:18 2009 --- src.class/ld/emultempl/elf32.em Sun Aug 16 14:10:36 2009 *************** fragment <<EOF *** 113,142 **** static bfd_boolean gld${EMULATION_NAME}_load_symbols (lang_input_statement_type *entry) { ! int class = 0; /* 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 references in a regular object. */ if (entry->as_needed) ! class = DYN_AS_NEEDED; /* 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 this file at all. */ if (!entry->add_needed) ! class |= DYN_NO_ADD_NEEDED; if (entry->just_syms_flag && (bfd_get_file_flags (entry->the_bfd) & DYNAMIC) != 0) einfo (_("%P%F: --just-symbols may not be used on DSO: %B\n"), entry->the_bfd); ! if (!class || (bfd_get_file_flags (entry->the_bfd) & DYNAMIC) == 0) return FALSE; ! bfd_elf_set_dyn_lib_class (entry->the_bfd, class); /* Continue on with normal load_symbols processing. */ return FALSE; --- 113,142 ---- static bfd_boolean gld${EMULATION_NAME}_load_symbols (lang_input_statement_type *entry) { ! int link_class = 0; /* 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 references in a regular object. */ if (entry->as_needed) ! link_class = DYN_AS_NEEDED; /* 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 this file at all. */ if (!entry->add_needed) ! link_class |= DYN_NO_ADD_NEEDED; if (entry->just_syms_flag && (bfd_get_file_flags (entry->the_bfd) & DYNAMIC) != 0) einfo (_("%P%F: --just-symbols may not be used on DSO: %B\n"), entry->the_bfd); ! if (!link_class || (bfd_get_file_flags (entry->the_bfd) & DYNAMIC) == 0) return FALSE; ! bfd_elf_set_dyn_lib_class (entry->the_bfd, link_class); /* Continue on with normal load_symbols processing. */ return FALSE; *************** gld${EMULATION_NAME}_try_needed (struct *** 305,311 **** bfd *abfd; const char *name = needed->name; const char *soname; ! int class; abfd = bfd_openr (name, bfd_get_target (link_info.output_bfd)); if (abfd == NULL) --- 305,311 ---- bfd *abfd; const char *name = needed->name; const char *soname; ! int link_class; abfd = bfd_openr (name, bfd_get_target (link_info.output_bfd)); if (abfd == NULL) *************** fragment <<EOF *** 418,433 **** /* 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 references in a regular object. */ ! class = DYN_DT_NEEDED; /* 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 with DYN_NO_ADD_NEEDED. */ if (needed->by != NULL && (bfd_elf_get_dyn_lib_class (needed->by) & DYN_NO_ADD_NEEDED) != 0) ! class |= DYN_NO_NEEDED | DYN_NO_ADD_NEEDED; ! bfd_elf_set_dyn_lib_class (abfd, class); /* Add this file into the symbol table. */ if (! bfd_link_add_symbols (abfd, &link_info)) --- 418,433 ---- /* 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 references in a regular object. */ ! link_class = DYN_DT_NEEDED; /* 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 with DYN_NO_ADD_NEEDED. */ if (needed->by != NULL && (bfd_elf_get_dyn_lib_class (needed->by) & DYN_NO_ADD_NEEDED) != 0) ! link_class |= DYN_NO_NEEDED | DYN_NO_ADD_NEEDED; ! bfd_elf_set_dyn_lib_class (abfd, link_class); /* Add this file into the symbol table. */ if (! bfd_link_add_symbols (abfd, &link_info)) Only in src.class/ld/emultempl: elf32.em.orig diff -prc src.head/opcodes/ia64-dis.c src.class/opcodes/ia64-dis.c *** src.head/opcodes/ia64-dis.c Tue Jun 16 09:07:16 2009 --- src.class/opcodes/ia64-dis.c Sun Aug 16 14:10:36 2009 *************** print_insn_ia64 (bfd_vma memaddr, struct *** 182,188 **** } } ! switch (odesc->class) { case IA64_OPND_CLASS_CST: (*info->fprintf_func) (info->stream, "%s", odesc->str); --- 182,188 ---- } } ! switch (odesc->op_class) { case IA64_OPND_CLASS_CST: (*info->fprintf_func) (info->stream, "%s", odesc->str); diff -prc src.head/opcodes/m88k-dis.c src.class/opcodes/m88k-dis.c *** src.head/opcodes/m88k-dis.c Tue Jun 16 09:07:17 2009 --- src.class/opcodes/m88k-dis.c Wed Aug 19 16:51:33 2009 *************** m88kdis (bfd_vma pc, *** 696,702 **** unsigned int opcode; const HASHTAB *entry_ptr; int opmask; ! unsigned int class; if (! ihashtab_initialized) { --- 696,702 ---- unsigned int opcode; const HASHTAB *entry_ptr; int opmask; ! unsigned int in_class; if (! ihashtab_initialized) { *************** m88kdis (bfd_vma pc, *** 706,722 **** /* Create the appropriate mask to isolate the opcode. */ opmask = DEFMASK; ! class = instruction & DEFMASK; ! if ((class >= SFU0) && (class <= SFU7)) { if (instruction < SFU1) opmask = CTRLMASK; else opmask = SFUMASK; } ! else if (class == RRR) opmask = RRRMASK; ! else if (class == RRI10) opmask = RRI10MASK; /* Isolate the opcode. */ --- 706,722 ---- /* Create the appropriate mask to isolate the opcode. */ opmask = DEFMASK; ! in_class = instruction & DEFMASK; ! if ((in_class >= SFU0) && (in_class <= SFU7)) { if (instruction < SFU1) opmask = CTRLMASK; else opmask = SFUMASK; } ! else if (in_class == RRR) opmask = RRRMASK; ! else if (in_class == RRI10) opmask = RRI10MASK; /* Isolate the opcode. */ diff -prc src.head/opcodes/tic80-opc.c src.class/opcodes/tic80-opc.c *** src.head/opcodes/tic80-opc.c Tue Jun 16 09:07:17 2009 --- src.class/opcodes/tic80-opc.c Wed Aug 19 16:37:13 2009 *************** const int tic80_num_predefined_symbols = *** 219,225 **** in CLASS, and translates it to a numeric value, which it returns. 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 matched. If no translation is possible, it returns -1, a value not used by --- 219,225 ---- in CLASS, and translates it to a numeric value, which it returns. If CLASS is zero, any symbol that matches NAME is translated. If ! CLASS is non-zero, then only a symbol that has symbol_class CLASS is matched. If no translation is possible, it returns -1, a value not used by *************** const int tic80_num_predefined_symbols = *** 233,241 **** */ int ! tic80_symbol_to_value (name, class) char *name; ! int class; { const struct predefined_symbol *pdsp; int low = 0; --- 233,241 ---- */ int ! tic80_symbol_to_value (name, symbol_class) char *name; ! int symbol_class; { const struct predefined_symbol *pdsp; int low = 0; *************** tic80_symbol_to_value (name, class) *** 259,265 **** else { pdsp = &tic80_predefined_symbols[middle]; ! if ((class == 0) || (class & PDS_VALUE (pdsp))) { rtnval = PDS_VALUE (pdsp); } --- 259,265 ---- else { pdsp = &tic80_predefined_symbols[middle]; ! if ((symbol_class == 0) || (symbol_class & PDS_VALUE (pdsp))) { rtnval = PDS_VALUE (pdsp); } *************** tic80_symbol_to_value (name, class) *** 271,283 **** } /* This function takes a value VAL and finds a matching predefined ! symbol that is in the operand class specified by CLASS. If CLASS is zero, the first matching symbol is returned. */ const char * ! tic80_value_to_symbol (val, class) int val; ! int class; { const struct predefined_symbol *pdsp; int ival; --- 271,283 ---- } /* This function takes a value VAL and finds a matching predefined ! symbol that is in the operand symbol_class specified by CLASS. If CLASS is zero, the first matching symbol is returned. */ const char * ! tic80_value_to_symbol (val, symbol_class) int val; ! int symbol_class; { const struct predefined_symbol *pdsp; int ival; *************** tic80_value_to_symbol (val, class) *** 291,297 **** ival = PDS_VALUE (pdsp) & ~TIC80_OPERAND_MASK; if (ival == val) { ! if ((class == 0) || (class & PDS_VALUE (pdsp))) { /* Found the desired match */ name = PDS_NAME (pdsp); --- 291,297 ---- ival = PDS_VALUE (pdsp) & ~TIC80_OPERAND_MASK; if (ival == val) { ! if ((symbol_class == 0) || (symbol_class & PDS_VALUE (pdsp))) { /* Found the desired match */ name = PDS_NAME (pdsp); Only in src.class/sid/component/cfgroot/libltdl: config-h.in]
Attachment:
new.changelog
Description: Binary data
diff -prc src.head/bfd/aoutx.h src.new/bfd/aoutx.h *** src.head/bfd/aoutx.h Fri Aug 14 10:58:53 2009 --- src.new/bfd/aoutx.h Tue Aug 18 11:53:38 2009 *************** NAME (aout, make_empty_symbol) (bfd *abf *** 1668,1679 **** { bfd_size_type amt = sizeof (aout_symbol_type); ! aout_symbol_type *new = bfd_zalloc (abfd, amt); ! if (!new) return NULL; ! new->symbol.the_bfd = abfd; ! return &new->symbol; } /* Translate a set of internal symbols into external symbols. */ --- 1668,1679 ---- { bfd_size_type amt = sizeof (aout_symbol_type); ! aout_symbol_type *new_symbol = (aout_symbol_type *) bfd_zalloc (abfd, amt); ! if (!new_symbol) return NULL; ! new_symbol->symbol.the_bfd = abfd; ! return &new_symbol->symbol; } /* Translate a set of internal symbols into external symbols. */ diff -prc src.head/bfd/coffgen.c src.new/bfd/coffgen.c *** src.head/bfd/coffgen.c Tue Jun 16 09:07:18 2009 --- src.new/bfd/coffgen.c Tue Aug 18 11:53:38 2009 *************** asymbol * *** 1794,1810 **** coff_make_empty_symbol (bfd *abfd) { bfd_size_type amt = sizeof (coff_symbol_type); ! coff_symbol_type *new = bfd_zalloc (abfd, amt); ! if (new == NULL) return NULL; ! new->symbol.section = 0; ! new->native = 0; ! new->lineno = NULL; ! new->done_lineno = FALSE; ! new->symbol.the_bfd = abfd; ! return & new->symbol; } /* Make a debugging symbol. */ --- 1794,1810 ---- coff_make_empty_symbol (bfd *abfd) { bfd_size_type amt = sizeof (coff_symbol_type); ! coff_symbol_type *new_symbol = (coff_symbol_type *) bfd_zalloc (abfd, amt); ! if (new_symbol == NULL) return NULL; ! new_symbol->symbol.section = 0; ! new_symbol->native = 0; ! new_symbol->lineno = NULL; ! new_symbol->done_lineno = FALSE; ! new_symbol->symbol.the_bfd = abfd; ! return & new_symbol->symbol; } /* Make a debugging symbol. */ *************** coff_bfd_make_debug_symbol (bfd *abfd, *** 1815,1837 **** unsigned long sz ATTRIBUTE_UNUSED) { bfd_size_type amt = sizeof (coff_symbol_type); ! coff_symbol_type *new = bfd_alloc (abfd, amt); ! if (new == NULL) return NULL; /* @@ The 10 is a guess at a plausible maximum number of aux entries (but shouldn't be a constant). */ amt = sizeof (combined_entry_type) * 10; ! new->native = bfd_zalloc (abfd, amt); ! if (!new->native) return NULL; ! new->symbol.section = bfd_abs_section_ptr; ! new->symbol.flags = BSF_DEBUGGING; ! new->lineno = NULL; ! new->done_lineno = FALSE; ! new->symbol.the_bfd = abfd; ! return & new->symbol; } void --- 1815,1837 ---- unsigned long sz ATTRIBUTE_UNUSED) { bfd_size_type amt = sizeof (coff_symbol_type); ! coff_symbol_type *new_symbol = (coff_symbol_type *) bfd_alloc (abfd, amt); ! if (new_symbol == NULL) return NULL; /* @@ The 10 is a guess at a plausible maximum number of aux entries (but shouldn't be a constant). */ amt = sizeof (combined_entry_type) * 10; ! new_symbol->native = (combined_entry_type *) bfd_zalloc (abfd, amt); ! if (!new_symbol->native) return NULL; ! new_symbol->symbol.section = bfd_abs_section_ptr; ! new_symbol->symbol.flags = BSF_DEBUGGING; ! new_symbol->lineno = NULL; ! new_symbol->done_lineno = FALSE; ! new_symbol->symbol.the_bfd = abfd; ! return & new_symbol->symbol; } void diff -prc src.head/bfd/cpu-ia64-opc.c src.new/bfd/cpu-ia64-opc.c *** src.head/bfd/cpu-ia64-opc.c Tue Jun 16 09:07:19 2009 --- src.new/bfd/cpu-ia64-opc.c Tue Aug 18 11:53:38 2009 *************** ext_reg (const struct ia64_operand *self *** 81,99 **** static const char* ins_immu (const struct ia64_operand *self, ia64_insn value, ia64_insn *code) { ! ia64_insn new = 0; int i; for (i = 0; i < NELEMS (self->field) && self->field[i].bits; ++i) { ! new |= ((value & ((((ia64_insn) 1) << self->field[i].bits) - 1)) ! << self->field[i].shift); value >>= self->field[i].bits; } if (value) return "integer operand out of range"; ! *code |= new; return 0; } --- 81,99 ---- static const char* ins_immu (const struct ia64_operand *self, ia64_insn value, ia64_insn *code) { ! ia64_insn new_insn = 0; int i; for (i = 0; i < NELEMS (self->field) && self->field[i].bits; ++i) { ! new_insn |= ((value & ((((ia64_insn) 1) << self->field[i].bits) - 1)) ! << self->field[i].shift); value >>= self->field[i].bits; } if (value) return "integer operand out of range"; ! *code |= new_insn; return 0; } *************** ins_imms_scaled (const struct ia64_opera *** 163,184 **** ia64_insn *code, int scale) { BFD_HOST_64_BIT svalue = value, sign_bit = 0; ! ia64_insn new = 0; int i; svalue >>= scale; for (i = 0; i < NELEMS (self->field) && self->field[i].bits; ++i) { ! new |= ((svalue & ((((ia64_insn) 1) << self->field[i].bits) - 1)) ! << self->field[i].shift); sign_bit = (svalue >> (self->field[i].bits - 1)) & 1; svalue >>= self->field[i].bits; } if ((!sign_bit && svalue != 0) || (sign_bit && svalue != -1)) return "integer operand out of range"; ! *code |= new; return 0; } --- 163,184 ---- ia64_insn *code, int scale) { BFD_HOST_64_BIT svalue = value, sign_bit = 0; ! ia64_insn new_insn = 0; int i; svalue >>= scale; for (i = 0; i < NELEMS (self->field) && self->field[i].bits; ++i) { ! new_insn |= ((svalue & ((((ia64_insn) 1) << self->field[i].bits) - 1)) ! << self->field[i].shift); sign_bit = (svalue >> (self->field[i].bits - 1)) & 1; svalue >>= self->field[i].bits; } if ((!sign_bit && svalue != 0) || (sign_bit && svalue != -1)) return "integer operand out of range"; ! *code |= new_insn; return 0; } diff -prc src.head/bfd/doc/chew.c src.new/bfd/doc/chew.c *** src.head/bfd/doc/chew.c Tue Jun 16 09:07:18 2009 --- src.new/bfd/doc/chew.c Tue Aug 18 11:53:38 2009 *************** dict_type * *** 1267,1280 **** newentry (word) char *word; { ! dict_type *new = (dict_type *) malloc (sizeof (dict_type)); ! new->word = word; ! new->next = root; ! root = new; ! new->code = (stinst_type *) malloc (sizeof (stinst_type)); ! new->code_length = 1; ! new->code_end = 0; ! return new; } unsigned int --- 1267,1280 ---- newentry (word) char *word; { ! dict_type *new_d = (dict_type *) malloc (sizeof (dict_type)); ! new_d->word = word; ! new_d->next = root; ! root = new_d; ! new_d->code = (stinst_type *) malloc (sizeof (stinst_type)); ! new_d->code_length = 1; ! new_d->code_end = 0; ! return new_d; } unsigned int *************** add_intrinsic (name, func) *** 1299,1317 **** char *name; void (*func) (); { ! dict_type *new = newentry (name); ! add_to_definition (new, func); ! add_to_definition (new, 0); } void add_var (name) char *name; { ! dict_type *new = newentry (name); ! add_to_definition (new, push_number); ! add_to_definition (new, (stinst_type) (&(new->var))); ! add_to_definition (new, 0); } void --- 1299,1317 ---- char *name; void (*func) (); { ! dict_type *new_d = newentry (name); ! add_to_definition (new_d, func); ! add_to_definition (new_d, 0); } void add_var (name) char *name; { ! dict_type *new_d = newentry (name); ! add_to_definition (new_d, push_number); ! add_to_definition (new_d, (stinst_type) (&(new_d->var))); ! add_to_definition (new_d, 0); } void diff -prc src.head/bfd/ecoff.c src.new/bfd/ecoff.c *** src.head/bfd/ecoff.c Fri Aug 14 10:59:00 2009 --- src.new/bfd/ecoff.c Tue Aug 18 11:53:38 2009 *************** static asymbol *ecoff_scom_symbol_ptr; *** 644,661 **** asymbol * _bfd_ecoff_make_empty_symbol (bfd *abfd) { ! ecoff_symbol_type *new; bfd_size_type amt = sizeof (ecoff_symbol_type); ! new = bfd_zalloc (abfd, amt); ! if (new == NULL) return NULL; ! new->symbol.section = NULL; ! new->fdr = NULL; ! new->local = FALSE; ! new->native = NULL; ! new->symbol.the_bfd = abfd; ! return &new->symbol; } /* Set the BFD flags and section for an ECOFF symbol. */ --- 644,661 ---- asymbol * _bfd_ecoff_make_empty_symbol (bfd *abfd) { ! ecoff_symbol_type *new_symbol; bfd_size_type amt = sizeof (ecoff_symbol_type); ! new_symbol = (ecoff_symbol_type *) bfd_zalloc (abfd, amt); ! if (new_symbol == NULL) return NULL; ! new_symbol->symbol.section = NULL; ! new_symbol->fdr = NULL; ! new_symbol->local = FALSE; ! new_symbol->native = NULL; ! new_symbol->symbol.the_bfd = abfd; ! return &new_symbol->symbol; } /* Set the BFD flags and section for an ECOFF symbol. */ diff -prc src.head/bfd/elf32-m68k.c src.new/bfd/elf32-m68k.c *** src.head/bfd/elf32-m68k.c Fri Aug 14 10:59:03 2009 --- src.new/bfd/elf32-m68k.c Tue Aug 18 11:53:38 2009 *************** elf_m68k_get_got_entry (struct elf_m68k_ *** 1531,1537 **** static enum elf_m68k_reloc_type elf_m68k_update_got_entry_type (struct elf_m68k_got *got, enum elf_m68k_reloc_type was, ! enum elf_m68k_reloc_type new) { enum elf_m68k_got_offset_size was_size; enum elf_m68k_got_offset_size new_size; --- 1531,1537 ---- static enum elf_m68k_reloc_type elf_m68k_update_got_entry_type (struct elf_m68k_got *got, enum elf_m68k_reloc_type was, ! enum elf_m68k_reloc_type new_reloc) { enum elf_m68k_got_offset_size was_size; enum elf_m68k_got_offset_size new_size; *************** elf_m68k_update_got_entry_type (struct e *** 1543,1562 **** /* Update all got->n_slots counters, including n_slots[R_32]. */ was_size = R_LAST; ! was = new; } else { /* !!! We, probably, should emit an error rather then fail on assert in such a case. */ BFD_ASSERT (elf_m68k_reloc_got_type (was) ! == elf_m68k_reloc_got_type (new)); was_size = elf_m68k_reloc_got_offset_size (was); } ! new_size = elf_m68k_reloc_got_offset_size (new); ! n_slots = elf_m68k_reloc_got_n_slots (new); while (was_size > new_size) { --- 1543,1562 ---- /* Update all got->n_slots counters, including n_slots[R_32]. */ was_size = R_LAST; ! was = new_reloc; } else { /* !!! We, probably, should emit an error rather then fail on assert in such a case. */ BFD_ASSERT (elf_m68k_reloc_got_type (was) ! == elf_m68k_reloc_got_type (new_reloc)); was_size = elf_m68k_reloc_got_offset_size (was); } ! new_size = elf_m68k_reloc_got_offset_size (new_reloc); ! n_slots = elf_m68k_reloc_got_n_slots (new_reloc); while (was_size > new_size) { *************** elf_m68k_update_got_entry_type (struct e *** 1564,1573 **** got->n_slots[was_size] += n_slots; } ! if (new > was) /* Relocations are ordered from bigger got offset size to lesser, so choose the relocation type with lesser offset size. */ ! was = new; return was; } --- 1564,1573 ---- got->n_slots[was_size] += n_slots; } ! if (new_reloc > was) /* Relocations are ordered from bigger got offset size to lesser, so choose the relocation type with lesser offset size. */ ! was = new_reloc; return was; } diff -prc src.head/bfd/hash.c src.new/bfd/hash.c *** src.head/bfd/hash.c Tue Jun 16 09:07:20 2009 --- src.new/bfd/hash.c Tue Aug 18 11:53:38 2009 *************** bfd_hash_lookup (struct bfd_hash_table * *** 453,468 **** if (copy) { ! char *new; ! new = objalloc_alloc ((struct objalloc *) table->memory, len + 1); ! if (!new) { bfd_set_error (bfd_error_no_memory); return NULL; } ! memcpy (new, string, len + 1); ! string = new; } return bfd_hash_insert (table, string, hash); --- 453,469 ---- if (copy) { ! char *new_string; ! new_string = (char *) objalloc_alloc ((struct objalloc *) table->memory, ! len + 1); ! if (!new_string) { bfd_set_error (bfd_error_no_memory); return NULL; } ! memcpy (new_string, string, len + 1); ! string = new_string; } return bfd_hash_insert (table, string, hash); diff -prc src.head/bfd/ieee.c src.new/bfd/ieee.c *** src.head/bfd/ieee.c Tue Jun 16 09:07:20 2009 --- src.new/bfd/ieee.c Tue Aug 18 11:53:38 2009 *************** static asymbol * *** 3627,3638 **** ieee_make_empty_symbol (bfd *abfd) { bfd_size_type amt = sizeof (ieee_symbol_type); ! ieee_symbol_type *new = bfd_zalloc (abfd, amt); ! if (!new) return NULL; ! new->symbol.the_bfd = abfd; ! return &new->symbol; } static bfd * --- 3627,3638 ---- ieee_make_empty_symbol (bfd *abfd) { bfd_size_type amt = sizeof (ieee_symbol_type); ! ieee_symbol_type *new_symbol = (ieee_symbol_type *) bfd_zalloc (abfd, amt); ! if (!new_symbol) return NULL; ! new_symbol->symbol.the_bfd = abfd; ! return &new_symbol->symbol; } static bfd * diff -prc src.head/bfd/linker.c src.new/bfd/linker.c *** src.head/bfd/linker.c Fri Aug 14 10:59:09 2009 --- src.new/bfd/linker.c Tue Aug 18 11:53:38 2009 *************** struct bfd_link_order * *** 2604,2624 **** bfd_new_link_order (bfd *abfd, asection *section) { bfd_size_type amt = sizeof (struct bfd_link_order); ! struct bfd_link_order *new; ! new = bfd_zalloc (abfd, amt); ! if (!new) return NULL; ! new->type = bfd_undefined_link_order; if (section->map_tail.link_order != NULL) ! section->map_tail.link_order->next = new; else ! section->map_head.link_order = new; ! section->map_tail.link_order = new; ! return new; } /* Default link order processing routine. Note that we can not handle --- 2604,2624 ---- bfd_new_link_order (bfd *abfd, asection *section) { bfd_size_type amt = sizeof (struct bfd_link_order); ! struct bfd_link_order *new_lo; ! new_lo = (struct bfd_link_order *) bfd_zalloc (abfd, amt); ! if (!new_lo) return NULL; ! new_lo->type = bfd_undefined_link_order; if (section->map_tail.link_order != NULL) ! section->map_tail.link_order->next = new_lo; else ! section->map_head.link_order = new_lo; ! section->map_tail.link_order = new_lo; ! return new_lo; } /* Default link order processing routine. Note that we can not handle diff -prc src.head/bfd/mach-o.c src.new/bfd/mach-o.c *** src.head/bfd/mach-o.c Fri Aug 14 10:59:09 2009 --- src.new/bfd/mach-o.c Wed Aug 19 18:30:03 2009 *************** bfd_mach_o_sizeof_headers (bfd *a ATTRIB *** 1255,1268 **** asymbol * bfd_mach_o_make_empty_symbol (bfd *abfd) { ! asymbol *new; ! new = bfd_zalloc (abfd, sizeof (bfd_mach_o_asymbol)); ! if (new == NULL) ! return new; ! new->the_bfd = abfd; ! new->udata.i = 0; ! return new; } static bfd_boolean --- 1255,1268 ---- asymbol * bfd_mach_o_make_empty_symbol (bfd *abfd) { ! asymbol *new_symbol; ! new_symbol = bfd_zalloc (abfd, sizeof (bfd_mach_o_asymbol)); ! if (new_symbol == NULL) ! return new_symbol; ! new_symbol->the_bfd = abfd; ! new_symbol->udata.i = 0; ! return new_symbol; } static bfd_boolean diff -prc src.head/bfd/oasys.c src.new/bfd/oasys.c *** src.head/bfd/oasys.c Tue Jun 16 09:07:20 2009 --- src.new/bfd/oasys.c Wed Aug 19 18:30:42 2009 *************** static asymbol * *** 1084,1095 **** oasys_make_empty_symbol (bfd *abfd) { bfd_size_type amt = sizeof (oasys_symbol_type); ! oasys_symbol_type *new = bfd_zalloc (abfd, amt); ! if (!new) return NULL; ! new->symbol.the_bfd = abfd; ! return &new->symbol; } /* User should have checked the file flags; perhaps we should return --- 1084,1095 ---- oasys_make_empty_symbol (bfd *abfd) { bfd_size_type amt = sizeof (oasys_symbol_type); ! oasys_symbol_type *new_symbol_type = bfd_zalloc (abfd, amt); ! if (!new_symbol_type) return NULL; ! new_symbol_type->symbol.the_bfd = abfd; ! return &new_symbol_type->symbol; } /* User should have checked the file flags; perhaps we should return diff -prc src.head/bfd/pdp11.c src.new/bfd/pdp11.c *** src.head/bfd/pdp11.c Tue Jun 16 09:07:20 2009 --- src.new/bfd/pdp11.c Wed Aug 19 18:31:26 2009 *************** asymbol * *** 1433,1445 **** NAME (aout, make_empty_symbol) (bfd *abfd) { bfd_size_type amt = sizeof (aout_symbol_type); ! aout_symbol_type *new = bfd_zalloc (abfd, amt); ! if (!new) return NULL; ! new->symbol.the_bfd = abfd; ! return &new->symbol; } /* Translate a set of internal symbols into external symbols. */ --- 1433,1445 ---- NAME (aout, make_empty_symbol) (bfd *abfd) { bfd_size_type amt = sizeof (aout_symbol_type); ! aout_symbol_type *new_symbol_type = bfd_zalloc (abfd, amt); ! if (!new_symbol_type) return NULL; ! new_symbol_type->symbol.the_bfd = abfd; ! return &new_symbol_type->symbol; } /* Translate a set of internal symbols into external symbols. */ diff -prc src.head/bfd/plugin.c src.new/bfd/plugin.c *** src.head/bfd/plugin.c Fri Aug 14 10:59:12 2009 --- src.new/bfd/plugin.c Wed Aug 19 18:31:53 2009 *************** bfd_plugin_get_symbol_info (bfd *abfd AT *** 415,425 **** static asymbol * bfd_plugin_make_empty_symbol (bfd *abfd) { ! asymbol *new = bfd_zalloc (abfd, sizeof (asymbol)); ! if (new == NULL) ! return new; ! new->the_bfd = abfd; ! return new; } static int --- 415,425 ---- static asymbol * bfd_plugin_make_empty_symbol (bfd *abfd) { ! asymbol *new_symbol = bfd_zalloc (abfd, sizeof (asymbol)); ! if (new_symbol == NULL) ! return new_symbol; ! new_symbol->the_bfd = abfd; ! return new_symbol; } static int diff -prc src.head/bfd/rs6000-core.c src.new/bfd/rs6000-core.c *** src.head/bfd/rs6000-core.c Tue Jun 16 09:07:21 2009 --- src.new/bfd/rs6000-core.c Wed Aug 19 18:34:41 2009 *************** typedef union { *** 107,115 **** typedef union { #ifdef AIX_CORE_DUMPX_CORE ! struct core_dumpx new; /* new AIX 4.3+ core dump */ #else ! struct core_dump new; /* for simpler coding */ #endif struct core_dump old; /* old AIX 4.2- core dump, still used on 4.3+ with appropriate SMIT config */ --- 107,115 ---- typedef union { #ifdef AIX_CORE_DUMPX_CORE ! struct core_dumpx new_dump; /* new AIX 4.3+ core dump */ #else ! struct core_dump new_dump; /* for simpler coding */ #endif struct core_dump old; /* old AIX 4.2- core dump, still used on 4.3+ with appropriate SMIT config */ *************** typedef union { *** 120,128 **** #ifdef CORE_VERSION_1 typedef union { #ifdef AIX_CORE_DUMPX_CORE ! struct vm_infox new; #else ! struct vm_info new; #endif struct vm_info old; } VmInfo; --- 120,128 ---- #ifdef CORE_VERSION_1 typedef union { #ifdef AIX_CORE_DUMPX_CORE ! struct vm_infox new_dump; #else ! struct vm_info new_dump; #endif struct vm_info old; } VmInfo; *************** typedef union { *** 144,150 **** #ifdef AIX_5_CORE # define CORE_DUMPXX_VERSION 267312562 ! # define CNEW_IS_CORE_DUMPXX(c) ((c).new.c_version == CORE_DUMPXX_VERSION) #else # define CNEW_IS_CORE_DUMPXX(c) 0 #endif --- 144,150 ---- #ifdef AIX_5_CORE # define CORE_DUMPXX_VERSION 267312562 ! # define CNEW_IS_CORE_DUMPXX(c) ((c).new_dump.c_version == CORE_DUMPXX_VERSION) #else # define CNEW_IS_CORE_DUMPXX(c) 0 #endif *************** read_hdr (bfd *abfd, CoreHdr *core) *** 291,297 **** /* Read the trailing portion of the structure. */ if (CORE_NEW (*core)) ! size = sizeof (core->new); else size = sizeof (core->old); size -= CORE_COMMONSZ; --- 291,297 ---- /* Read the trailing portion of the structure. */ if (CORE_NEW (*core)) ! size = sizeof (core->new_core); else size = sizeof (core->old); size -= CORE_COMMONSZ; *************** rs6000coff_core_p (bfd *abfd) *** 352,364 **** /* Copy fields from new or old core structure. */ if (CORE_NEW (core)) { ! c_flag = core.new.c_flag; ! c_stack = (file_ptr) core.new.c_stack; ! c_size = core.new.c_size; ! c_stackend = CNEW_STACKORG (core.new) + c_size; ! c_lsize = CNEW_LSIZE (core.new); ! c_loader = CNEW_LOADER (core.new); ! proc64 = CNEW_PROC64 (core.new); } else { --- 352,364 ---- /* Copy fields from new or old core structure. */ if (CORE_NEW (core)) { ! c_flag = core.new_dump.c_flag; ! c_stack = (file_ptr) core.new_dump.c_stack; ! c_size = core.new_dump.c_size; ! c_stackend = CNEW_STACKORG (core.new_dump) + c_size; ! c_lsize = CNEW_LSIZE (core.new_dump); ! c_loader = CNEW_LOADER (core.new_dump); ! proc64 = CNEW_PROC64 (core.new_dump); } else { *************** rs6000coff_core_p (bfd *abfd) *** 373,385 **** if (proc64) { ! c_regsize = sizeof (CNEW_CONTEXT64 (core.new)); ! c_regptr = &CNEW_CONTEXT64 (core.new); } else if (CORE_NEW (core)) { ! c_regsize = sizeof (CNEW_MSTSAVE (core.new)); ! c_regptr = &CNEW_MSTSAVE (core.new); } else { --- 373,385 ---- if (proc64) { ! c_regsize = sizeof (CNEW_CONTEXT64 (core.new_dump)); ! c_regptr = &CNEW_CONTEXT64 (core.new_dump); } else if (CORE_NEW (core)) { ! c_regsize = sizeof (CNEW_MSTSAVE (core.new_dump)); ! c_regptr = &CNEW_MSTSAVE (core.new_dump); } else { *************** rs6000coff_core_p (bfd *abfd) *** 449,455 **** bfd_get_filename (abfd)); /* Allocate core file header. */ ! size = CORE_NEW (core) ? sizeof (core.new) : sizeof (core.old); tmpptr = (char *) bfd_zalloc (abfd, (bfd_size_type) size); if (!tmpptr) return NULL; --- 449,455 ---- bfd_get_filename (abfd)); /* Allocate core file header. */ ! size = CORE_NEW (core) ? sizeof (core.new_dump) : sizeof (core.old); tmpptr = (char *) bfd_zalloc (abfd, (bfd_size_type) size); if (!tmpptr) return NULL; *************** rs6000coff_core_p (bfd *abfd) *** 464,470 **** enum bfd_architecture arch; unsigned long mach; ! switch (CNEW_IMPL (core.new)) { case POWER_RS1: case POWER_RSC: --- 464,470 ---- enum bfd_architecture arch; unsigned long mach; ! switch (CNEW_IMPL (core.new_dump)) { case POWER_RS1: case POWER_RSC: *************** rs6000coff_core_p (bfd *abfd) *** 537,546 **** if (CORE_NEW (core)) { ! c_datasize = CNEW_DATASIZE (core.new); ! c_data = (file_ptr) core.new.c_data; ! c_vmregions = core.new.c_vmregions; ! c_vmm = (file_ptr) core.new.c_vmm; } else { --- 537,546 ---- if (CORE_NEW (core)) { ! c_datasize = CNEW_DATASIZE (core.new_dump); ! c_data = (file_ptr) core.new_dump.c_data; ! c_vmregions = core.new_dump.c_vmregions; ! c_vmm = (file_ptr) core.new_dump.c_vmm; } else { *************** rs6000coff_core_p (bfd *abfd) *** 615,629 **** file_ptr vminfo_offset; bfd_vma vminfo_addr; ! size = CORE_NEW (core) ? sizeof (vminfo.new) : sizeof (vminfo.old); if (bfd_bread (&vminfo, size, abfd) != size) goto fail; if (CORE_NEW (core)) { ! vminfo_addr = (bfd_vma) vminfo.new.vminfo_addr; ! vminfo_size = vminfo.new.vminfo_size; ! vminfo_offset = vminfo.new.vminfo_offset; } else { --- 615,629 ---- file_ptr vminfo_offset; bfd_vma vminfo_addr; ! size = CORE_NEW (core) ? sizeof (vminfo.new_dump) : sizeof (vminfo.old); if (bfd_bread (&vminfo, size, abfd) != size) goto fail; if (CORE_NEW (core)) { ! vminfo_addr = (bfd_vma) vminfo.new_dump.vminfo_addr; ! vminfo_size = vminfo.new_dump.vminfo_size; ! vminfo_offset = vminfo.new_dump.vminfo_offset; } else { *************** rs6000coff_core_file_matches_executable_ *** 669,679 **** return FALSE; if (CORE_NEW (core)) ! c_loader = CNEW_LOADER (core.new); else c_loader = (file_ptr) (ptr_to_uint) COLD_LOADER (core.old); ! if (CORE_NEW (core) && CNEW_PROC64 (core.new)) size = (int) ((LdInfo *) 0)->l64.ldinfo_filename; else size = (int) ((LdInfo *) 0)->l32.ldinfo_filename; --- 669,679 ---- return FALSE; if (CORE_NEW (core)) ! c_loader = CNEW_LOADER (core.new_dump); else c_loader = (file_ptr) (ptr_to_uint) COLD_LOADER (core.old); ! if (CORE_NEW (core) && CNEW_PROC64 (core.new_dump)) size = (int) ((LdInfo *) 0)->l64.ldinfo_filename; else size = (int) ((LdInfo *) 0)->l32.ldinfo_filename; *************** rs6000coff_core_file_failing_command (bf *** 735,741 **** { CoreHdr *core = core_hdr (abfd); char *com = CORE_NEW (*core) ? ! CNEW_COMM (core->new) : COLD_COMM (core->old); if (*com) return com; --- 735,741 ---- { CoreHdr *core = core_hdr (abfd); char *com = CORE_NEW (*core) ? ! CNEW_COMM (core->new_dump) : COLD_COMM (core->old); if (*com) return com; *************** int *** 747,753 **** rs6000coff_core_file_failing_signal (bfd *abfd) { CoreHdr *core = core_hdr (abfd); ! return CORE_NEW (*core) ? core->new.c_signo : core->old.c_signo; } #endif /* AIX_CORE */ --- 747,753 ---- rs6000coff_core_file_failing_signal (bfd *abfd) { CoreHdr *core = core_hdr (abfd); ! return CORE_NEW (*core) ? core->new_dump.c_signo : core->old.c_signo; } #endif /* AIX_CORE */ diff -prc src.head/bfd/som.c src.new/bfd/som.c *** src.head/bfd/som.c Tue Jun 16 09:07:21 2009 --- src.new/bfd/som.c Wed Aug 19 18:35:41 2009 *************** static asymbol * *** 4472,4484 **** som_make_empty_symbol (bfd *abfd) { bfd_size_type amt = sizeof (som_symbol_type); ! som_symbol_type *new = bfd_zalloc (abfd, amt); ! if (new == NULL) return NULL; ! new->symbol.the_bfd = abfd; ! return &new->symbol; } /* Print symbol information. */ --- 4472,4484 ---- som_make_empty_symbol (bfd *abfd) { bfd_size_type amt = sizeof (som_symbol_type); ! som_symbol_type *new_symbol_type = bfd_zalloc (abfd, amt); ! if (new_symbol_type == NULL) return NULL; ! new_symbol_type->symbol.the_bfd = abfd; ! return &new_symbol_type->symbol; } /* Print symbol information. */ diff -prc src.head/bfd/syms.c src.new/bfd/syms.c *** src.head/bfd/syms.c Fri Aug 14 10:59:12 2009 --- src.new/bfd/syms.c Tue Aug 18 11:53:38 2009 *************** asymbol * *** 539,548 **** _bfd_generic_make_empty_symbol (bfd *abfd) { bfd_size_type amt = sizeof (asymbol); ! asymbol *new = bfd_zalloc (abfd, amt); ! if (new) ! new->the_bfd = abfd; ! return new; } /* --- 539,548 ---- _bfd_generic_make_empty_symbol (bfd *abfd) { bfd_size_type amt = sizeof (asymbol); ! asymbol *new_symbol = (asymbol *) bfd_zalloc (abfd, amt); ! if (new_symbol) ! new_symbol->the_bfd = abfd; ! return new_symbol; } /* diff -prc src.head/bfd/tekhex.c src.new/bfd/tekhex.c *** src.head/bfd/tekhex.c Tue Jun 16 09:07:21 2009 --- src.new/bfd/tekhex.c Tue Aug 18 11:53:38 2009 *************** first_phase (bfd *abfd, int type, char * *** 415,445 **** /* Symbols, add to section. */ { bfd_size_type amt = sizeof (tekhex_symbol_type); ! tekhex_symbol_type *new = bfd_alloc (abfd, amt); char stype = (*src); ! if (!new) return FALSE; ! new->symbol.the_bfd = abfd; src++; abfd->symcount++; abfd->flags |= HAS_SYMS; ! new->prev = abfd->tdata.tekhex_data->symbols; ! abfd->tdata.tekhex_data->symbols = new; if (!getsym (sym, &src, &len)) return FALSE; ! new->symbol.name = bfd_alloc (abfd, (bfd_size_type) len + 1); ! if (!new->symbol.name) return FALSE; ! memcpy ((char *) (new->symbol.name), sym, len + 1); ! new->symbol.section = section; if (stype <= '4') ! new->symbol.flags = (BSF_GLOBAL | BSF_EXPORT); else ! new->symbol.flags = BSF_LOCAL; if (!getvalue (&src, &val)) return FALSE; ! new->symbol.value = val - section->vma; break; } default: --- 415,447 ---- /* Symbols, add to section. */ { bfd_size_type amt = sizeof (tekhex_symbol_type); ! tekhex_symbol_type *new_symbol = (tekhex_symbol_type *) ! bfd_alloc (abfd, amt); char stype = (*src); ! if (!new_symbol) return FALSE; ! new_symbol->symbol.the_bfd = abfd; src++; abfd->symcount++; abfd->flags |= HAS_SYMS; ! new_symbol->prev = abfd->tdata.tekhex_data->symbols; ! abfd->tdata.tekhex_data->symbols = new_symbol; if (!getsym (sym, &src, &len)) return FALSE; ! new_symbol->symbol.name = (const char *) ! bfd_alloc (abfd, (bfd_size_type) len + 1); ! if (!new_symbol->symbol.name) return FALSE; ! memcpy ((char *) (new_symbol->symbol.name), sym, len + 1); ! new_symbol->symbol.section = section; if (stype <= '4') ! new_symbol->symbol.flags = (BSF_GLOBAL | BSF_EXPORT); else ! new_symbol->symbol.flags = BSF_LOCAL; if (!getvalue (&src, &val)) return FALSE; ! new_symbol->symbol.value = val - section->vma; break; } default: *************** static asymbol * *** 880,892 **** tekhex_make_empty_symbol (bfd *abfd) { bfd_size_type amt = sizeof (struct tekhex_symbol_struct); ! tekhex_symbol_type *new = bfd_zalloc (abfd, amt); ! if (!new) return NULL; ! new->symbol.the_bfd = abfd; ! new->prev = NULL; ! return &(new->symbol); } static void --- 882,895 ---- tekhex_make_empty_symbol (bfd *abfd) { bfd_size_type amt = sizeof (struct tekhex_symbol_struct); ! tekhex_symbol_type *new_symbol = (tekhex_symbol_type *) bfd_zalloc (abfd, ! amt); ! if (!new_symbol) return NULL; ! new_symbol->symbol.the_bfd = abfd; ! new_symbol->prev = NULL; ! return &(new_symbol->symbol); } static void diff -prc src.head/binutils/nlmconv.c src.new/binutils/nlmconv.c *** src.head/binutils/nlmconv.c Tue Jun 16 09:07:12 2009 --- src.new/binutils/nlmconv.c Wed Aug 19 18:20:53 2009 *************** main (int argc, char **argv) *** 476,498 **** ++sym->name; else { ! char *new; ! new = xmalloc (strlen (bfd_asymbol_name (sym)) + 1); ! new[0] = outlead; ! strcpy (new + 1, bfd_asymbol_name (sym) + 1); ! sym->name = new; } } } else { ! char *new; ! new = xmalloc (strlen (bfd_asymbol_name (sym)) + 2); ! new[0] = outlead; ! strcpy (new + 1, bfd_asymbol_name (sym)); ! sym->name = new; } } --- 476,498 ---- ++sym->name; else { ! char *new_name; ! new_name = xmalloc (strlen (bfd_asymbol_name (sym)) + 1); ! new_name[0] = outlead; ! strcpy (new_name + 1, bfd_asymbol_name (sym) + 1); ! sym->name = new_name; } } } else { ! char *new_name; ! new_name = xmalloc (strlen (bfd_asymbol_name (sym)) + 2); ! new_name[0] = outlead; ! strcpy (new_name + 1, bfd_asymbol_name (sym)); ! sym->name = new_name; } } Only in src.head: cvs.diff diff -prc src.head/gas/config/tc-arm.c src.new/gas/config/tc-arm.c *** src.head/gas/config/tc-arm.c Fri Aug 14 10:59:49 2009 --- src.new/gas/config/tc-arm.c Tue Aug 18 11:53:38 2009 *************** parse_reloc (char **str) *** 2048,2082 **** static struct reg_entry * insert_reg_alias (char *str, int number, int type) { ! struct reg_entry *new; const char *name; ! if ((new = hash_find (arm_reg_hsh, str)) != 0) { ! if (new->builtin) as_warn (_("ignoring attempt to redefine built-in register '%s'"), str); /* Only warn about a redefinition if it's not defined as the same register. */ ! else if (new->number != number || new->type != type) as_warn (_("ignoring redefinition of register alias '%s'"), str); return NULL; } name = xstrdup (str); ! new = xmalloc (sizeof (struct reg_entry)); ! new->name = name; ! new->number = number; ! new->type = type; ! new->builtin = FALSE; ! new->neon = NULL; ! if (hash_insert (arm_reg_hsh, name, (void *) new)) abort (); ! return new; } static void --- 2048,2082 ---- static struct reg_entry * insert_reg_alias (char *str, int number, int type) { ! struct reg_entry *new_reg; const char *name; ! if ((new_reg = (struct reg_entry *) hash_find (arm_reg_hsh, str)) != 0) { ! if (new_reg->builtin) as_warn (_("ignoring attempt to redefine built-in register '%s'"), str); /* Only warn about a redefinition if it's not defined as the same register. */ ! else if (new_reg->number != number || new_reg->type != type) as_warn (_("ignoring redefinition of register alias '%s'"), str); return NULL; } name = xstrdup (str); ! new_reg = (struct reg_entry *) xmalloc (sizeof (struct reg_entry)); ! new_reg->name = name; ! new_reg->number = number; ! new_reg->type = type; ! new_reg->builtin = FALSE; ! new_reg->neon = NULL; ! if (hash_insert (arm_reg_hsh, name, (void *) new_reg)) abort (); ! return new_reg; } static void diff -prc src.head/gas/config/tc-dlx.c src.new/gas/config/tc-dlx.c *** src.head/gas/config/tc-dlx.c Fri Aug 14 10:59:50 2009 --- src.new/gas/config/tc-dlx.c Tue Aug 18 11:53:38 2009 *************** static char * *** 594,600 **** parse_operand (char *s, expressionS *operandp) { char *save = input_line_pointer; ! char *new; the_insn.HI = the_insn.LO = 0; --- 594,600 ---- parse_operand (char *s, expressionS *operandp) { char *save = input_line_pointer; ! char *new_pos; the_insn.HI = the_insn.LO = 0; *************** parse_operand (char *s, expressionS *ope *** 641,649 **** (void) expression (operandp); } ! new = input_line_pointer; input_line_pointer = save; ! return new; } /* Instruction parsing. Takes a string containing the opcode. --- 641,649 ---- (void) expression (operandp); } ! new_pos = input_line_pointer; input_line_pointer = save; ! return new_pos; } /* Instruction parsing. Takes a string containing the opcode. diff -prc src.head/gas/config/tc-ia64.c src.new/gas/config/tc-ia64.c *** src.head/gas/config/tc-ia64.c Fri Aug 14 10:59:51 2009 --- src.new/gas/config/tc-ia64.c Tue Aug 18 11:53:38 2009 *************** ia64_cons_fix_new (fragS *f, int where, *** 10861,10867 **** static bfd_reloc_code_real_type ia64_gen_real_reloc_type (struct symbol *sym, bfd_reloc_code_real_type r_type) { ! bfd_reloc_code_real_type new = 0; const char *type = NULL, *suffix = ""; if (sym == NULL) --- 10861,10867 ---- static bfd_reloc_code_real_type ia64_gen_real_reloc_type (struct symbol *sym, bfd_reloc_code_real_type r_type) { ! bfd_reloc_code_real_type newr = 0; const char *type = NULL, *suffix = ""; if (sym == NULL) *************** ia64_gen_real_reloc_type (struct symbol *** 10874,10884 **** case FUNC_FPTR_RELATIVE: switch (r_type) { ! case BFD_RELOC_IA64_IMM64: new = BFD_RELOC_IA64_FPTR64I; break; ! case BFD_RELOC_IA64_DIR32MSB: new = BFD_RELOC_IA64_FPTR32MSB; break; ! case BFD_RELOC_IA64_DIR32LSB: new = BFD_RELOC_IA64_FPTR32LSB; break; ! case BFD_RELOC_IA64_DIR64MSB: new = BFD_RELOC_IA64_FPTR64MSB; break; ! case BFD_RELOC_IA64_DIR64LSB: new = BFD_RELOC_IA64_FPTR64LSB; break; default: type = "FPTR"; break; } break; --- 10874,10884 ---- case FUNC_FPTR_RELATIVE: switch (r_type) { ! case BFD_RELOC_IA64_IMM64: newr = BFD_RELOC_IA64_FPTR64I; break; ! case BFD_RELOC_IA64_DIR32MSB: newr = BFD_RELOC_IA64_FPTR32MSB; break; ! case BFD_RELOC_IA64_DIR32LSB: newr = BFD_RELOC_IA64_FPTR32LSB; break; ! case BFD_RELOC_IA64_DIR64MSB: newr = BFD_RELOC_IA64_FPTR64MSB; break; ! case BFD_RELOC_IA64_DIR64LSB: newr = BFD_RELOC_IA64_FPTR64LSB; break; default: type = "FPTR"; break; } break; *************** ia64_gen_real_reloc_type (struct symbol *** 10886,10897 **** case FUNC_GP_RELATIVE: switch (r_type) { ! case BFD_RELOC_IA64_IMM22: new = BFD_RELOC_IA64_GPREL22; break; ! case BFD_RELOC_IA64_IMM64: new = BFD_RELOC_IA64_GPREL64I; break; ! case BFD_RELOC_IA64_DIR32MSB: new = BFD_RELOC_IA64_GPREL32MSB; break; ! case BFD_RELOC_IA64_DIR32LSB: new = BFD_RELOC_IA64_GPREL32LSB; break; ! case BFD_RELOC_IA64_DIR64MSB: new = BFD_RELOC_IA64_GPREL64MSB; break; ! case BFD_RELOC_IA64_DIR64LSB: new = BFD_RELOC_IA64_GPREL64LSB; break; default: type = "GPREL"; break; } break; --- 10886,10897 ---- case FUNC_GP_RELATIVE: switch (r_type) { ! case BFD_RELOC_IA64_IMM22: newr = BFD_RELOC_IA64_GPREL22; break; ! case BFD_RELOC_IA64_IMM64: newr = BFD_RELOC_IA64_GPREL64I; break; ! case BFD_RELOC_IA64_DIR32MSB: newr = BFD_RELOC_IA64_GPREL32MSB; break; ! case BFD_RELOC_IA64_DIR32LSB: newr = BFD_RELOC_IA64_GPREL32LSB; break; ! case BFD_RELOC_IA64_DIR64MSB: newr = BFD_RELOC_IA64_GPREL64MSB; break; ! case BFD_RELOC_IA64_DIR64LSB: newr = BFD_RELOC_IA64_GPREL64LSB; break; default: type = "GPREL"; break; } break; *************** ia64_gen_real_reloc_type (struct symbol *** 10899,10906 **** case FUNC_LT_RELATIVE: switch (r_type) { ! case BFD_RELOC_IA64_IMM22: new = BFD_RELOC_IA64_LTOFF22; break; ! case BFD_RELOC_IA64_IMM64: new = BFD_RELOC_IA64_LTOFF64I; break; default: type = "LTOFF"; break; } break; --- 10899,10906 ---- case FUNC_LT_RELATIVE: switch (r_type) { ! case BFD_RELOC_IA64_IMM22: newr = BFD_RELOC_IA64_LTOFF22; break; ! case BFD_RELOC_IA64_IMM64: newr = BFD_RELOC_IA64_LTOFF64I; break; default: type = "LTOFF"; break; } break; *************** ia64_gen_real_reloc_type (struct symbol *** 10908,10914 **** case FUNC_LT_RELATIVE_X: switch (r_type) { ! case BFD_RELOC_IA64_IMM22: new = BFD_RELOC_IA64_LTOFF22X; break; default: type = "LTOFF"; suffix = "X"; break; } break; --- 10908,10914 ---- case FUNC_LT_RELATIVE_X: switch (r_type) { ! case BFD_RELOC_IA64_IMM22: newr = BFD_RELOC_IA64_LTOFF22X; break; default: type = "LTOFF"; suffix = "X"; break; } break; *************** ia64_gen_real_reloc_type (struct symbol *** 10916,10927 **** case FUNC_PC_RELATIVE: switch (r_type) { ! case BFD_RELOC_IA64_IMM22: new = BFD_RELOC_IA64_PCREL22; break; ! case BFD_RELOC_IA64_IMM64: new = BFD_RELOC_IA64_PCREL64I; break; ! case BFD_RELOC_IA64_DIR32MSB: new = BFD_RELOC_IA64_PCREL32MSB; break; ! case BFD_RELOC_IA64_DIR32LSB: new = BFD_RELOC_IA64_PCREL32LSB; break; ! case BFD_RELOC_IA64_DIR64MSB: new = BFD_RELOC_IA64_PCREL64MSB; break; ! case BFD_RELOC_IA64_DIR64LSB: new = BFD_RELOC_IA64_PCREL64LSB; break; default: type = "PCREL"; break; } break; --- 10916,10927 ---- case FUNC_PC_RELATIVE: switch (r_type) { ! case BFD_RELOC_IA64_IMM22: newr = BFD_RELOC_IA64_PCREL22; break; ! case BFD_RELOC_IA64_IMM64: newr = BFD_RELOC_IA64_PCREL64I; break; ! case BFD_RELOC_IA64_DIR32MSB: newr = BFD_RELOC_IA64_PCREL32MSB; break; ! case BFD_RELOC_IA64_DIR32LSB: newr = BFD_RELOC_IA64_PCREL32LSB; break; ! case BFD_RELOC_IA64_DIR64MSB: newr = BFD_RELOC_IA64_PCREL64MSB; break; ! case BFD_RELOC_IA64_DIR64LSB: newr = BFD_RELOC_IA64_PCREL64LSB; break; default: type = "PCREL"; break; } break; *************** ia64_gen_real_reloc_type (struct symbol *** 10929,10938 **** case FUNC_PLT_RELATIVE: switch (r_type) { ! case BFD_RELOC_IA64_IMM22: new = BFD_RELOC_IA64_PLTOFF22; break; ! case BFD_RELOC_IA64_IMM64: new = BFD_RELOC_IA64_PLTOFF64I; break; ! case BFD_RELOC_IA64_DIR64MSB: new = BFD_RELOC_IA64_PLTOFF64MSB;break; ! case BFD_RELOC_IA64_DIR64LSB: new = BFD_RELOC_IA64_PLTOFF64LSB;break; default: type = "PLTOFF"; break; } break; --- 10929,10938 ---- case FUNC_PLT_RELATIVE: switch (r_type) { ! case BFD_RELOC_IA64_IMM22: newr = BFD_RELOC_IA64_PLTOFF22; break; ! case BFD_RELOC_IA64_IMM64: newr = BFD_RELOC_IA64_PLTOFF64I; break; ! case BFD_RELOC_IA64_DIR64MSB: newr = BFD_RELOC_IA64_PLTOFF64MSB;break; ! case BFD_RELOC_IA64_DIR64LSB: newr = BFD_RELOC_IA64_PLTOFF64LSB;break; default: type = "PLTOFF"; break; } break; *************** ia64_gen_real_reloc_type (struct symbol *** 10940,10949 **** case FUNC_SEC_RELATIVE: switch (r_type) { ! case BFD_RELOC_IA64_DIR32MSB: new = BFD_RELOC_IA64_SECREL32MSB;break; ! case BFD_RELOC_IA64_DIR32LSB: new = BFD_RELOC_IA64_SECREL32LSB;break; ! case BFD_RELOC_IA64_DIR64MSB: new = BFD_RELOC_IA64_SECREL64MSB;break; ! case BFD_RELOC_IA64_DIR64LSB: new = BFD_RELOC_IA64_SECREL64LSB;break; default: type = "SECREL"; break; } break; --- 10940,10949 ---- case FUNC_SEC_RELATIVE: switch (r_type) { ! case BFD_RELOC_IA64_DIR32MSB: newr = BFD_RELOC_IA64_SECREL32MSB;break; ! case BFD_RELOC_IA64_DIR32LSB: newr = BFD_RELOC_IA64_SECREL32LSB;break; ! case BFD_RELOC_IA64_DIR64MSB: newr = BFD_RELOC_IA64_SECREL64MSB;break; ! case BFD_RELOC_IA64_DIR64LSB: newr = BFD_RELOC_IA64_SECREL64LSB;break; default: type = "SECREL"; break; } break; *************** ia64_gen_real_reloc_type (struct symbol *** 10951,10960 **** case FUNC_SEG_RELATIVE: switch (r_type) { ! case BFD_RELOC_IA64_DIR32MSB: new = BFD_RELOC_IA64_SEGREL32MSB;break; ! case BFD_RELOC_IA64_DIR32LSB: new = BFD_RELOC_IA64_SEGREL32LSB;break; ! case BFD_RELOC_IA64_DIR64MSB: new = BFD_RELOC_IA64_SEGREL64MSB;break; ! case BFD_RELOC_IA64_DIR64LSB: new = BFD_RELOC_IA64_SEGREL64LSB;break; default: type = "SEGREL"; break; } break; --- 10951,10960 ---- case FUNC_SEG_RELATIVE: switch (r_type) { ! case BFD_RELOC_IA64_DIR32MSB: newr = BFD_RELOC_IA64_SEGREL32MSB;break; ! case BFD_RELOC_IA64_DIR32LSB: newr = BFD_RELOC_IA64_SEGREL32LSB;break; ! case BFD_RELOC_IA64_DIR64MSB: newr = BFD_RELOC_IA64_SEGREL64MSB;break; ! case BFD_RELOC_IA64_DIR64LSB: newr = BFD_RELOC_IA64_SEGREL64LSB;break; default: type = "SEGREL"; break; } break; *************** ia64_gen_real_reloc_type (struct symbol *** 10962,10971 **** case FUNC_LTV_RELATIVE: switch (r_type) { ! case BFD_RELOC_IA64_DIR32MSB: new = BFD_RELOC_IA64_LTV32MSB; break; ! case BFD_RELOC_IA64_DIR32LSB: new = BFD_RELOC_IA64_LTV32LSB; break; ! case BFD_RELOC_IA64_DIR64MSB: new = BFD_RELOC_IA64_LTV64MSB; break; ! case BFD_RELOC_IA64_DIR64LSB: new = BFD_RELOC_IA64_LTV64LSB; break; default: type = "LTV"; break; } break; --- 10962,10971 ---- case FUNC_LTV_RELATIVE: switch (r_type) { ! case BFD_RELOC_IA64_DIR32MSB: newr = BFD_RELOC_IA64_LTV32MSB; break; ! case BFD_RELOC_IA64_DIR32LSB: newr = BFD_RELOC_IA64_LTV32LSB; break; ! case BFD_RELOC_IA64_DIR64MSB: newr = BFD_RELOC_IA64_LTV64MSB; break; ! case BFD_RELOC_IA64_DIR64LSB: newr = BFD_RELOC_IA64_LTV64LSB; break; default: type = "LTV"; break; } break; *************** ia64_gen_real_reloc_type (struct symbol *** 10974,10990 **** switch (r_type) { case BFD_RELOC_IA64_IMM22: ! new = BFD_RELOC_IA64_LTOFF_FPTR22; break; case BFD_RELOC_IA64_IMM64: ! new = BFD_RELOC_IA64_LTOFF_FPTR64I; break; case BFD_RELOC_IA64_DIR32MSB: ! new = BFD_RELOC_IA64_LTOFF_FPTR32MSB; break; case BFD_RELOC_IA64_DIR32LSB: ! new = BFD_RELOC_IA64_LTOFF_FPTR32LSB; break; case BFD_RELOC_IA64_DIR64MSB: ! new = BFD_RELOC_IA64_LTOFF_FPTR64MSB; break; case BFD_RELOC_IA64_DIR64LSB: ! new = BFD_RELOC_IA64_LTOFF_FPTR64LSB; break; default: type = "LTOFF_FPTR"; break; } --- 10974,10990 ---- switch (r_type) { case BFD_RELOC_IA64_IMM22: ! newr = BFD_RELOC_IA64_LTOFF_FPTR22; break; case BFD_RELOC_IA64_IMM64: ! newr = BFD_RELOC_IA64_LTOFF_FPTR64I; break; case BFD_RELOC_IA64_DIR32MSB: ! newr = BFD_RELOC_IA64_LTOFF_FPTR32MSB; break; case BFD_RELOC_IA64_DIR32LSB: ! newr = BFD_RELOC_IA64_LTOFF_FPTR32LSB; break; case BFD_RELOC_IA64_DIR64MSB: ! newr = BFD_RELOC_IA64_LTOFF_FPTR64MSB; break; case BFD_RELOC_IA64_DIR64LSB: ! newr = BFD_RELOC_IA64_LTOFF_FPTR64LSB; break; default: type = "LTOFF_FPTR"; break; } *************** ia64_gen_real_reloc_type (struct symbol *** 10993,11003 **** case FUNC_TP_RELATIVE: switch (r_type) { ! case BFD_RELOC_IA64_IMM14: new = BFD_RELOC_IA64_TPREL14; break; ! case BFD_RELOC_IA64_IMM22: new = BFD_RELOC_IA64_TPREL22; break; ! case BFD_RELOC_IA64_IMM64: new = BFD_RELOC_IA64_TPREL64I; break; ! case BFD_RELOC_IA64_DIR64MSB: new = BFD_RELOC_IA64_TPREL64MSB; break; ! case BFD_RELOC_IA64_DIR64LSB: new = BFD_RELOC_IA64_TPREL64LSB; break; default: type = "TPREL"; break; } break; --- 10993,11003 ---- case FUNC_TP_RELATIVE: switch (r_type) { ! case BFD_RELOC_IA64_IMM14: newr = BFD_RELOC_IA64_TPREL14; break; ! case BFD_RELOC_IA64_IMM22: newr = BFD_RELOC_IA64_TPREL22; break; ! case BFD_RELOC_IA64_IMM64: newr = BFD_RELOC_IA64_TPREL64I; break; ! case BFD_RELOC_IA64_DIR64MSB: newr = BFD_RELOC_IA64_TPREL64MSB; break; ! case BFD_RELOC_IA64_DIR64LSB: newr = BFD_RELOC_IA64_TPREL64LSB; break; default: type = "TPREL"; break; } break; *************** ia64_gen_real_reloc_type (struct symbol *** 11006,11012 **** switch (r_type) { case BFD_RELOC_IA64_IMM22: ! new = BFD_RELOC_IA64_LTOFF_TPREL22; break; default: type = "LTOFF_TPREL"; break; } --- 11006,11012 ---- switch (r_type) { case BFD_RELOC_IA64_IMM22: ! newr = BFD_RELOC_IA64_LTOFF_TPREL22; break; default: type = "LTOFF_TPREL"; break; } *************** ia64_gen_real_reloc_type (struct symbol *** 11016,11024 **** switch (r_type) { case BFD_RELOC_IA64_DIR64MSB: ! new = BFD_RELOC_IA64_DTPMOD64MSB; break; case BFD_RELOC_IA64_DIR64LSB: ! new = BFD_RELOC_IA64_DTPMOD64LSB; break; default: type = "DTPMOD"; break; } --- 11016,11024 ---- switch (r_type) { case BFD_RELOC_IA64_DIR64MSB: ! newr = BFD_RELOC_IA64_DTPMOD64MSB; break; case BFD_RELOC_IA64_DIR64LSB: ! newr = BFD_RELOC_IA64_DTPMOD64LSB; break; default: type = "DTPMOD"; break; } *************** ia64_gen_real_reloc_type (struct symbol *** 11028,11034 **** switch (r_type) { case BFD_RELOC_IA64_IMM22: ! new = BFD_RELOC_IA64_LTOFF_DTPMOD22; break; default: type = "LTOFF_DTPMOD"; break; } --- 11028,11034 ---- switch (r_type) { case BFD_RELOC_IA64_IMM22: ! newr = BFD_RELOC_IA64_LTOFF_DTPMOD22; break; default: type = "LTOFF_DTPMOD"; break; } *************** ia64_gen_real_reloc_type (struct symbol *** 11038,11056 **** switch (r_type) { case BFD_RELOC_IA64_DIR32MSB: ! new = BFD_RELOC_IA64_DTPREL32MSB; break; case BFD_RELOC_IA64_DIR32LSB: ! new = BFD_RELOC_IA64_DTPREL32LSB; break; case BFD_RELOC_IA64_DIR64MSB: ! new = BFD_RELOC_IA64_DTPREL64MSB; break; case BFD_RELOC_IA64_DIR64LSB: ! new = BFD_RELOC_IA64_DTPREL64LSB; break; case BFD_RELOC_IA64_IMM14: ! new = BFD_RELOC_IA64_DTPREL14; break; case BFD_RELOC_IA64_IMM22: ! new = BFD_RELOC_IA64_DTPREL22; break; case BFD_RELOC_IA64_IMM64: ! new = BFD_RELOC_IA64_DTPREL64I; break; default: type = "DTPREL"; break; } --- 11038,11056 ---- switch (r_type) { case BFD_RELOC_IA64_DIR32MSB: ! newr = BFD_RELOC_IA64_DTPREL32MSB; break; case BFD_RELOC_IA64_DIR32LSB: ! newr = BFD_RELOC_IA64_DTPREL32LSB; break; case BFD_RELOC_IA64_DIR64MSB: ! newr = BFD_RELOC_IA64_DTPREL64MSB; break; case BFD_RELOC_IA64_DIR64LSB: ! newr = BFD_RELOC_IA64_DTPREL64LSB; break; case BFD_RELOC_IA64_IMM14: ! newr = BFD_RELOC_IA64_DTPREL14; break; case BFD_RELOC_IA64_IMM22: ! newr = BFD_RELOC_IA64_DTPREL22; break; case BFD_RELOC_IA64_IMM64: ! newr = BFD_RELOC_IA64_DTPREL64I; break; default: type = "DTPREL"; break; } *************** ia64_gen_real_reloc_type (struct symbol *** 11060,11066 **** switch (r_type) { case BFD_RELOC_IA64_IMM22: ! new = BFD_RELOC_IA64_LTOFF_DTPREL22; break; default: type = "LTOFF_DTPREL"; break; } --- 11060,11066 ---- switch (r_type) { case BFD_RELOC_IA64_IMM22: ! newr = BFD_RELOC_IA64_LTOFF_DTPREL22; break; default: type = "LTOFF_DTPREL"; break; } *************** ia64_gen_real_reloc_type (struct symbol *** 11079,11086 **** abort (); } ! if (new) ! return new; else { int width; --- 11079,11086 ---- abort (); } ! if (newr) ! return newr; else { int width; diff -prc src.head/gas/config/tc-mcore.c src.new/gas/config/tc-mcore.c *** src.head/gas/config/tc-mcore.c Fri Aug 14 10:59:52 2009 --- src.new/gas/config/tc-mcore.c Wed Aug 26 12:45:42 2009 *************** static char * *** 647,653 **** parse_exp (char * s, expressionS * e) { char * save; ! char * new; /* Skip whitespace. */ while (ISSPACE (* s)) --- 647,653 ---- parse_exp (char * s, expressionS * e) { char * save; ! char * new_pointer; /* Skip whitespace. */ while (ISSPACE (* s)) *************** parse_exp (char * s, expressionS * e) *** 661,670 **** if (e->X_op == O_absent) as_bad (_("missing operand")); ! new = input_line_pointer; input_line_pointer = save; ! return new; } static int --- 661,670 ---- if (e->X_op == O_absent) as_bad (_("missing operand")); ! new_pointer = input_line_pointer; input_line_pointer = save; ! return new_pointer; } static int *************** parse_imm (char * s, *** 771,780 **** unsigned min, unsigned max) { ! char * new; expressionS e; ! new = parse_exp (s, & e); if (e.X_op == O_absent) ; /* An error message has already been emitted. */ --- 771,780 ---- unsigned min, unsigned max) { ! char * new_pointer; expressionS e; ! new_pointer = parse_exp (s, & e); if (e.X_op == O_absent) ; /* An error message has already been emitted. */ *************** parse_imm (char * s, *** 786,792 **** * val = e.X_add_number; ! return new; } static char * --- 786,792 ---- * val = e.X_add_number; ! return new_pointer; } static char * diff -prc src.head/gas/config/tc-microblaze.c src.new/gas/config/tc-microblaze.c *** src.head/gas/config/tc-microblaze.c Thu Aug 6 10:38:02 2009 --- src.new/gas/config/tc-microblaze.c Wed Aug 26 12:45:20 2009 *************** static char * *** 568,574 **** parse_exp (char *s, expressionS *e) { char *save; ! char *new; /* Skip whitespace. */ while (isspace (* s)) --- 568,574 ---- parse_exp (char *s, expressionS *e) { char *save; ! char *new_pointer; /* Skip whitespace. */ while (isspace (* s)) *************** parse_exp (char *s, expressionS *e) *** 582,591 **** if (e->X_op == O_absent) as_fatal (_("missing operand")); ! new = input_line_pointer; input_line_pointer = save; ! return new; } /* Symbol modifiers (@GOT, @PLT, @GOTOFF). */ --- 582,591 ---- if (e->X_op == O_absent) as_fatal (_("missing operand")); ! new_pointer = input_line_pointer; input_line_pointer = save; ! return new_pointer; } /* Symbol modifiers (@GOT, @PLT, @GOTOFF). */ *************** static symbolS * GOT_symbol; *** 600,606 **** static char * parse_imm (char * s, expressionS * e, int min, int max) { ! char *new; char *atp; /* Find the start of "@GOT" or "@PLT" suffix (if any) */ --- 600,606 ---- static char * parse_imm (char * s, expressionS * e, int min, int max) { ! char *new_pointer; char *atp; /* Find the start of "@GOT" or "@PLT" suffix (if any) */ *************** parse_imm (char * s, expressionS * e, in *** 643,649 **** GOT_symbol = symbol_find_or_make (GOT_SYMBOL_NAME); } ! new = parse_exp (s, e); if (e->X_op == O_absent) ; /* An error message has already been emitted. */ --- 643,649 ---- GOT_symbol = symbol_find_or_make (GOT_SYMBOL_NAME); } ! new_pointer = parse_exp (s, e); if (e->X_op == O_absent) ; /* An error message has already been emitted. */ *************** parse_imm (char * s, expressionS * e, in *** 659,676 **** if (atp) { *atp = '@'; /* restore back (needed?) */ ! if (new >= atp) ! new += (e->X_md == IMM_GOTOFF)?7:4; /* sizeof("@GOTOFF", "@GOT" or "@PLT") */ } ! return new; } static char * check_got (int * got_type, int * got_len) { ! char *new; char *atp; char *past_got; int first, second; --- 659,676 ---- if (atp) { *atp = '@'; /* restore back (needed?) */ ! if (new_pointer >= atp) ! new_pointer += (e->X_md == IMM_GOTOFF)?7:4; /* sizeof("@GOTOFF", "@GOT" or "@PLT") */ } ! return new_pointer; } static char * check_got (int * got_type, int * got_len) { ! char *new_pointer; char *atp; char *past_got; int first, second; *************** check_got (int * got_type, int * got_len *** 705,713 **** first = atp - input_line_pointer; past_got = atp + *got_len + 1; ! for (new = past_got; !is_end_of_line[(unsigned char) *new++]; ) ; ! second = new - past_got; tmpbuf = xmalloc (first + second + 2); /* One extra byte for ' ' and one for NUL. */ memcpy (tmpbuf, input_line_pointer, first); tmpbuf[first] = ' '; /* @GOTOFF is replaced with a single space. */ --- 705,713 ---- first = atp - input_line_pointer; past_got = atp + *got_len + 1; ! for (new_pointer = past_got; !is_end_of_line[(unsigned char) *new_p++]; ) ; ! second = new_pointer - past_got; tmpbuf = xmalloc (first + second + 2); /* One extra byte for ' ' and one for NUL. */ memcpy (tmpbuf, input_line_pointer, first); tmpbuf[first] = ' '; /* @GOTOFF is replaced with a single space. */ Only in src.head/gas/config: tc-moxie.c.~1.5.~ diff -prc src.head/gas/config/tc-or32.c src.new/gas/config/tc-or32.c *** src.head/gas/config/tc-or32.c Tue Jun 16 09:07:25 2009 --- src.new/gas/config/tc-or32.c Wed Aug 26 12:47:35 2009 *************** static char * *** 262,268 **** parse_operand (char *s, expressionS *operandp, int opt) { char *save = input_line_pointer; ! char *new; #if DEBUG printf (" PROCESS NEW OPERAND(%s) == %c (%d)\n", s, opt ? opt : '!', opt); --- 262,268 ---- parse_operand (char *s, expressionS *operandp, int opt) { char *save = input_line_pointer; ! char *new_pointer; #if DEBUG printf (" PROCESS NEW OPERAND(%s) == %c (%d)\n", s, opt ? opt : '!', opt); *************** parse_operand (char *s, expressionS *ope *** 312,325 **** } } ! new = input_line_pointer; input_line_pointer = save; #if DEBUG ! printf (" %s=parse_operand(%s): operandp->X_op = %u\n", new, s, operandp->X_op); #endif ! return new; } /* Instruction parsing. Takes a string containing the opcode. --- 312,326 ---- } } ! new_pointer = input_line_pointer; input_line_pointer = save; #if DEBUG ! printf (" %s=parse_operand(%s): operandp->X_op = %u\n", new_pointer, s, ! operandp->X_op); #endif ! return new_pointer; } /* Instruction parsing. Takes a string containing the opcode. diff -prc src.head/gas/config/tc-pdp11.c src.new/gas/config/tc-pdp11.c *** src.head/gas/config/tc-pdp11.c Fri Aug 14 10:59:54 2009 --- src.new/gas/config/tc-pdp11.c Wed Aug 26 12:48:48 2009 *************** md_assemble (char *instruction_string) *** 752,759 **** case PDP11_OPCODE_DISPL: { ! char *new; ! new = parse_expression (str, &op1); op1.code = 0; op1.reloc.pc_rel = 1; op1.reloc.type = BFD_RELOC_PDP11_DISP_8_PCREL; --- 752,759 ---- case PDP11_OPCODE_DISPL: { ! char *new_pointer; ! new_pointer = parse_expression (str, &op1); op1.code = 0; op1.reloc.pc_rel = 1; op1.reloc.type = BFD_RELOC_PDP11_DISP_8_PCREL; *************** md_assemble (char *instruction_string) *** 767,773 **** err = _("8-bit displacement out of range"); break; } ! str = new; insn.code |= op1.code; insn.reloc = op1.reloc; } --- 767,773 ---- err = _("8-bit displacement out of range"); break; } ! str = new_pointer; insn.code |= op1.code; insn.reloc = op1.reloc; } *************** md_assemble (char *instruction_string) *** 935,941 **** case PDP11_OPCODE_REG_DISPL: { ! char *new; str = parse_reg (str, &op2); if (op2.error) break; --- 935,941 ---- case PDP11_OPCODE_REG_DISPL: { ! char *new_pointer; str = parse_reg (str, &op2); if (op2.error) break; *************** md_assemble (char *instruction_string) *** 946,952 **** op1.error = _("Missing ','"); break; } ! new = parse_expression (str, &op1); op1.code = 0; op1.reloc.pc_rel = 1; op1.reloc.type = BFD_RELOC_PDP11_DISP_6_PCREL; --- 946,952 ---- op1.error = _("Missing ','"); break; } ! new_pointer = parse_expression (str, &op1); op1.code = 0; op1.reloc.pc_rel = 1; op1.reloc.type = BFD_RELOC_PDP11_DISP_6_PCREL; *************** md_assemble (char *instruction_string) *** 960,966 **** err = _("6-bit displacement out of range"); break; } ! str = new; insn.code |= op1.code; insn.reloc = op1.reloc; } --- 960,966 ---- err = _("6-bit displacement out of range"); break; } ! str = new_pointer; insn.code |= op1.code; insn.reloc = op1.reloc; } diff -prc src.head/gas/config/tc-pj.c src.new/gas/config/tc-pj.c *** src.head/gas/config/tc-pj.c Fri Aug 14 10:59:54 2009 --- src.new/gas/config/tc-pj.c Tue Aug 18 11:53:38 2009 *************** fake_opcode (const char *name, *** 183,191 **** can have another name. */ static void ! alias (const char *new, const char *old) { ! hash_insert (opcode_hash_control, new, (char *) hash_find (opcode_hash_control, old)); } --- 183,191 ---- can have another name. */ static void ! alias (const char *new_name, const char *old) { ! hash_insert (opcode_hash_control, new_name, (char *) hash_find (opcode_hash_control, old)); } diff -prc src.head/gas/config/tc-score.c src.new/gas/config/tc-score.c *** src.head/gas/config/tc-score.c Fri Aug 14 10:59:54 2009 --- src.new/gas/config/tc-score.c Tue Aug 18 11:53:38 2009 *************** s3_build_score_ops_hsh (void) *** 6320,6338 **** { const struct s3_asm_opcode *insn = s3_score_insns + i; unsigned len = strlen (insn->template); ! struct s3_asm_opcode *new; char *template; ! new = obstack_alloc (&insn_obstack, sizeof (struct s3_asm_opcode)); ! template = obstack_alloc (&insn_obstack, len + 1); strcpy (template, insn->template); ! new->template = template; ! new->parms = insn->parms; ! new->value = insn->value; ! new->relax_value = insn->relax_value; ! new->type = insn->type; ! new->bitmask = insn->bitmask; ! hash_insert (s3_score_ops_hsh, new->template, (void *) new); } } --- 6320,6340 ---- { const struct s3_asm_opcode *insn = s3_score_insns + i; unsigned len = strlen (insn->template); ! struct s3_asm_opcode *new_opcode; char *template; ! new_opcode = (struct s3_asm_opcode *) ! obstack_alloc (&insn_obstack, sizeof (struct s3_asm_opcode)); ! template = (char *) obstack_alloc (&insn_obstack, len + 1); strcpy (template, insn->template); ! new_opcode->template = template; ! new_opcode->parms = insn->parms; ! new_opcode->value = insn->value; ! new_opcode->relax_value = insn->relax_value; ! new_opcode->type = insn->type; ! new_opcode->bitmask = insn->bitmask; ! hash_insert (s3_score_ops_hsh, new_opcode->template, ! (void *) new_opcode); } } *************** s3_build_dependency_insn_hsh (void) *** 6347,6360 **** { const struct s3_insn_to_dependency *tmp = s3_insn_to_dependency_table + i; unsigned len = strlen (tmp->insn_name); ! struct s3_insn_to_dependency *new; ! new = obstack_alloc (&dependency_obstack, sizeof (struct s3_insn_to_dependency)); ! new->insn_name = obstack_alloc (&dependency_obstack, len + 1); ! ! strcpy (new->insn_name, tmp->insn_name); ! new->type = tmp->type; ! hash_insert (s3_dependency_insn_hsh, new->insn_name, (void *) new); } } --- 6349,6366 ---- { const struct s3_insn_to_dependency *tmp = s3_insn_to_dependency_table + i; unsigned len = strlen (tmp->insn_name); ! struct s3_insn_to_dependency *new_i2n; ! new_i2n = (struct s3_insn_to_dependency *) ! obstack_alloc (&dependency_obstack, ! sizeof (struct s3_insn_to_dependency)); ! new_i2n->insn_name = (char *) obstack_alloc (&dependency_obstack, ! len + 1); ! ! strcpy (new_i2n->insn_name, tmp->insn_name); ! new_i2n->type = tmp->type; ! hash_insert (s3_dependency_insn_hsh, new_i2n->insn_name, ! (void *) new_i2n); } } *************** s3_relax_frag (asection * sec ATTRIBUTE_ *** 7023,7050 **** static void s3_convert_frag (bfd * abfd ATTRIBUTE_UNUSED, segT sec ATTRIBUTE_UNUSED, fragS * fragp) { ! int old; ! int new; char backup[20]; fixS *fixp; ! old = s3_RELAX_OLD (fragp->fr_subtype); ! new = s3_RELAX_NEW (fragp->fr_subtype); /* fragp->fr_opcode indicates whether this frag should be relaxed. */ if (fragp->fr_opcode == NULL) { ! memcpy (backup, fragp->fr_literal, old); ! fragp->fr_fix = old; } else { ! memcpy (backup, fragp->fr_literal + old, new); ! fragp->fr_fix = new; } fixp = fragp->tc_frag_data.fixp; ! while (fixp && fixp->fx_frag == fragp && fixp->fx_where < old) { if (fragp->fr_opcode) fixp->fx_done = 1; --- 7029,7056 ---- static void s3_convert_frag (bfd * abfd ATTRIBUTE_UNUSED, segT sec ATTRIBUTE_UNUSED, fragS * fragp) { ! int r_old; ! int r_new; char backup[20]; fixS *fixp; ! r_old = s3_RELAX_OLD (fragp->fr_subtype); ! r_new = s3_RELAX_NEW (fragp->fr_subtype); /* fragp->fr_opcode indicates whether this frag should be relaxed. */ if (fragp->fr_opcode == NULL) { ! memcpy (backup, fragp->fr_literal, r_old); ! fragp->fr_fix = r_old; } else { ! memcpy (backup, fragp->fr_literal + r_old, r_new); ! fragp->fr_fix = r_new; } fixp = fragp->tc_frag_data.fixp; ! while (fixp && fixp->fx_frag == fragp && fixp->fx_where < r_old) { if (fragp->fr_opcode) fixp->fx_done = 1; *************** s3_convert_frag (bfd * abfd ATTRIBUTE_UN *** 7053,7059 **** while (fixp && fixp->fx_frag == fragp) { if (fragp->fr_opcode) ! fixp->fx_where -= old + fragp->insn_addr; else fixp->fx_done = 1; fixp = fixp->fx_next; --- 7059,7065 ---- while (fixp && fixp->fx_frag == fragp) { if (fragp->fr_opcode) ! fixp->fx_where -= r_old + fragp->insn_addr; else fixp->fx_done = 1; fixp = fixp->fx_next; diff -prc src.head/gas/config/tc-score7.c src.new/gas/config/tc-score7.c *** src.head/gas/config/tc-score7.c Fri Aug 14 10:59:54 2009 --- src.new/gas/config/tc-score7.c Tue Aug 18 11:53:38 2009 *************** s7_build_score_ops_hsh (void) *** 5093,5111 **** { const struct s7_asm_opcode *insn = s7_score_insns + i; unsigned len = strlen (insn->template); ! struct s7_asm_opcode *new; char *template; ! new = obstack_alloc (&insn_obstack, sizeof (struct s7_asm_opcode)); ! template = obstack_alloc (&insn_obstack, len + 1); strcpy (template, insn->template); ! new->template = template; ! new->parms = insn->parms; ! new->value = insn->value; ! new->relax_value = insn->relax_value; ! new->type = insn->type; ! new->bitmask = insn->bitmask; ! hash_insert (s7_score_ops_hsh, new->template, (void *) new); } } --- 5093,5113 ---- { const struct s7_asm_opcode *insn = s7_score_insns + i; unsigned len = strlen (insn->template); ! struct s7_asm_opcode *new_opcode; char *template; ! new_opcode = (struct s7_asm_opcode *) ! obstack_alloc (&insn_obstack, sizeof (struct s7_asm_opcode)); ! template = (char *) obstack_alloc (&insn_obstack, len + 1); strcpy (template, insn->template); ! new_opcode->template = template; ! new_opcode->parms = insn->parms; ! new_opcode->value = insn->value; ! new_opcode->relax_value = insn->relax_value; ! new_opcode->type = insn->type; ! new_opcode->bitmask = insn->bitmask; ! hash_insert (s7_score_ops_hsh, new_opcode->template, ! (void *) new_opcode); } } *************** s7_build_dependency_insn_hsh (void) *** 5120,5133 **** { const struct s7_insn_to_dependency *tmp = s7_insn_to_dependency_table + i; unsigned len = strlen (tmp->insn_name); ! struct s7_insn_to_dependency *new; ! new = obstack_alloc (&dependency_obstack, sizeof (struct s7_insn_to_dependency)); ! new->insn_name = obstack_alloc (&dependency_obstack, len + 1); ! ! strcpy (new->insn_name, tmp->insn_name); ! new->type = tmp->type; ! hash_insert (s7_dependency_insn_hsh, new->insn_name, (void *) new); } } --- 5122,5139 ---- { const struct s7_insn_to_dependency *tmp = s7_insn_to_dependency_table + i; unsigned len = strlen (tmp->insn_name); ! struct s7_insn_to_dependency *new_i2d; ! new_i2d = (struct s7_insn_to_dependency *) ! obstack_alloc (&dependency_obstack, ! sizeof (struct s7_insn_to_dependency)); ! new_i2d->insn_name = (char *) obstack_alloc (&dependency_obstack, ! len + 1); ! ! strcpy (new_i2d->insn_name, tmp->insn_name); ! new_i2d->type = tmp->type; ! hash_insert (s7_dependency_insn_hsh, new_i2d->insn_name, ! (void *) new_i2d); } } *************** s7_b32_relax_to_b16 (fragS * fragp) *** 5238,5245 **** { int grows = 0; int relaxable_p = 0; ! int old; ! int new; int frag_addr = fragp->fr_address + fragp->insn_addr; addressT symbol_address = 0; --- 5244,5251 ---- { int grows = 0; int relaxable_p = 0; ! int r_old; ! int r_new; int frag_addr = fragp->fr_address + fragp->insn_addr; addressT symbol_address = 0; *************** s7_b32_relax_to_b16 (fragS * fragp) *** 5253,5260 **** so in relax stage , it may be wrong to calculate the symbol's offset when the frag's section is different from the symbol's. */ ! old = s7_RELAX_OLD (fragp->fr_subtype); ! new = s7_RELAX_NEW (fragp->fr_subtype); relaxable_p = s7_RELAX_OPT (fragp->fr_subtype); s = fragp->fr_symbol; --- 5259,5266 ---- so in relax stage , it may be wrong to calculate the symbol's offset when the frag's section is different from the symbol's. */ ! r_old = s7_RELAX_OLD (fragp->fr_subtype); ! r_new = s7_RELAX_NEW (fragp->fr_subtype); relaxable_p = s7_RELAX_OPT (fragp->fr_subtype); s = fragp->fr_symbol; *************** s7_convert_frag (bfd * abfd ATTRIBUTE_UN *** 6575,6602 **** segT sec ATTRIBUTE_UNUSED, fragS * fragp) { ! int old; ! int new; char backup[20]; fixS *fixp; ! old = s7_RELAX_OLD (fragp->fr_subtype); ! new = s7_RELAX_NEW (fragp->fr_subtype); /* fragp->fr_opcode indicates whether this frag should be relaxed. */ if (fragp->fr_opcode == NULL) { ! memcpy (backup, fragp->fr_literal, old); ! fragp->fr_fix = old; } else { ! memcpy (backup, fragp->fr_literal + old, new); ! fragp->fr_fix = new; } fixp = fragp->tc_frag_data.fixp; ! while (fixp && fixp->fx_frag == fragp && fixp->fx_where < old) { if (fragp->fr_opcode) fixp->fx_done = 1; --- 6581,6608 ---- segT sec ATTRIBUTE_UNUSED, fragS * fragp) { ! int r_old; ! int r_new; char backup[20]; fixS *fixp; ! r_old = s7_RELAX_OLD (fragp->fr_subtype); ! r_new = s7_RELAX_NEW (fragp->fr_subtype); /* fragp->fr_opcode indicates whether this frag should be relaxed. */ if (fragp->fr_opcode == NULL) { ! memcpy (backup, fragp->fr_literal, r_old); ! fragp->fr_fix = r_old; } else { ! memcpy (backup, fragp->fr_literal + r_old, r_new); ! fragp->fr_fix = r_new; } fixp = fragp->tc_frag_data.fixp; ! while (fixp && fixp->fx_frag == fragp && fixp->fx_where < r_old) { if (fragp->fr_opcode) fixp->fx_done = 1; *************** s7_convert_frag (bfd * abfd ATTRIBUTE_UN *** 6605,6611 **** while (fixp && fixp->fx_frag == fragp) { if (fragp->fr_opcode) ! fixp->fx_where -= old + fragp->insn_addr; else fixp->fx_done = 1; fixp = fixp->fx_next; --- 6611,6617 ---- while (fixp && fixp->fx_frag == fragp) { if (fragp->fr_opcode) ! fixp->fx_where -= r_old + fragp->insn_addr; else fixp->fx_done = 1; fixp = fixp->fx_next; diff -prc src.head/gas/config/tc-sh.c src.new/gas/config/tc-sh.c *** src.head/gas/config/tc-sh.c Fri Aug 14 10:59:54 2009 --- src.new/gas/config/tc-sh.c Wed Aug 26 12:53:12 2009 *************** static char * *** 1350,1356 **** parse_exp (char *s, sh_operand_info *op) { char *save; ! char *new; save = input_line_pointer; input_line_pointer = s; --- 1350,1356 ---- parse_exp (char *s, sh_operand_info *op) { char *save; ! char *new_pointer; save = input_line_pointer; input_line_pointer = s; *************** parse_exp (char *s, sh_operand_info *op) *** 1363,1371 **** || sh_PIC_related_p (op->immediate.X_op_symbol)) as_bad (_("misplaced PIC operand")); #endif ! new = input_line_pointer; input_line_pointer = save; ! return new; } /* The many forms of operand: --- 1363,1371 ---- || sh_PIC_related_p (op->immediate.X_op_symbol)) as_bad (_("misplaced PIC operand")); #endif ! new_pointer = input_line_pointer; input_line_pointer = save; ! return new_pointer; } /* The many forms of operand: diff -prc src.head/gas/config/tc-sh64.c src.new/gas/config/tc-sh64.c *** src.head/gas/config/tc-sh64.c Fri Aug 14 10:59:54 2009 --- src.new/gas/config/tc-sh64.c Wed Aug 26 12:54:06 2009 *************** static char * *** 2204,2219 **** shmedia_parse_exp (char *s, shmedia_operand_info *op) { char *save; ! char *new; save = input_line_pointer; input_line_pointer = s; expression (&op->immediate); if (op->immediate.X_op == O_absent) as_bad (_("missing operand")); ! new = input_line_pointer; input_line_pointer = save; ! return new; } /* Parse an operand. Store pointer to next character in *PTR. */ --- 2204,2219 ---- shmedia_parse_exp (char *s, shmedia_operand_info *op) { char *save; ! char *new_pointer; save = input_line_pointer; input_line_pointer = s; expression (&op->immediate); if (op->immediate.X_op == O_absent) as_bad (_("missing operand")); ! new_pointer = input_line_pointer; input_line_pointer = save; ! return new_pointer; } /* Parse an operand. Store pointer to next character in *PTR. */ diff -prc src.head/gas/config/tc-tic4x.c src.new/gas/config/tc-tic4x.c *** src.head/gas/config/tc-tic4x.c Fri Aug 14 10:59:55 2009 --- src.new/gas/config/tc-tic4x.c Wed Aug 26 12:54:39 2009 *************** tic4x_operand_parse (char *s, tic4x_oper *** 1516,1522 **** expressionS *exp = &operand->expr; char *save = input_line_pointer; char *str; ! char *new; struct hash_entry *entry = NULL; input_line_pointer = s; --- 1516,1522 ---- expressionS *exp = &operand->expr; char *save = input_line_pointer; char *str; ! char *new_pointer; struct hash_entry *entry = NULL; input_line_pointer = s; *************** tic4x_operand_parse (char *s, tic4x_oper *** 1524,1530 **** str = input_line_pointer; c = get_symbol_end (); /* Get terminator. */ ! new = input_line_pointer; if (strlen (str) && (entry = hash_find (tic4x_asg_hash, str)) != NULL) { *input_line_pointer = c; --- 1524,1530 ---- str = input_line_pointer; c = get_symbol_end (); /* Get terminator. */ ! new_pointer = input_line_pointer; if (strlen (str) && (entry = hash_find (tic4x_asg_hash, str)) != NULL) { *input_line_pointer = c; *************** tic4x_operand_parse (char *s, tic4x_oper *** 1666,1674 **** #endif } if (entry == NULL) ! new = input_line_pointer; input_line_pointer = save; ! return new; } static int --- 1666,1674 ---- #endif } if (entry == NULL) ! new_pointer = input_line_pointer; input_line_pointer = save; ! return new_pointer; } static int diff -prc src.head/gas/config/tc-z8k.c src.new/gas/config/tc-z8k.c *** src.head/gas/config/tc-z8k.c Fri Aug 14 10:59:56 2009 --- src.new/gas/config/tc-z8k.c Wed Aug 26 12:55:23 2009 *************** static char * *** 342,356 **** parse_exp (char *s, expressionS *op) { char *save = input_line_pointer; ! char *new; input_line_pointer = s; expression (op); if (op->X_op == O_absent) as_bad (_("missing operand")); ! new = input_line_pointer; input_line_pointer = save; ! return new; } /* The many forms of operand: --- 342,356 ---- parse_exp (char *s, expressionS *op) { char *save = input_line_pointer; ! char *new_pointer; input_line_pointer = s; expression (op); if (op->X_op == O_absent) as_bad (_("missing operand")); ! new_pointer = input_line_pointer; input_line_pointer = save; ! return new_pointer; } /* The many forms of operand: diff -prc src.head/gas/listing.c src.new/gas/listing.c *** src.head/gas/listing.c Fri Aug 14 10:59:46 2009 --- src.new/gas/listing.c Tue Aug 18 11:53:38 2009 *************** listing_newline (char *ps) *** 285,291 **** unsigned int line; static unsigned int last_line = 0xffff; static char *last_file = NULL; ! list_info_type *new = NULL; if (listing == 0) return; --- 285,291 ---- unsigned int line; static unsigned int last_line = 0xffff; static char *last_file = NULL; ! list_info_type *new_i = NULL; if (listing == 0) return; *************** listing_newline (char *ps) *** 318,324 **** && !(last_file && file && strcmp (file, last_file))) return; ! new = (list_info_type *) xmalloc (sizeof (list_info_type)); /* Detect if we are reading from stdin by examining the file name returned by as_where(). --- 318,324 ---- && !(last_file && file && strcmp (file, last_file))) return; ! new_i = (list_info_type *) xmalloc (sizeof (list_info_type)); /* Detect if we are reading from stdin by examining the file name returned by as_where(). *************** listing_newline (char *ps) *** 371,385 **** *dest = 0; } ! new->line_contents = copy; } else ! new->line_contents = NULL; } else { ! new = xmalloc (sizeof (list_info_type)); ! new->line_contents = ps; } last_line = line; --- 371,385 ---- *dest = 0; } ! new_i->line_contents = copy; } else ! new_i->line_contents = NULL; } else { ! new_i = (list_info_type *) xmalloc (sizeof (list_info_type)); ! new_i->line_contents = ps; } last_line = line; *************** listing_newline (char *ps) *** 388,408 **** new_frag (); if (listing_tail) ! listing_tail->next = new; else ! head = new; ! listing_tail = new; ! new->frag = frag_now; ! new->line = line; ! new->file = file_info (file); ! new->next = (list_info_type *) NULL; ! new->message = (char *) NULL; ! new->edict = EDICT_NONE; ! new->hll_file = (file_info_type *) NULL; ! new->hll_line = 0; ! new->debugging = 0; new_frag (); --- 388,408 ---- new_frag (); if (listing_tail) ! listing_tail->next = new_i; else ! head = new_i; ! listing_tail = new_i; ! new_i->frag = frag_now; ! new_i->line = line; ! new_i->file = file_info (file); ! new_i->next = (list_info_type *) NULL; ! new_i->message = (char *) NULL; ! new_i->edict = EDICT_NONE; ! new_i->hll_file = (file_info_type *) NULL; ! new_i->hll_line = 0; ! new_i->debugging = 0; new_frag (); *************** listing_newline (char *ps) *** 416,422 **** segname = segment_name (now_seg); if (strncmp (segname, ".debug", sizeof ".debug" - 1) == 0 || strncmp (segname, ".line", sizeof ".line" - 1) == 0) ! new->debugging = 1; } #endif } --- 416,422 ---- segname = segment_name (now_seg); if (strncmp (segname, ".debug", sizeof ".debug" - 1) == 0 || strncmp (segname, ".line", sizeof ".line" - 1) == 0) ! new_i->debugging = 1; } #endif } diff -prc src.head/ld/ldexp.c src.new/ld/ldexp.c *** src.head/ld/ldexp.c Tue Jun 16 09:08:14 2009 --- src.new/ld/ldexp.c Tue Aug 18 11:53:38 2009 *************** new_abs (bfd_vma value) *** 154,178 **** etree_type * exp_intop (bfd_vma value) { ! etree_type *new = stat_alloc (sizeof (new->value)); ! new->type.node_code = INT; ! new->type.lineno = lineno; ! new->value.value = value; ! new->value.str = NULL; ! new->type.node_class = etree_value; ! return new; } etree_type * exp_bigintop (bfd_vma value, char *str) { ! etree_type *new = stat_alloc (sizeof (new->value)); ! new->type.node_code = INT; ! new->type.lineno = lineno; ! new->value.value = value; ! new->value.str = str; ! new->type.node_class = etree_value; ! return new; } /* Build an expression representing an unnamed relocatable value. */ --- 154,178 ---- etree_type * exp_intop (bfd_vma value) { ! etree_type *new_e = (etree_type *) stat_alloc (sizeof (new_e->value)); ! new_e->type.node_code = INT; ! new_e->type.lineno = lineno; ! new_e->value.value = value; ! new_e->value.str = NULL; ! new_e->type.node_class = etree_value; ! return new_e; } etree_type * exp_bigintop (bfd_vma value, char *str) { ! etree_type *new_e = (etree_type *) stat_alloc (sizeof (new_e->value)); ! new_e->type.node_code = INT; ! new_e->type.lineno = lineno; ! new_e->value.value = value; ! new_e->value.str = str; ! new_e->type.node_class = etree_value; ! return new_e; } /* Build an expression representing an unnamed relocatable value. */ *************** exp_bigintop (bfd_vma value, char *str) *** 180,192 **** etree_type * exp_relop (asection *section, bfd_vma value) { ! etree_type *new = stat_alloc (sizeof (new->rel)); ! new->type.node_code = REL; ! new->type.lineno = lineno; ! new->type.node_class = etree_rel; ! new->rel.section = section; ! new->rel.value = value; ! return new; } static void --- 180,192 ---- etree_type * exp_relop (asection *section, bfd_vma value) { ! etree_type *new_e = (etree_type *) stat_alloc (sizeof (new_e->rel)); ! new_e->type.node_code = REL; ! new_e->type.lineno = lineno; ! new_e->type.node_class = etree_rel; ! new_e->rel.section = section; ! new_e->rel.value = value; ! return new_e; } static void *************** exp_fold_tree_no_dot (etree_type *tree) *** 851,857 **** etree_type * exp_binop (int code, etree_type *lhs, etree_type *rhs) { ! etree_type value, *new; value.type.node_code = code; value.type.lineno = lhs->type.lineno; --- 851,857 ---- etree_type * exp_binop (int code, etree_type *lhs, etree_type *rhs) { ! etree_type value, *new_e; value.type.node_code = code; value.type.lineno = lhs->type.lineno; *************** exp_binop (int code, etree_type *lhs, et *** 862,876 **** if (expld.result.valid_p) return exp_intop (expld.result.value); ! new = stat_alloc (sizeof (new->binary)); ! memcpy (new, &value, sizeof (new->binary)); ! return new; } etree_type * exp_trinop (int code, etree_type *cond, etree_type *lhs, etree_type *rhs) { ! etree_type value, *new; value.type.node_code = code; value.type.lineno = lhs->type.lineno; --- 862,876 ---- if (expld.result.valid_p) return exp_intop (expld.result.value); ! new_e = (etree_type *) stat_alloc (sizeof (new_e->binary)); ! memcpy (new_e, &value, sizeof (new_e->binary)); ! return new_e; } etree_type * exp_trinop (int code, etree_type *cond, etree_type *lhs, etree_type *rhs) { ! etree_type value, *new_e; value.type.node_code = code; value.type.lineno = lhs->type.lineno; *************** exp_trinop (int code, etree_type *cond, *** 882,896 **** if (expld.result.valid_p) return exp_intop (expld.result.value); ! new = stat_alloc (sizeof (new->trinary)); ! memcpy (new, &value, sizeof (new->trinary)); ! return new; } etree_type * exp_unop (int code, etree_type *child) { ! etree_type value, *new; value.unary.type.node_code = code; value.unary.type.lineno = child->type.lineno; --- 882,896 ---- if (expld.result.valid_p) return exp_intop (expld.result.value); ! new_e = (etree_type *) stat_alloc (sizeof (new_e->trinary)); ! memcpy (new_e, &value, sizeof (new_e->trinary)); ! return new_e; } etree_type * exp_unop (int code, etree_type *child) { ! etree_type value, *new_e; value.unary.type.node_code = code; value.unary.type.lineno = child->type.lineno; *************** exp_unop (int code, etree_type *child) *** 900,914 **** if (expld.result.valid_p) return exp_intop (expld.result.value); ! new = stat_alloc (sizeof (new->unary)); ! memcpy (new, &value, sizeof (new->unary)); ! return new; } etree_type * exp_nameop (int code, const char *name) { ! etree_type value, *new; value.name.type.node_code = code; value.name.type.lineno = lineno; --- 900,914 ---- if (expld.result.valid_p) return exp_intop (expld.result.value); ! new_e = (etree_type *) stat_alloc (sizeof (new_e->unary)); ! memcpy (new_e, &value, sizeof (new_e->unary)); ! return new_e; } etree_type * exp_nameop (int code, const char *name) { ! etree_type value, *new_e; value.name.type.node_code = code; value.name.type.lineno = lineno; *************** exp_nameop (int code, const char *name) *** 919,942 **** if (expld.result.valid_p) return exp_intop (expld.result.value); ! new = stat_alloc (sizeof (new->name)); ! memcpy (new, &value, sizeof (new->name)); ! return new; } etree_type * exp_assop (int code, const char *dst, etree_type *src) { ! etree_type *new; ! new = stat_alloc (sizeof (new->assign)); ! new->type.node_code = code; ! new->type.lineno = src->type.lineno; ! new->type.node_class = etree_assign; ! new->assign.src = src; ! new->assign.dst = dst; ! return new; } /* Handle PROVIDE. */ --- 919,942 ---- if (expld.result.valid_p) return exp_intop (expld.result.value); ! new_e = (etree_type *) stat_alloc (sizeof (new_e->name)); ! memcpy (new_e, &value, sizeof (new_e->name)); ! return new_e; } etree_type * exp_assop (int code, const char *dst, etree_type *src) { ! etree_type *new_e; ! new_e = (etree_type *) stat_alloc (sizeof (new_e->assign)); ! new_e->type.node_code = code; ! new_e->type.lineno = src->type.lineno; ! new_e->type.node_class = etree_assign; ! new_e->assign.src = src; ! new_e->assign.dst = dst; ! return new_e; } /* Handle PROVIDE. */ diff -prc src.head/ld/ldfile.c src.new/ld/ldfile.c *** src.head/ld/ldfile.c Tue Jun 16 09:08:14 2009 --- src.new/ld/ldfile.c Tue Aug 18 11:53:38 2009 *************** is_sysrooted_pathname (const char *name, *** 98,125 **** void ldfile_add_library_path (const char *name, bfd_boolean cmdline) { ! search_dirs_type *new; if (!cmdline && config.only_cmd_line_lib_dirs) return; ! new = xmalloc (sizeof (search_dirs_type)); ! new->next = NULL; ! new->cmdline = cmdline; ! *search_tail_ptr = new; ! search_tail_ptr = &new->next; /* If a directory is marked as honoring sysroot, prepend the sysroot path now. */ if (name[0] == '=') { ! new->name = concat (ld_sysroot, name + 1, (const char *) NULL); ! new->sysrooted = TRUE; } else { ! new->name = xstrdup (name); ! new->sysrooted = is_sysrooted_pathname (name, FALSE); } } --- 98,125 ---- void ldfile_add_library_path (const char *name, bfd_boolean cmdline) { ! search_dirs_type *new_dirs; if (!cmdline && config.only_cmd_line_lib_dirs) return; ! new_dirs = (search_dirs_type *) xmalloc (sizeof (search_dirs_type)); ! new_dirs->next = NULL; ! new_dirs->cmdline = cmdline; ! *search_tail_ptr = new_dirs; ! search_tail_ptr = &new_dirs->next; /* If a directory is marked as honoring sysroot, prepend the sysroot path now. */ if (name[0] == '=') { ! new_dirs->name = concat (ld_sysroot, name + 1, (const char *) NULL); ! new_dirs->sysrooted = TRUE; } else { ! new_dirs->name = xstrdup (name); ! new_dirs->sysrooted = is_sysrooted_pathname (name, FALSE); } } *************** void *** 615,633 **** ldfile_add_arch (const char *in_name) { char *name = xstrdup (in_name); ! search_arch_type *new = xmalloc (sizeof (search_arch_type)); ldfile_output_machine_name = in_name; ! new->name = name; ! new->next = NULL; while (*name) { *name = TOLOWER (*name); name++; } ! *search_arch_tail_ptr = new; ! search_arch_tail_ptr = &new->next; } --- 615,634 ---- ldfile_add_arch (const char *in_name) { char *name = xstrdup (in_name); ! search_arch_type *new_arch = (search_arch_type *) ! xmalloc (sizeof (search_arch_type)); ldfile_output_machine_name = in_name; ! new_arch->name = name; ! new_arch->next = NULL; while (*name) { *name = TOLOWER (*name); name++; } ! *search_arch_tail_ptr = new_arch; ! search_arch_tail_ptr = &new_arch->next; } diff -prc src.head/ld/ldlang.c src.new/ld/ldlang.c *** src.head/ld/ldlang.c Fri Aug 14 11:07:08 2009 --- src.new/ld/ldlang.c Tue Aug 18 11:53:38 2009 *************** new_statement (enum statement_enum type, *** 949,961 **** size_t size, lang_statement_list_type *list) { ! lang_statement_union_type *new; ! new = stat_alloc (size); ! new->header.type = type; ! new->header.next = NULL; ! lang_statement_append (list, new, &new->header.next); ! return new; } /* Build a new input file node for the language. There are several --- 949,961 ---- size_t size, lang_statement_list_type *list) { ! lang_statement_union_type *new_stmt; ! new_stmt = (lang_statement_union_type *) stat_alloc (size); ! new_stmt->header.type = type; ! new_stmt->header.next = NULL; ! lang_statement_append (list, new_stmt, &new_stmt->header.next); ! return new_stmt; } /* Build a new input file node for the language. There are several *************** new_afile (const char *name, *** 976,985 **** lang_input_statement_type *p; if (add_to_list) ! p = new_stat (lang_input_statement, stat_ptr); else { ! p = stat_alloc (sizeof (lang_input_statement_type)); p->header.type = lang_input_statement_enum; p->header.next = NULL; } --- 976,986 ---- lang_input_statement_type *p; if (add_to_list) ! p = (lang_input_statement_type *) new_stat (lang_input_statement, stat_ptr); else { ! p = (lang_input_statement_type *) ! stat_alloc (sizeof (lang_input_statement_type)); p->header.type = lang_input_statement_enum; p->header.next = NULL; } *************** lang_memory_region_lookup (const char *c *** 1220,1226 **** { lang_memory_region_name *n; lang_memory_region_type *r; ! lang_memory_region_type *new; /* NAME is NULL for LMA memspecs if no region was specified. */ if (name == NULL) --- 1221,1227 ---- { lang_memory_region_name *n; lang_memory_region_type *r; ! lang_memory_region_type *new_region; /* NAME is NULL for LMA memspecs if no region was specified. */ if (name == NULL) *************** lang_memory_region_lookup (const char *c *** 1239,1261 **** if (!create && strcmp (name, DEFAULT_MEMORY_REGION)) einfo (_("%P:%S: warning: memory region `%s' not declared\n"), name); ! new = stat_alloc (sizeof (lang_memory_region_type)); ! new->name_list.name = xstrdup (name); ! new->name_list.next = NULL; ! new->next = NULL; ! new->origin = 0; ! new->length = ~(bfd_size_type) 0; ! new->current = 0; ! new->last_os = NULL; ! new->flags = 0; ! new->not_flags = 0; ! new->had_full_message = FALSE; ! *lang_memory_region_list_tail = new; ! lang_memory_region_list_tail = &new->next; ! return new; } void --- 1240,1263 ---- if (!create && strcmp (name, DEFAULT_MEMORY_REGION)) einfo (_("%P:%S: warning: memory region `%s' not declared\n"), name); ! new_region = (lang_memory_region_type *) ! stat_alloc (sizeof (lang_memory_region_type)); ! new_region->name_list.name = xstrdup (name); ! new_region->name_list.next = NULL; ! new_region->next = NULL; ! new_region->origin = 0; ! new_region->length = ~(bfd_size_type) 0; ! new_region->current = 0; ! new_region->last_os = NULL; ! new_region->flags = 0; ! new_region->not_flags = 0; ! new_region->had_full_message = FALSE; ! *lang_memory_region_list_tail = new_region; ! lang_memory_region_list_tail = &new_region->next; ! return new_region; } void *************** init_os (lang_output_section_statement_t *** 2057,2066 **** if (!link_info.reduce_memory_overheads) { ! fat_section_userdata_type *new ! = stat_alloc (sizeof (fat_section_userdata_type)); ! memset (new, 0, sizeof (fat_section_userdata_type)); ! get_userdata (s->bfd_section) = new; } /* If there is a base address, make sure that any sections it might --- 2059,2068 ---- if (!link_info.reduce_memory_overheads) { ! fat_section_userdata_type *new_userdata = (fat_section_userdata_type *) ! stat_alloc (sizeof (fat_section_userdata_type)); ! memset (new_userdata, 0, sizeof (fat_section_userdata_type)); ! get_userdata (s->bfd_section) = new_userdata; } /* If there is a base address, make sure that any sections it might *************** lang_add_section (lang_statement_list_ty *** 2196,2202 **** if (section->output_section == NULL) { bfd_boolean first; ! lang_input_section_type *new; flagword flags; flags = section->flags; --- 2198,2204 ---- if (section->output_section == NULL) { bfd_boolean first; ! lang_input_section_type *new_section; flagword flags; flags = section->flags; *************** lang_add_section (lang_statement_list_ty *** 2244,2252 **** } /* Add a section reference to the list. */ ! new = new_stat (lang_input_section, ptr); ! new->section = section; section->output_section = output->bfd_section; /* If final link, don't copy the SEC_LINK_ONCE flags, they've --- 2246,2254 ---- } /* Add a section reference to the list. */ ! new_section = new_stat (lang_input_section, ptr); ! new_section->section = section; section->output_section = output->bfd_section; /* If final link, don't copy the SEC_LINK_ONCE flags, they've *************** typedef struct bfd_sym_chain ldlang_unde *** 3250,3265 **** void ldlang_add_undef (const char *const name) { ! ldlang_undef_chain_list_type *new = ! stat_alloc (sizeof (ldlang_undef_chain_list_type)); ! new->next = ldlang_undef_chain_list_head; ! ldlang_undef_chain_list_head = new; ! new->name = xstrdup (name); if (link_info.output_bfd != NULL) ! insert_undefined (new->name); } /* Insert NAME as undefined in the symbol table. */ --- 3252,3267 ---- void ldlang_add_undef (const char *const name) { ! ldlang_undef_chain_list_type *new_undef = (ldlang_undef_chain_list_type *) ! stat_alloc (sizeof (ldlang_undef_chain_list_type)); ! new_undef->next = ldlang_undef_chain_list_head; ! ldlang_undef_chain_list_head = new_undef; ! new_undef->name = xstrdup (name); if (link_info.output_bfd != NULL) ! insert_undefined (new_undef->name); } /* Insert NAME as undefined in the symbol table. */ *************** lang_enter_output_section_statement (con *** 6010,6019 **** void lang_final (void) { ! lang_output_statement_type *new; - new = new_stat (lang_output_statement, stat_ptr); - new->name = output_filename; } /* Reset the current counters in the regions. */ --- 6012,6022 ---- void lang_final (void) { ! lang_output_statement_type *new_stmt; ! ! new_stmt = new_stat (lang_output_statement, stat_ptr); ! new_stmt->name = output_filename; } /* Reset the current counters in the regions. */ *************** lang_add_wild (struct wildcard_spec *fil *** 6377,6383 **** bfd_boolean keep_sections) { struct wildcard_list *curr, *next; ! lang_wild_statement_type *new; /* Reverse the list as the parser puts it back to front. */ for (curr = section_list, section_list = NULL; --- 6380,6386 ---- bfd_boolean keep_sections) { struct wildcard_list *curr, *next; ! lang_wild_statement_type *new_stmt; /* Reverse the list as the parser puts it back to front. */ for (curr = section_list, section_list = NULL; *************** lang_add_wild (struct wildcard_spec *fil *** 6399,6416 **** lang_has_input_file = TRUE; } ! new = new_stat (lang_wild_statement, stat_ptr); ! new->filename = NULL; ! new->filenames_sorted = FALSE; if (filespec != NULL) { ! new->filename = filespec->name; ! new->filenames_sorted = filespec->sorted == by_name; } ! new->section_list = section_list; ! new->keep_sections = keep_sections; ! lang_list_init (&new->children); ! analyze_walk_wild_section_handler (new); } void --- 6402,6419 ---- lang_has_input_file = TRUE; } ! new_stmt = new_stat (lang_wild_statement, stat_ptr); ! new_stmt->filename = NULL; ! new_stmt->filenames_sorted = FALSE; if (filespec != NULL) { ! new_stmt->filename = filespec->name; ! new_stmt->filenames_sorted = filespec->sorted == by_name; } ! new_stmt->section_list = section_list; ! new_stmt->keep_sections = keep_sections; ! lang_list_init (&new_stmt->children); ! analyze_walk_wild_section_handler (new_stmt); } void *************** lang_default_entry (const char *name) *** 6455,6464 **** void lang_add_target (const char *name) { ! lang_target_statement_type *new; ! new = new_stat (lang_target_statement, stat_ptr); ! new->target = name; } void --- 6458,6467 ---- void lang_add_target (const char *name) { ! lang_target_statement_type *new_stmt; ! new_stmt = new_stat (lang_target_statement, stat_ptr); ! new_stmt->target = name; } void *************** lang_add_map (const char *name) *** 6479,6498 **** void lang_add_fill (fill_type *fill) { ! lang_fill_statement_type *new; ! new = new_stat (lang_fill_statement, stat_ptr); ! new->fill = fill; } void lang_add_data (int type, union etree_union *exp) { ! lang_data_statement_type *new; ! new = new_stat (lang_data_statement, stat_ptr); ! new->exp = exp; ! new->type = type; } /* Create a new reloc statement. RELOC is the BFD relocation type to --- 6482,6501 ---- void lang_add_fill (fill_type *fill) { ! lang_fill_statement_type *new_stmt; ! new_stmt = new_stat (lang_fill_statement, stat_ptr); ! new_stmt->fill = fill; } void lang_add_data (int type, union etree_union *exp) { ! lang_data_statement_type *new_stmt; ! new_stmt = new_stat (lang_data_statement, stat_ptr); ! new_stmt->exp = exp; ! new_stmt->type = type; } /* Create a new reloc statement. RELOC is the BFD relocation type to *************** lang_add_reloc (bfd_reloc_code_real_type *** 6525,6535 **** lang_assignment_statement_type * lang_add_assignment (etree_type *exp) { ! lang_assignment_statement_type *new; ! new = new_stat (lang_assignment_statement, stat_ptr); ! new->exp = exp; ! return new; } void --- 6528,6538 ---- lang_assignment_statement_type * lang_add_assignment (etree_type *exp) { ! lang_assignment_statement_type *new_stmt; ! new_stmt = new_stat (lang_assignment_statement, stat_ptr); ! new_stmt->exp = exp; ! return new_stmt; } void *************** lang_add_output_format (const char *form *** 6714,6724 **** void lang_add_insert (const char *where, int is_before) { ! lang_insert_statement_type *new; ! new = new_stat (lang_insert_statement, stat_ptr); ! new->where = where; ! new->is_before = is_before; saved_script_handle = previous_script_handle; } --- 6717,6727 ---- void lang_add_insert (const char *where, int is_before) { ! lang_insert_statement_type *new_stmt; ! new_stmt = new_stat (lang_insert_statement, stat_ptr); ! new_stmt->where = where; ! new_stmt->is_before = is_before; saved_script_handle = previous_script_handle; } *************** realsymbol (const char *pattern) *** 7261,7287 **** } } ! /* This is called for each variable name or match expression. NEW is the name of the symbol to match, or, if LITERAL_P is FALSE, a glob pattern to be matched against symbol names. */ struct bfd_elf_version_expr * lang_new_vers_pattern (struct bfd_elf_version_expr *orig, ! const char *new, const char *lang, bfd_boolean literal_p) { struct bfd_elf_version_expr *ret; ! ret = xmalloc (sizeof *ret); ret->next = orig; ret->symver = 0; ret->script = 0; ret->literal = TRUE; ! ret->pattern = literal_p ? new : realsymbol (new); if (ret->pattern == NULL) { ! ret->pattern = new; ret->literal = FALSE; } --- 7264,7290 ---- } } ! /* This is called for each variable name or match expression. NEW_NAME is the name of the symbol to match, or, if LITERAL_P is FALSE, a glob pattern to be matched against symbol names. */ struct bfd_elf_version_expr * lang_new_vers_pattern (struct bfd_elf_version_expr *orig, ! const char *new_name, const char *lang, bfd_boolean literal_p) { struct bfd_elf_version_expr *ret; ! ret = (struct bfd_elf_version_expr *) xmalloc (sizeof *ret); ret->next = orig; ret->symver = 0; ret->script = 0; ret->literal = TRUE; ! ret->pattern = literal_p ? new_name : realsymbol (new_name); if (ret->pattern == NULL) { ! ret->pattern = new_name; ret->literal = FALSE; } diff -prc src.head/opcodes/z8kgen.c src.new/opcodes/z8kgen.c *** src.head/opcodes/z8kgen.c Tue Jun 16 09:07:18 2009 --- src.new/opcodes/z8kgen.c Wed Aug 19 18:28:24 2009 *************** static void *** 904,917 **** internal (void) { int c = count (); ! struct op *new = xmalloc (sizeof (struct op) * c); struct op *p = opt; ! memcpy (new, p, c * sizeof (struct op)); /* Sort all names in table alphabetically. */ ! qsort (new, c, sizeof (struct op), (int (*)(const void *, const void *))func); ! p = new; while (p->flags && p->flags[0] != '*') { /* If there are any @rs, sub the ssss into a ssn0, (rs), (ssn0). */ --- 904,917 ---- internal (void) { int c = count (); ! struct op *new_op = xmalloc (sizeof (struct op) * c); struct op *p = opt; ! memcpy (new_op, p, c * sizeof (struct op)); /* Sort all names in table alphabetically. */ ! qsort (new_op, c, sizeof (struct op), (int (*)(const void *, const void *))func); ! p = new_op; while (p->flags && p->flags[0] != '*') { /* If there are any @rs, sub the ssss into a ssn0, (rs), (ssn0). */ *************** gas (void) *** 960,971 **** struct op *p = opt; int idx = -1; char *oldname = ""; ! struct op *new = xmalloc (sizeof (struct op) * c); ! memcpy (new, p, c * sizeof (struct op)); /* Sort all names in table alphabetically. */ ! qsort (new, c, sizeof (struct op), (int (*)(const void *, const void *)) func); printf ("/* DO NOT EDIT! -*- buffer-read-only: t -*-\n"); printf (" This file is automatically generated by z8kgen. */\n\n"); --- 960,971 ---- struct op *p = opt; int idx = -1; char *oldname = ""; ! struct op *new_op = xmalloc (sizeof (struct op) * c); ! memcpy (new_op, p, c * sizeof (struct op)); /* Sort all names in table alphabetically. */ ! qsort (new_op, c, sizeof (struct op), (int (*)(const void *, const void *)) func); printf ("/* DO NOT EDIT! -*- buffer-read-only: t -*-\n"); printf (" This file is automatically generated by z8kgen. */\n\n"); *************** gas (void) *** 1279,1297 **** printf ("#ifdef DEFINE_TABLE\n"); printf ("const opcode_entry_type z8k_table[] = {\n"); ! while (new->flags && new->flags[0]) { int nargs; int length; ! printf ("\n/* %s *** %s */\n", new->bits, new->name); printf ("{\n"); printf ("#ifdef NICENAMES\n"); ! printf ("\"%s\",%d,%d,", new->name, new->type, new->cycles); { int answer = 0; ! char *p = new->flags; while (*p) { --- 1279,1297 ---- printf ("#ifdef DEFINE_TABLE\n"); printf ("const opcode_entry_type z8k_table[] = {\n"); ! while (new_op->flags && new_op->flags[0]) { int nargs; int length; ! printf ("\n/* %s *** %s */\n", new_op->bits, new_op->name); printf ("{\n"); printf ("#ifdef NICENAMES\n"); ! printf ("\"%s\",%d,%d,", new_op->name, new_op->type, new_op->cycles); { int answer = 0; ! char *p = new_op->flags; while (*p) { *************** gas (void) *** 1306,1325 **** printf ("#endif\n"); ! nargs = chewname (&new->name); printf ("\n\t"); ! chewbits (new->bits, &length); length /= 2; if (length & 1) abort(); ! if (strcmp (oldname, new->name) != 0) idx++; printf (",%d,%d,%d", nargs, length, idx); ! oldname = new->name; printf ("},\n"); ! new++; } printf ("\n/* end marker */\n"); printf ("{\n#ifdef NICENAMES\nNULL,0,0,\n0,\n#endif\n"); --- 1306,1325 ---- printf ("#endif\n"); ! nargs = chewname (&new_op->name); printf ("\n\t"); ! chewbits (new_op->bits, &length); length /= 2; if (length & 1) abort(); ! if (strcmp (oldname, new_op->name) != 0) idx++; printf (",%d,%d,%d", nargs, length, idx); ! oldname = new_op->name; printf ("},\n"); ! new_op++; } printf ("\n/* end marker */\n"); printf ("{\n#ifdef NICENAMES\nNULL,0,0,\n0,\n#endif\n"); Only in src.new/sid/component/cfgroot/libltdl: config-h.in]
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |