diff -c --recursive orig-binutils-2.5.2/bfd/coff-alpha.c /usr/local/src/binutils-2.5.2/bfd/coff-alpha.c *** orig-binutils-2.5.2/bfd/coff-alpha.c Mon Sep 12 18:14:44 1994 --- /usr/local/src/binutils-2.5.2/bfd/coff-alpha.c Fri Jun 30 22:22:00 1995 *************** *** 420,425 **** --- 420,446 ---- false) /* pcrel_offset */ }; + + static int + alpha_ecoff_check_for_onegp(info) + struct bfd_link_info *info; + { + static int already_checked = false; + static int results_of_check = false; + struct bfd_link_hash_entry *h; + + if(already_checked) { + return results_of_check; + } + already_checked = true; + h = bfd_link_hash_lookup (info->hash,"", false, false, + true); + if(h != NULL) { + results_of_check = true; + } + return results_of_check; + } + /* Recognize an Alpha ECOFF file. */ static const bfd_target * *************** *** 1238,1244 **** /* A helper routine for alpha_relocate_section which converts an external reloc when generating relocateable output. Returns the ! relocation amount. */ static bfd_vma alpha_convert_external_reloc (output_bfd, info, input_bfd, ext_rel, h) --- 1259,1265 ---- /* A helper routine for alpha_relocate_section which converts an external reloc when generating relocateable output. Returns the ! relocation amount. h is the symbol being relocated. */ static bfd_vma alpha_convert_external_reloc (output_bfd, info, input_bfd, ext_rel, h) *************** *** 1355,1360 **** --- 1376,1383 ---- quite similar to get_relocated_section_contents. Perhaps they could be combined somehow. */ + static long gpold=0; + static boolean alpha_relocate_section (output_bfd, info, input_bfd, input_section, contents, external_relocs) *************** *** 1424,1430 **** sym_hashes = ecoff_data (input_bfd)->sym_hashes; ! gp = ecoff_data (output_bfd)->gp; if (gp == 0) gp_undefined = true; else --- 1447,1486 ---- sym_hashes = ecoff_data (input_bfd)->sym_hashes; ! gp = 0; ! ! /* If we are producing an executable, and the gp has been defined, let's ! see about setting the internal gp closer to the start of the current ! lita section. Unless we're only using one gp of course... */ ! ! if(info->relocateable || alpha_ecoff_check_for_onegp(info)) { ! gp = ecoff_data(output_bfd)->gp; ! } ! else if(ecoff_data(output_bfd)->gp != 0) { ! struct ecoff_section_tdata *section_tdata; ! asection *sec = symndx_to_section[RELOC_SECTION_LITA]; ! ! if(sec != NULL) { ! struct ecoff_section_tdata *section_tdata = ecoff_section_data(input_bfd,sec); ! if(section_tdata == NULL) { ! sec->used_by_bfd = (struct ecoff_section_tdata *)malloc(sizeof(struct ecoff_section_tdata)); ! section_tdata = ecoff_section_data(input_bfd,sec); ! section_tdata->contents = NULL; ! section_tdata->offsets = NULL; ! section_tdata->external_relocs = NULL; ! section_tdata->gpval = 0; ! } ! ! gp = section_tdata->gpval; ! ! if(gp == 0) { ! gp = (ecoff_data(output_bfd)->gp+gpold); ! section_tdata->gpval = gp; ! gpold += bfd_section_size(input_bfd,sec); ! } ! } ! } ! if (gp == 0) gp_undefined = true; else *************** *** 1841,1846 **** --- 1897,1906 ---- relocation = (h->root.u.def.value + hsec->output_section->vma + hsec->output_offset); + if(r_type==ALPHA_R_BRADDR) { + relocation-=r_vaddr+4; + } + } else { *************** *** 1861,1868 **** /* Adjust a PC relative relocation by removing the reference to the original source section. */ ! if (howto->pc_relative) relocation += input_section->vma; } r = _bfd_final_link_relocate (howto, --- 1921,1929 ---- /* Adjust a PC relative relocation by removing the reference to the original source section. */ ! if (howto->pc_relative) { relocation += input_section->vma; + } } r = _bfd_final_link_relocate (howto, diff -c --recursive orig-binutils-2.5.2/bfd/configure.in /usr/local/src/binutils-2.5.2/bfd/configure.in *** orig-binutils-2.5.2/bfd/configure.in Wed Oct 19 14:00:22 1994 --- /usr/local/src/binutils-2.5.2/bfd/configure.in Sat Jul 22 11:53:54 1995 *************** *** 274,281 **** echo "TDEFAULTS = \ ${defvec+-DDEFAULT_VECTOR=$defvec} \ ! ${selvecs+-DSELECT_VECS='$selvecs'} \ ! ${selarchs+-DSELECT_ARCHITECTURES='$selarchs'}" \ >> Makefile.2 cat Makefile.tmp >> Makefile.2 --- 274,281 ---- echo "TDEFAULTS = \ ${defvec+-DDEFAULT_VECTOR=$defvec} \ ! ${selvecs+-DSELECT_VECS=\"$selvecs\"} \ ! ${selarchs+-DSELECT_ARCHITECTURES=\"$selarchs\"}" \ >> Makefile.2 cat Makefile.tmp >> Makefile.2 diff -c --recursive orig-binutils-2.5.2/bfd/ecoff.c /usr/local/src/binutils-2.5.2/bfd/ecoff.c *** orig-binutils-2.5.2/bfd/ecoff.c Mon Oct 31 02:00:26 1994 --- /usr/local/src/binutils-2.5.2/bfd/ecoff.c Sat Jun 3 23:37:48 1995 *************** *** 4885,4905 **** if (section_tdata != (struct ecoff_section_tdata *) NULL && section_tdata->contents != (bfd_byte *) NULL) memcpy (contents, section_tdata->contents, raw_size); ! else ! { ! if (! bfd_get_section_contents (input_bfd, input_section, ! (PTR) contents, ! (file_ptr) 0, raw_size)) ! goto error_return; ! } ! ! /* Get the relocs. If we are relaxing MIPS code, they will already ! have been read in. Otherwise, we read them in now. */ ! external_reloc_size = ecoff_backend (input_bfd)->external_reloc_size; ! external_relocs_size = external_reloc_size * input_section->reloc_count; ! ! if (section_tdata != (struct ecoff_section_tdata *) NULL) ! external_relocs = section_tdata->external_relocs; else { external_relocs = (PTR) malloc (external_relocs_size); --- 4885,4906 ---- if (section_tdata != (struct ecoff_section_tdata *) NULL && section_tdata->contents != (bfd_byte *) NULL) memcpy (contents, section_tdata->contents, raw_size); ! else ! { ! if (! bfd_get_section_contents (input_bfd, input_section, ! (PTR) contents, ! (file_ptr) 0, raw_size)) ! goto error_return; ! } ! ! /* Get the relocs. If we are relaxing MIPS code, they will already ! have been read in. Otherwise, we read them in now. */ ! external_reloc_size = ecoff_backend (input_bfd)->external_reloc_size; ! external_relocs_size = external_reloc_size * input_section->reloc_count; ! ! if ((section_tdata != (struct ecoff_section_tdata *) NULL)&& ! (section_tdata->external_relocs != NULL)) ! external_relocs = section_tdata->external_relocs; else { external_relocs = (PTR) malloc (external_relocs_size); *************** *** 4947,4960 **** if (contents != NULL) free (contents); ! if (external_relocs != NULL && section_tdata == NULL) free (external_relocs); return true; error_return: if (contents != NULL) free (contents); ! if (external_relocs != NULL && section_tdata == NULL) free (external_relocs); return false; } --- 4948,4961 ---- if (contents != NULL) free (contents); ! if (external_relocs != NULL && (section_tdata == NULL || section_tdata->external_relocs == NULL)) free (external_relocs); return true; error_return: if (contents != NULL) free (contents); ! if (external_relocs != NULL && (section_tdata == NULL || section_tdata->external_relocs == NULL)) free (external_relocs); return false; } diff -c --recursive orig-binutils-2.5.2/bfd/libecoff.h /usr/local/src/binutils-2.5.2/bfd/libecoff.h *** orig-binutils-2.5.2/bfd/libecoff.h Fri Oct 21 21:28:11 1994 --- /usr/local/src/binutils-2.5.2/bfd/libecoff.h Sat Jun 3 23:16:48 1995 *************** *** 164,170 **** in bfd_relax_section as well as in bfd_final_link, and requires the code to keep track of which relocs have been expanded. A pointer to this structure is put in the used_by_bfd pointer of a section to ! keep track of this information. The user_by_bfd pointer will be NULL if the information was not needed. */ struct ecoff_section_tdata --- 164,170 ---- in bfd_relax_section as well as in bfd_final_link, and requires the code to keep track of which relocs have been expanded. A pointer to this structure is put in the used_by_bfd pointer of a section to ! keep track of this information. The used_by_bfd pointer will be NULL if the information was not needed. */ struct ecoff_section_tdata *************** *** 192,197 **** --- 192,199 ---- section, and the entry for any reloc that is not PC relative is zero. */ long *offsets; + + long gpval; }; /* An accessor macro for the ecoff_section_tdata structure. */ diff -c --recursive orig-binutils-2.5.2/bfd/reloc.c /usr/local/src/binutils-2.5.2/bfd/reloc.c *** orig-binutils-2.5.2/bfd/reloc.c Mon Oct 10 16:21:53 1994 --- /usr/local/src/binutils-2.5.2/bfd/reloc.c Tue May 30 02:19:09 1995 *************** *** 1558,1565 **** bfd_signed_vma reloc_signed_min = ~reloc_signed_max; if (signed_check > reloc_signed_max ! || signed_check < reloc_signed_min) ! overflow = true; } break; case complain_overflow_unsigned: --- 1558,1566 ---- bfd_signed_vma reloc_signed_min = ~reloc_signed_max; if (signed_check > reloc_signed_max ! || signed_check < reloc_signed_min) { ! overflow = true; ! } } break; case complain_overflow_unsigned: *************** *** 1570,1577 **** bfd_vma reloc_unsigned_max = (((1 << (howto->bitsize - 1)) - 1) << 1) | 1; ! if (check > reloc_unsigned_max) ! overflow = true; } break; case complain_overflow_bitfield: --- 1571,1579 ---- bfd_vma reloc_unsigned_max = (((1 << (howto->bitsize - 1)) - 1) << 1) | 1; ! if (check > reloc_unsigned_max) { ! overflow = true; ! } } break; case complain_overflow_bitfield: *************** *** 1583,1590 **** if ((check & ~reloc_bits) != 0 && (((bfd_vma) signed_check & ~reloc_bits) ! != (-1 & ~reloc_bits))) ! overflow = true; } break; default: --- 1585,1593 ---- if ((check & ~reloc_bits) != 0 && (((bfd_vma) signed_check & ~reloc_bits) ! != (-1 & ~reloc_bits))) { ! overflow = true; ! } } break; default: *************** *** 1623,1629 **** #endif break; } - return overflow ? bfd_reloc_overflow : bfd_reloc_ok; } --- 1626,1631 ---- diff -c --recursive orig-binutils-2.5.2/config.guess /usr/local/src/binutils-2.5.2/config.guess *** orig-binutils-2.5.2/config.guess Thu Oct 6 21:05:57 1994 --- /usr/local/src/binutils-2.5.2/config.guess Sat Jul 22 11:45:49 1995 *************** *** 54,59 **** --- 54,62 ---- # 1.2 uses "1.2" for uname -r. echo alpha-dec-osf${UNAME_RELEASE} exit 0 ;; + alpha:[Ll]inux:*:*) + echo alpha-dec-linux + exit 0 ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit 0;; diff -c --recursive orig-binutils-2.5.2/configure /usr/local/src/binutils-2.5.2/configure *** orig-binutils-2.5.2/configure Wed Oct 19 12:05:50 1994 --- /usr/local/src/binutils-2.5.2/configure Sat Jul 22 11:44:24 1995 *************** *** 104,110 **** progname=$0 # if PWD already has a value, it is probably wrong. ! if [ -n "$PWD" ]; then PWD=`pwd`; fi case "${progname}" in /*) ;; --- 104,110 ---- progname=$0 # if PWD already has a value, it is probably wrong. ! #if [ -n "$PWD" ]; then PWD=`pwd`; fi case "${progname}" in /*) ;; diff -c --recursive orig-binutils-2.5.2/gas/atof-generic.c /usr/local/src/binutils-2.5.2/gas/atof-generic.c *** orig-binutils-2.5.2/gas/atof-generic.c Wed Aug 31 21:35:09 1994 --- /usr/local/src/binutils-2.5.2/gas/atof-generic.c Sat Jun 10 16:37:30 1995 *************** *** 402,408 **** work = carry + 10 * (long) (*littlenum_pointer); *littlenum_pointer = work & LITTLENUM_MASK; ! carry = work >> LITTLENUM_NUMBER_OF_BITS; } if (carry != 0) --- 402,408 ---- work = carry + 10 * (long) (*littlenum_pointer); *littlenum_pointer = work & LITTLENUM_MASK; ! carry = (work >> LITTLENUM_NUMBER_OF_BITS)&LITTLENUM_MASK; } if (carry != 0) *************** *** 446,452 **** * input. */ digits_flonum.sign = '+'; - { /* * Compute the mantssa (& exponent) of the power of 10. --- 446,451 ---- *************** *** 518,524 **** for (place_number = 1;/* Place value of this bit of exponent. */ decimal_exponent;/* Quit when no more 1 bits in exponent. */ ! decimal_exponent >>= 1, place_number++) { if (decimal_exponent & 1) { --- 517,523 ---- for (place_number = 1;/* Place value of this bit of exponent. */ decimal_exponent;/* Quit when no more 1 bits in exponent. */ ! (decimal_exponent /= 2), place_number++) { if (decimal_exponent & 1) { *************** *** 540,558 **** printf ("before multiply, place_number = %d., power_of_10_flonum:\n", place_number); ! flonum_print (&power_of_10_flonum); ! (void) putchar ('\n'); #endif flonum_multip (multiplicand + place_number, &power_of_10_flonum, &temporary_flonum); flonum_copy (&temporary_flonum, &power_of_10_flonum); } /* If this bit of decimal_exponent was computable.*/ } /* If this bit of decimal_exponent was set. */ } /* For each bit of binary representation of exponent */ #ifdef TRACE printf (" after computing power_of_10_flonum: "); ! flonum_print (&power_of_10_flonum); ! (void) putchar ('\n'); #endif } --- 539,561 ---- printf ("before multiply, place_number = %d., power_of_10_flonum:\n", place_number); ! printf("%s\n",flonum_print (&power_of_10_flonum)); #endif flonum_multip (multiplicand + place_number, &power_of_10_flonum, &temporary_flonum); flonum_copy (&temporary_flonum, &power_of_10_flonum); + #ifdef TRACE + printf ("after multiply"); + + printf("%s\n",flonum_print (&power_of_10_flonum)); + #endif + } /* If this bit of decimal_exponent was computable.*/ } /* If this bit of decimal_exponent was set. */ } /* For each bit of binary representation of exponent */ #ifdef TRACE printf (" after computing power_of_10_flonum: "); ! printf("%s\n",flonum_print (&power_of_10_flonum)); #endif } diff -c --recursive orig-binutils-2.5.2/gas/config/atof-ieee.c /usr/local/src/binutils-2.5.2/gas/config/atof-ieee.c *** orig-binutils-2.5.2/gas/config/atof-ieee.c Mon Jun 13 15:53:49 1994 --- /usr/local/src/binutils-2.5.2/gas/config/atof-ieee.c Sat Jun 10 16:13:50 1995 *************** *** 548,556 **** } #endif ! #ifdef TEST char * ! print_gen (gen) FLONUM_TYPE *gen; { FLONUM_TYPE f; --- 548,564 ---- } #endif ! void copy_to_double(char *litP,LITTLENUM_TYPE *words, int prec) { ! LITTLENUM_TYPE *wordP; ! for (wordP = words + prec - 1; prec--;) ! { ! md_number_to_chars (litP, (long) (*wordP--), sizeof (LITTLENUM_TYPE)); ! litP += sizeof (LITTLENUM_TYPE); ! } ! } ! char * ! flonum_print (gen) FLONUM_TYPE *gen; { FLONUM_TYPE f; *************** *** 565,575 **** generic_floating_point_number = *gen; } gen_to_words (&arr[0], 4, 11); ! memcpy (&dv, &arr[0], sizeof (double)); ! sprintf (sbuf, "%x %x %x %x %.14G ", arr[0], arr[1], arr[2], arr[3], dv); gen_to_words (&arr[0], 2, 8); ! memcpy (&fv, &arr[0], sizeof (float)); ! sprintf (sbuf + strlen (sbuf), "%x %x %.12g\n", arr[0], arr[1], fv); if (gen) { --- 573,585 ---- generic_floating_point_number = *gen; } gen_to_words (&arr[0], 4, 11); ! ! copy_to_double((char *)&dv,arr,4); ! ! sprintf (sbuf, "%x %x %x %x %.14lf ", arr[0], arr[1], arr[2], arr[3], dv); gen_to_words (&arr[0], 2, 8); ! copy_to_double((char *)&fv,arr,2); ! sprintf (sbuf + strlen (sbuf), "%x %x %.12f\n", arr[0], arr[1], fv); if (gen) { *************** *** 579,584 **** return (sbuf); } - #endif /* end of atof-ieee.c */ --- 589,593 ---- diff -c --recursive orig-binutils-2.5.2/gas/config/tc-alpha.c /usr/local/src/binutils-2.5.2/gas/config/tc-alpha.c *** orig-binutils-2.5.2/gas/config/tc-alpha.c Tue Sep 13 19:07:25 1994 --- /usr/local/src/binutils-2.5.2/gas/config/tc-alpha.c Wed Jun 21 03:50:06 1995 *************** *** 82,87 **** --- 82,88 ---- /* Setting for ".set [no]{at,macro}". */ static int at_ok = 1, macro_ok = 1; + static int one_gp = 0; /* Keep track of global pointer. */ valueT alpha_gp_value; *************** *** 890,915 **** else { addend = insn->reloc[0].exp.X_add_number; - insn->reloc[0].exp.X_add_number = 0; } load_symbol_address (reg, insn); if (addend) { ! if ((addend & ~0x7fffffff) != 0 ! && (addend & ~0x7fffffff) + 0x80000000 != 0) ! { ! as_bad ("assembler not prepared to handle constants >32 bits yet"); ! addend = 0; ! } ! addendlo = addend & 0xffff; ! addend -= addendlo; ! addendhi = addend >> 16; ! if (addendlo & 0x8000) ! addendhi++; ! /* It appears that the BASEREG LITUSE reloc should not be used on ! an LDAH instruction. */ ! if (addendlo) ! { insn[1].opcode = (0x20000000 /* lda */ | (reg << SA) | (reg << SB) --- 891,919 ---- else { addend = insn->reloc[0].exp.X_add_number; } + if(addend) { + if ((addend & ~0x7fffffff) != 0 + && (addend & ~0x7fffffff) + 0x80000000 != 0) { + load_symbol_address(reg,insn); + lituse_pending = 0; + return num_insns; + } + } + + insn->reloc[0].exp.X_add_number = 0; load_symbol_address (reg, insn); if (addend) { ! addendlo = addend & 0xffff; ! addend -= addendlo; ! addendhi = addend >> 16; ! if (addendlo & 0x8000) ! addendhi++; ! /* It appears that the BASEREG LITUSE reloc should not be used on ! an LDAH instruction. */ ! if (addendlo) ! { insn[1].opcode = (0x20000000 /* lda */ | (reg << SA) | (reg << SB) *************** *** 917,933 **** insn[1].reloc[0].code = BFD_RELOC_ALPHA_LITUSE; insn[1].reloc[0].exp = lituse_basereg; num_insns++; ! } ! if (addendhi) ! { insn[num_insns].opcode = (0x24000000 | (reg << SA) | (reg << SB) | (addendhi & 0xffff)); num_insns++; ! } ! if (num_insns == 1) ! abort (); lituse_pending = 0; } return num_insns; --- 921,937 ---- insn[1].reloc[0].code = BFD_RELOC_ALPHA_LITUSE; insn[1].reloc[0].exp = lituse_basereg; num_insns++; ! } ! if (addendhi) ! { insn[num_insns].opcode = (0x24000000 | (reg << SA) | (reg << SB) | (addendhi & 0xffff)); num_insns++; ! } ! if (num_insns == 1) ! abort (); lituse_pending = 0; } return num_insns; *************** *** 2352,2361 **** --- 2356,2375 ---- } if (!strcmp ("reorder", s)) /* ignore */ ; + else if(!strcmp("volatile", s)) + /* ignore */ ; else if (!strcmp ("at", s)) at_ok = yesno; else if (!strcmp ("macro", s)) macro_ok = yesno; + else if (!strcmp ("singlegp",s)) { + one_gp = yesno; + if(one_gp) { + symbolS *sp = symbol_find_or_make(""); + S_SET_VALUE(sp, (valueT)1); + S_SET_EXTERNAL (sp); + } + } else as_warn ("Tried to set unrecognized symbol: %s", name); *input_line_pointer = ch; *************** *** 2517,2522 **** --- 2531,2539 ---- goto done; case BFD_RELOC_23_PCREL_S2: + if (fixP->fx_addsy != 0 + && fixP->fx_addsy->bsym->section != absolute_section) + return 42; /* Write 21 bits only. */ value >>= 2; *p++ = value & 0xff; diff -c --recursive orig-binutils-2.5.2/gas/configure /usr/local/src/binutils-2.5.2/gas/configure *** orig-binutils-2.5.2/gas/configure Tue Nov 1 18:17:52 1994 --- /usr/local/src/binutils-2.5.2/gas/configure Mon May 29 20:29:07 1995 *************** *** 582,587 **** --- 582,588 ---- alpha-*-netware*) obj_format=ecoff ;; alpha-*-osf*) obj_format=ecoff ;; + alpha-*-linux*) obj_format=ecoff ;; arm-*-riscix*) obj_format=aout ;; diff -c --recursive orig-binutils-2.5.2/gas/flonum-mult.c /usr/local/src/binutils-2.5.2/gas/flonum-mult.c *** orig-binutils-2.5.2/gas/flonum-mult.c Thu Dec 3 18:54:30 1992 --- /usr/local/src/binutils-2.5.2/gas/flonum-mult.c Sat Jun 10 16:36:50 1995 *************** *** 137,143 **** printf ("a:low[%d.]=%04x b:low[%d.]=%04x work_before=%08x\n", A, a->low[A], B, b->low[B], work); #endif work += a->low[A] * b->low[B]; ! carry += work >> LITTLENUM_NUMBER_OF_BITS; work &= LITTLENUM_MASK; #ifdef TRACE printf ("work=%08x carry=%04x\n", work, carry); --- 137,143 ---- printf ("a:low[%d.]=%04x b:low[%d.]=%04x work_before=%08x\n", A, a->low[A], B, b->low[B], work); #endif work += a->low[A] * b->low[B]; ! carry += (work >> LITTLENUM_NUMBER_OF_BITS) & LITTLENUM_MASK; work &= LITTLENUM_MASK; #ifdef TRACE printf ("work=%08x carry=%04x\n", work, carry); Only in orig-binutils-2.5.2/gas: make-gas.com diff -c --recursive orig-binutils-2.5.2/gprof/gmon.h /usr/local/src/binutils-2.5.2/gprof/gmon.h *** orig-binutils-2.5.2/gprof/gmon.h Wed Jun 16 15:58:33 1993 --- /usr/local/src/binutils-2.5.2/gprof/gmon.h Thu May 25 01:37:23 1995 *************** *** 99,107 **** }; struct veryrawarc { ! char raw_frompc[4]; ! char raw_selfpc[4]; ! char raw_count[4]; }; /* --- 99,107 ---- }; struct veryrawarc { ! char raw_frompc[sizeof(long)]; ! char raw_selfpc[sizeof(long)]; ! char raw_count[sizeof(long)]; }; /* diff -c --recursive orig-binutils-2.5.2/gprof/gprof.c /usr/local/src/binutils-2.5.2/gprof/gprof.c *** orig-binutils-2.5.2/gprof/gprof.c Tue Aug 30 11:15:09 1994 --- /usr/local/src/binutils-2.5.2/gprof/gprof.c Thu May 25 02:18:18 1995 *************** *** 294,300 **** if (!funcsymbol (syms[i])) { # ifdef DEBUG if ( debug & AOUTDEBUG ) { ! printf( "[getsymtab] rejecting: 0x%x %s\n" , syms[i]->value, syms[i]->name); } # endif DEBUG --- 294,300 ---- if (!funcsymbol (syms[i])) { # ifdef DEBUG if ( debug & AOUTDEBUG ) { ! printf( "[getsymtab] rejecting: 0x%lx %s\n" , syms[i]->value, syms[i]->name); } # endif DEBUG *************** *** 312,319 **** # ifdef DEBUG if ( debug & AOUTDEBUG ) { ! printf( "[getsymtab] %d %s 0x%08x\n" , ! nname , npe -> name , npe -> value ); } # endif DEBUG npe++; --- 312,319 ---- # ifdef DEBUG if ( debug & AOUTDEBUG ) { ! printf( "[getsymtab] %d %s 0x%lx %d\n" , ! nname , npe -> name , npe -> value ,sizeof(npe -> value)); } # endif DEBUG npe++; *************** *** 370,378 **** --- 370,385 ---- * a bunch of tuples. */ while ( fread( &rawarc , sizeof rawarc , 1 , pfile ) == 1 ) { + #ifndef __alpha__ arc.raw_frompc = bfd_get_32 (abfd, (bfd_byte *) rawarc.raw_frompc); arc.raw_selfpc = bfd_get_32 (abfd, (bfd_byte *) rawarc.raw_selfpc); arc.raw_count = bfd_get_32 (abfd, (bfd_byte *) rawarc.raw_count); + #else + arc.raw_frompc = bfd_get_64 (abfd, (bfd_byte *) rawarc.raw_frompc); + arc.raw_selfpc = bfd_get_64 (abfd, (bfd_byte *) rawarc.raw_selfpc); + arc.raw_count = bfd_get_64 (abfd, (bfd_byte *) rawarc.raw_count); + #endif + # ifdef DEBUG if ( debug & SAMPLEDEBUG ) { printf( "[getpfile] frompc 0x%x selfpc 0x%x count %d\n" , *************** *** 403,412 **** { fprintf(stderr, "%s: file too short to be a gmon file\n", filename); done(); ! } tmp.lowpc = (UNIT *)bfd_get_32 (abfd, (bfd_byte *) &raw.lowpc[0]); tmp.highpc = (UNIT *)bfd_get_32 (abfd, (bfd_byte *) &raw.highpc[0]); tmp.ncnt = bfd_get_32 (abfd, (bfd_byte *) &raw.ncnt[0]); if ( s_highpc != 0 && ( tmp.lowpc != h.lowpc || tmp.highpc != h.highpc || tmp.ncnt != h.ncnt ) ) { --- 410,425 ---- { fprintf(stderr, "%s: file too short to be a gmon file\n", filename); done(); ! } ! #ifndef __alpha__ tmp.lowpc = (UNIT *)bfd_get_32 (abfd, (bfd_byte *) &raw.lowpc[0]); tmp.highpc = (UNIT *)bfd_get_32 (abfd, (bfd_byte *) &raw.highpc[0]); tmp.ncnt = bfd_get_32 (abfd, (bfd_byte *) &raw.ncnt[0]); + #else + tmp.lowpc = (UNIT *)bfd_get_64 (abfd, (bfd_byte *) &raw.lowpc[0]); + tmp.highpc = (UNIT *)bfd_get_64 (abfd, (bfd_byte *) &raw.highpc[0]); + tmp.ncnt = bfd_get_64 (abfd, (bfd_byte *) &raw.ncnt[0]); + #endif if ( s_highpc != 0 && ( tmp.lowpc != h.lowpc || tmp.highpc != h.highpc || tmp.ncnt != h.ncnt ) ) { *************** *** 599,604 **** --- 612,618 ---- /* read samples and assign to namelist symbols */ scale = highpc - lowpc; scale /= nsamples - 1; + fprintf(stderr,"0x%lx 0x%lx\n",lowpc,highpc); alignentries(); for (i = 0, j = 1; i < nsamples; i++) { ccnt = samples[i]; *************** *** 609,615 **** time = ccnt; # ifdef DEBUG if ( debug & SAMPLEDEBUG ) { ! printf( "[asgnsamples] pcl 0x%x pch 0x%x ccnt %d\n" , pcl , pch , ccnt ); } # endif DEBUG --- 623,629 ---- time = ccnt; # ifdef DEBUG if ( debug & SAMPLEDEBUG ) { ! printf( "[asgnsamples] pcl 0x%lx pch 0x%lx ccnt %d\n" , pcl , pch , ccnt ); } # endif DEBUG diff -c --recursive orig-binutils-2.5.2/gprof/gprof.h /usr/local/src/binutils-2.5.2/gprof/gprof.h *** orig-binutils-2.5.2/gprof/gprof.h Thu Sep 1 12:53:19 1994 --- /usr/local/src/binutils-2.5.2/gprof/gprof.h Thu May 25 01:35:54 1995 *************** *** 154,162 **** struct rawhdr { ! char lowpc[4]; ! char highpc[4]; ! char ncnt[4]; }; struct hdr h; --- 154,162 ---- struct rawhdr { ! char lowpc[sizeof(long)]; ! char highpc[sizeof(long)]; ! char ncnt[sizeof(long)]; }; struct hdr h; diff -c --recursive orig-binutils-2.5.2/include/libiberty.h /usr/local/src/binutils-2.5.2/include/libiberty.h *** orig-binutils-2.5.2/include/libiberty.h Wed Aug 10 16:19:49 1994 --- /usr/local/src/binutils-2.5.2/include/libiberty.h Mon May 29 20:03:12 1995 *************** *** 23,29 **** /* Return the last component of a path name. */ ! extern char *basename PARAMS ((char *)); /* Concatenate an arbitrary number of strings, up to (char *) NULL. Allocates memory using xmalloc. */ --- 23,29 ---- /* Return the last component of a path name. */ ! extern char *basename PARAMS ((const char *)); /* Concatenate an arbitrary number of strings, up to (char *) NULL. Allocates memory using xmalloc. */ diff -c --recursive orig-binutils-2.5.2/ld/configure.in /usr/local/src/binutils-2.5.2/ld/configure.in *** orig-binutils-2.5.2/ld/configure.in Fri Oct 21 18:19:47 1994 --- /usr/local/src/binutils-2.5.2/ld/configure.in Mon May 29 20:21:10 1995 *************** *** 108,113 **** --- 108,114 ---- mips*el-*-elf*) ld_target=mipsl-elf32 ;; mips*-*-elf*) ld_target=mipsb-elf32 ;; alpha-*-osf*) ld_target=alpha ;; + alpha-*-linux*) ld_target=alpha ;; alpha-*-netware*) ld_target=alpha ;; z8k-*-sim | z8k-*-coff) ld_target=z8ksim ;; ns32k-pc532-mach) ld_target=pc532mach ;; diff -c --recursive orig-binutils-2.5.2/ld/emultempl/stringify.sed /usr/local/src/binutils-2.5.2/ld/emultempl/stringify.sed *** orig-binutils-2.5.2/ld/emultempl/stringify.sed Fri May 27 12:57:32 1994 --- /usr/local/src/binutils-2.5.2/ld/emultempl/stringify.sed Sat Jul 22 12:24:18 1995 *************** *** 1,4 **** s/["\\]/\\&/g ! s/$/\\n\\/ 1 s/^/"/ ! $ s/$/n"/ --- 1,4 ---- s/["\\]/\\&/g ! s/\(.*\)$/\1\\n\\/ 1 s/^/"/ ! $ s/\(.*\)$/\1n"/ diff -c --recursive orig-binutils-2.5.2/ld/ldlang.c /usr/local/src/binutils-2.5.2/ld/ldlang.c *** orig-binutils-2.5.2/ld/ldlang.c Tue Sep 20 17:15:58 1994 --- /usr/local/src/binutils-2.5.2/ld/ldlang.c Sun Jun 4 18:01:18 1995 *************** *** 1889,1895 **** dot, &newdot); ! if (newdot != dot && !relax) { /* The assignment changed dot. Insert a pad. */ if (output_section_statement == abs_output_section) --- 1889,1895 ---- dot, &newdot); ! if (newdot != dot /* && !relax */) { /* The assignment changed dot. Insert a pad. */ if (output_section_statement == abs_output_section) diff -c --recursive orig-binutils-2.5.2/ld/ldmain.c /usr/local/src/binutils-2.5.2/ld/ldmain.c *** orig-binutils-2.5.2/ld/ldmain.c Wed Oct 26 01:23:55 1994 --- /usr/local/src/binutils-2.5.2/ld/ldmain.c Mon Jun 19 00:41:26 1995 *************** *** 861,866 **** --- 861,868 ---- einfo (" relocation truncated to fit: %s %T", reloc_name, name); if (addend != 0) einfo ("+%v", addend); + einfo(" %X%C: addrinfo `%T'",abfd,section,address,name); + fprintf(stderr,"0x%x\n",address); einfo ("\n"); return true; } diff -c --recursive orig-binutils-2.5.2/libiberty/basename.c /usr/local/src/binutils-2.5.2/libiberty/basename.c *** orig-binutils-2.5.2/libiberty/basename.c Thu Feb 10 17:23:26 1994 --- /usr/local/src/binutils-2.5.2/libiberty/basename.c Mon May 29 20:12:23 1995 *************** *** 44,50 **** char * basename (name) ! char *name; { char *base = name; --- 44,50 ---- char * basename (name) ! const char *name; { char *base = name;