diff -uprN binutils-2.11.90.0.4/ChangeLog binutils-2.11.90.0.5/ChangeLog --- binutils-2.11.90.0.4/ChangeLog Sun Apr 1 18:51:04 2001 +++ binutils-2.11.90.0.5/ChangeLog Fri Apr 13 11:17:38 2001 @@ -1,3 +1,8 @@ +2001-04-12 Alexandre Oliva + + * ltconfig, ltmain.sh, libtool.m4, ltcf-c.sh, ltcf-cxx.sh, + ltcf-gcj.sh: Upgraded to libtool 1.4a 1.641.2.226. + 2001-04-01 Alexandre Oliva * Makefile.in (CXX_FOR_TARGET_FOR_RECURSIVE_MAKE, RECURSE_FLAGS): diff -uprN binutils-2.11.90.0.4/bfd/ChangeLog binutils-2.11.90.0.5/bfd/ChangeLog --- binutils-2.11.90.0.4/bfd/ChangeLog Fri Mar 30 22:40:49 2001 +++ binutils-2.11.90.0.5/bfd/ChangeLog Sat Apr 14 12:40:46 2001 @@ -1,3 +1,91 @@ +2001-04-14 Jakub Jelinek + + * section.c (STD_SECTION): Add entsize. + +2001-04-13 H.J. Lu + + * section.c (SEC_MERGE): Define new flag for merging. + (SEC_STRINGS): Likewise. + (entsize): New field. + +2001-04-13 Roger Sayle + + * coff-i386.c (TARGET_SYM): SEC_READONLY is an applicable section + flag on pe-i386 targets. + +2001-04-13 Jakub Jelinek + + * libbfd-in.h (_bfd_merge_section): New. + (_bfd_write_merged_section): New. + (_bfd_merged_section_offset): New. + * libbfd.h: Rebuilt. + * linker.c (_bfd_generic_link_output_symbols): Handle + discard_sec_merge. + * aoutx.h (aout_link_write_symbols): Likewise. + * pdp11.c (aout_link_write_symbols): Likewise. + * elflink.h (elf_link_add_object_symbols): Call _bfd_merge_section. + (elf_bfd_final_link): Adjust global symbols pointing into SEC_MERGE + sections. + (elf_link_sec_merge_syms): New. + (elf_link_input_bfd): Call _bfd_merged_section_offset + and _bfd_write_merged_section. + Handle discard_sec_merge. + * elf-bfd.h (struct elf_link_hash_table): Add merge_info + field. + (struct bfd_elf_section_data): Likewise. + * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_MERGE and + SEC_STRINGS section flags and entsize from their ELF counterparts. + (_bfd_elf_link_hash_table_init): Initialize merge_info. + (elf_fake_sections): Set SHF_MERGE, SHF_STRINGS and sh_entsize + from their BFD counterparts. + * merge.c: New file. + * Makefile.am: Add strtab.lo. + * Makefile.in: Rebuilt. + +2001-04-09 Hans-Peter Nilsson + + * elflink.h (elf_fix_symbol_flags): For non-default visibilities, + only hide symbols marked STV_INTERNAL or STV_HIDDEN. + +2001-04-05 Steven J. Hill + + * config.bfd (mips*el*-*-linux-gnu*): Use traditional little + endian MIPS ELF target. + * config.bfd (mips*-*-linux-gnu*): Use traditional big endian + MIPS ELF target. + + * configure.in (bfd_elf64_tradbigmips_vec): New. Traditional + 64bit big endian MIPS ELF target. + (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little + endian MIPS ELF target. + * configure: Regenerated. + + * elf32-mips.c (IRIX_COMPAT): Handle traditional 64bit and + little endian targets. + (mips_elf_sym_is_global): Handle traditional targets. + + * elf64-mips.c (bfd_elf64_tradbigmips_vec): New. Traditional + 64bit big endian MIPS ELF target. + (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little + endian MIPS ELF target. + + * targets.c: (_bfd_target_vector): Add bfd_elf64_tradbigmips_vec + and bfd_elf64_tradlittlemips_vec. + +2001-04-05 David Mosberger + + * elf32-i386.c (elf_i386_fake_sections): Treat ".reloc" as an + ordinary "progbits" section. + +2001-04-04 Alan Modra + + * elflink.h (elf_fix_symbol_flags): Call elf_backend_hide_symbol + when -Bsymbolic causes a symbol to no longer need a .plt entry. + +2001-04-03 David Mosberger + + * efi-app-ia32.c (ALIGN_SECTIONS_IN_FILE): Deleted. + 2001-03-30 H.J. Lu * efi-app-ia32.c (PEI_TARGET_SUBSYSTEM): Rename from ... diff -uprN binutils-2.11.90.0.4/bfd/Makefile.am binutils-2.11.90.0.5/bfd/Makefile.am --- binutils-2.11.90.0.4/bfd/Makefile.am Fri Mar 23 14:37:27 2001 +++ binutils-2.11.90.0.5/bfd/Makefile.am Fri Apr 13 11:47:19 2001 @@ -30,14 +30,14 @@ BFD_LIBS = \ format.lo init.lo libbfd.lo opncls.lo reloc.lo \ section.lo syms.lo targets.lo hash.lo linker.lo \ srec.lo binary.lo tekhex.lo ihex.lo stabs.lo stab-syms.lo \ - dwarf2.lo + merge.lo dwarf2.lo BFD_LIBS_CFILES = \ archive.c archures.c bfd.c cache.c coffgen.c corefile.c \ format.c init.c libbfd.c opncls.c reloc.c \ section.c syms.c targets.c hash.c linker.c \ srec.c binary.c tekhex.c ihex.c stabs.c stab-syms.c \ - dwarf2.c + merge.c dwarf2.c # This list is alphabetized to make it easier to keep in sync # with the decls and initializer in archures.c. @@ -780,6 +780,7 @@ stabs.lo: stabs.c $(INCDIR)/filenames.h $(INCDIR)/aout/stab.def stab-syms.lo: stab-syms.c libaout.h $(INCDIR)/bfdlink.h \ $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab.def +merge.lo: merge.c $(INCDIR)/filenames.h dwarf2.lo: dwarf2.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/dwarf2.h diff -uprN binutils-2.11.90.0.4/bfd/Makefile.in binutils-2.11.90.0.5/bfd/Makefile.in --- binutils-2.11.90.0.4/bfd/Makefile.in Fri Mar 23 14:37:28 2001 +++ binutils-2.11.90.0.5/bfd/Makefile.in Fri Apr 13 11:47:19 2001 @@ -144,10 +144,10 @@ BFD_H = bfd.h # for the debugger, so if you are downloading things as S-records you # need two copies of the executable, one to download and one for the # debugger). -BFD_LIBS = archive.lo archures.lo bfd.lo cache.lo coffgen.lo corefile.lo format.lo init.lo libbfd.lo opncls.lo reloc.lo section.lo syms.lo targets.lo hash.lo linker.lo srec.lo binary.lo tekhex.lo ihex.lo stabs.lo stab-syms.lo dwarf2.lo +BFD_LIBS = archive.lo archures.lo bfd.lo cache.lo coffgen.lo corefile.lo format.lo init.lo libbfd.lo opncls.lo reloc.lo section.lo syms.lo targets.lo hash.lo linker.lo srec.lo binary.lo tekhex.lo ihex.lo stabs.lo stab-syms.lo merge.lo dwarf2.lo -BFD_LIBS_CFILES = archive.c archures.c bfd.c cache.c coffgen.c corefile.c format.c init.c libbfd.c opncls.c reloc.c section.c syms.c targets.c hash.c linker.c srec.c binary.c tekhex.c ihex.c stabs.c stab-syms.c dwarf2.c +BFD_LIBS_CFILES = archive.c archures.c bfd.c cache.c coffgen.c corefile.c format.c init.c libbfd.c opncls.c reloc.c section.c syms.c targets.c hash.c linker.c srec.c binary.c tekhex.c ihex.c stabs.c stab-syms.c merge.c dwarf2.c # This list is alphabetized to make it easier to keep in sync @@ -261,7 +261,7 @@ LTLIBRARIES = $(lib_LTLIBRARIES) libbfd_la_OBJECTS = archive.lo archures.lo bfd.lo cache.lo coffgen.lo \ corefile.lo format.lo init.lo libbfd.lo opncls.lo reloc.lo section.lo \ syms.lo targets.lo hash.lo linker.lo srec.lo binary.lo tekhex.lo \ -ihex.lo stabs.lo stab-syms.lo dwarf2.lo +ihex.lo stabs.lo stab-syms.lo merge.lo dwarf2.lo CFLAGS = @CFLAGS@ COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @@ -887,6 +887,7 @@ stabs.lo: stabs.c $(INCDIR)/filenames.h $(INCDIR)/aout/stab.def stab-syms.lo: stab-syms.c libaout.h $(INCDIR)/bfdlink.h \ $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab.def +merge.lo: merge.c $(INCDIR)/filenames.h dwarf2.lo: dwarf2.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/dwarf2.h diff -uprN binutils-2.11.90.0.4/bfd/aoutx.h binutils-2.11.90.0.5/bfd/aoutx.h --- binutils-2.11.90.0.4/bfd/aoutx.h Fri Mar 9 11:37:53 2001 +++ binutils-2.11.90.0.5/bfd/aoutx.h Fri Apr 13 11:47:20 2001 @@ -4341,6 +4341,7 @@ aout_link_write_symbols (finfo, input_bf switch (discard) { case discard_none: + case discard_sec_merge: break; case discard_l: if ((type & N_STAB) == 0 diff -uprN binutils-2.11.90.0.4/bfd/bfd-in2.h binutils-2.11.90.0.5/bfd/bfd-in2.h --- binutils-2.11.90.0.4/bfd/bfd-in2.h Fri Mar 23 14:37:28 2001 +++ binutils-2.11.90.0.5/bfd/bfd-in2.h Sat Apr 14 17:01:25 2001 @@ -1102,6 +1102,15 @@ typedef struct sec references found to any symbol in the section. */ #define SEC_CLINK 0x10000000 + /* Attempt to merge identical entities in the section. + Entity size is given in the entsize field. */ +#define SEC_MERGE 0x20000000 + + /* If given with SEC_MERGE, entities to merge are zero terminated + strings where entsize specifies character size instead of fixed + size entries. */ +#define SEC_STRINGS 0x40000000 + /* End of section flags. */ /* Some internal packed boolean fields. */ @@ -1213,6 +1222,10 @@ typedef struct sec /* Number of line number records. */ unsigned int lineno_count; + + /* Entity size for merging purposes. */ + + unsigned int entsize; /* Optional information about a COMDAT entry; NULL if not COMDAT. */ diff -uprN binutils-2.11.90.0.4/bfd/coff-i386.c binutils-2.11.90.0.5/bfd/coff-i386.c --- binutils-2.11.90.0.4/bfd/coff-i386.c Fri Mar 9 11:37:54 2001 +++ binutils-2.11.90.0.5/bfd/coff-i386.c Fri Apr 13 20:52:01 2001 @@ -1,6 +1,6 @@ /* BFD back-end for Intel 386 COFF files. Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000 + 2000, 2001 Free Software Foundation, Inc. Written by Cygnus Support. @@ -576,7 +576,7 @@ const bfd_target (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC /* section flags */ #ifdef COFF_WITH_PE - | SEC_LINK_ONCE | SEC_LINK_DUPLICATES + | SEC_LINK_ONCE | SEC_LINK_DUPLICATES | SEC_READONLY #endif | SEC_CODE | SEC_DATA), diff -uprN binutils-2.11.90.0.4/bfd/config.bfd binutils-2.11.90.0.5/bfd/config.bfd --- binutils-2.11.90.0.4/bfd/config.bfd Fri Feb 23 21:13:49 2001 +++ binutils-2.11.90.0.5/bfd/config.bfd Sat Apr 7 23:02:55 2001 @@ -663,15 +663,22 @@ case "${targ}" in targ_defvec=bfd_elf32_bigmips_vec targ_selvecs="bfd_elf32_littlemips_vec bfd_elf64_bigmips_vec bfd_elf64_littlemips_vec" ;; - mips*el*-*-linux-gnu* | mips*el*-*-openbsd*) + mips*el*-*-openbsd*) targ_defvec=bfd_elf32_littlemips_vec targ_selvecs="bfd_elf32_bigmips_vec bfd_elf64_bigmips_vec bfd_elf64_littlemips_vec ecoff_little_vec ecoff_big_vec" ;; - mips*-*-linux-gnu* | mips*-*-openbsd*) + mips*el*-*-linux-gnu*) + targ_defvec=bfd_elf32_tradlittlemips_vec + targ_selvecs="bfd_elf32_tradbigmips_vec bfd_elf64_tradlittlemips_vec bfd_elf64_tradbigmips_vec ecoff_little_vec ecoff_big_vec" + ;; + mips*-*-openbsd*) targ_defvec=bfd_elf32_bigmips_vec targ_selvecs="bfd_elf32_littlemips_vec bfd_elf64_bigmips_vec bfd_elf64_littlemips_vec ecoff_big_vec ecoff_little_vec" ;; - + mips*-*-linux-gnu*) + targ_defvec=bfd_elf32_tradbigmips_vec + targ_selvecs="bfd_elf32_tradlittlemips_vec bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec ecoff_big_vec ecoff_little_vec" + ;; mn10200-*-*) targ_defvec=bfd_elf32_mn10200_vec ;; diff -uprN binutils-2.11.90.0.4/bfd/configure binutils-2.11.90.0.5/bfd/configure --- binutils-2.11.90.0.4/bfd/configure Fri Mar 30 22:52:44 2001 +++ binutils-2.11.90.0.5/bfd/configure Sat Apr 7 23:02:55 2001 @@ -916,7 +916,7 @@ fi PACKAGE=bfd -VERSION=2.11.90.0.4 +VERSION=2.11.90.0.5 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } @@ -5992,6 +5992,10 @@ do target64=true ;; bfd_elf64_sparc_vec) tb="$tb elf64-sparc.lo elf64.lo $elf" target64=true ;; + bfd_elf64_tradbigmips_vec) tb="$tb elf64-mips.lo elf64.lo $elf ecofflink.lo" + target64=true ;; + bfd_elf64_tradlittlemips_vec) tb="$tb elf64-mips.lo elf64.lo $elf ecofflink.lo" + target64=true ;; cisco_core_big_vec) tb="$tb cisco-core.lo" ;; cisco_core_little_vec) tb="$tb cisco-core.lo" ;; cris_aout_vec) tb="$tb aout-cris.lo" ;; @@ -6176,17 +6180,17 @@ for ac_hdr in unistd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:6180: checking for $ac_hdr" >&5 +echo "configure:6184: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6190: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6194: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -6215,12 +6219,12 @@ done for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6219: checking for $ac_func" >&5 +echo "configure:6223: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6268,7 +6272,7 @@ fi done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:6272: checking for working mmap" >&5 +echo "configure:6276: checking for working mmap" >&5 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6276,7 +6280,7 @@ else ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_mmap_fixed_mapped=yes else @@ -6441,12 +6445,12 @@ fi for ac_func in madvise mprotect do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6445: checking for $ac_func" >&5 +echo "configure:6449: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else diff -uprN binutils-2.11.90.0.4/bfd/configure.in binutils-2.11.90.0.5/bfd/configure.in --- binutils-2.11.90.0.4/bfd/configure.in Fri Mar 30 22:52:44 2001 +++ binutils-2.11.90.0.5/bfd/configure.in Sat Apr 7 23:02:56 2001 @@ -7,7 +7,7 @@ AC_INIT(libbfd.c) AC_CANONICAL_SYSTEM AC_ISC_POSIX -AM_INIT_AUTOMAKE(bfd, 2.11.90.0.4) +AM_INIT_AUTOMAKE(bfd, 2.11.90.0.5) dnl These must be called before AM_PROG_LIBTOOL, because it may want dnl to call AC_CHECK_PROG. @@ -560,6 +560,10 @@ do bfd_elf64_s390_vec) tb="$tb elf64-s390.lo elf64.lo $elf" target64=true ;; bfd_elf64_sparc_vec) tb="$tb elf64-sparc.lo elf64.lo $elf" + target64=true ;; + bfd_elf64_tradbigmips_vec) tb="$tb elf64-mips.lo elf64.lo $elf ecofflink.lo" + target64=true ;; + bfd_elf64_tradlittlemips_vec) tb="$tb elf64-mips.lo elf64.lo $elf ecofflink.lo" target64=true ;; cisco_core_big_vec) tb="$tb cisco-core.lo" ;; cisco_core_little_vec) tb="$tb cisco-core.lo" ;; diff -uprN binutils-2.11.90.0.4/bfd/efi-app-ia32.c binutils-2.11.90.0.5/bfd/efi-app-ia32.c --- binutils-2.11.90.0.4/bfd/efi-app-ia32.c Fri Mar 30 22:41:05 2001 +++ binutils-2.11.90.0.5/bfd/efi-app-ia32.c Fri Apr 6 15:31:52 2001 @@ -28,7 +28,6 @@ Foundation, Inc., 59 Temple Place - Suit #define PCRELOFFSET true #define TARGET_UNDERSCORE '_' #define COFF_LONG_SECTION_NAMES -#define ALIGN_SECTIONS_IN_FILE #define PEI_TARGET_SUBSYSTEM IMAGE_SUBSYSTEM_EFI_APPLICATION #define PEI_FORCE_MINIMUM_ALIGNMENT diff -uprN binutils-2.11.90.0.4/bfd/elf-bfd.h binutils-2.11.90.0.5/bfd/elf-bfd.h --- binutils-2.11.90.0.4/bfd/elf-bfd.h Fri Mar 9 11:37:56 2001 +++ binutils-2.11.90.0.5/bfd/elf-bfd.h Fri Apr 13 11:47:21 2001 @@ -241,6 +241,8 @@ struct elf_link_hash_table struct elf_link_hash_entry *hgot; /* A pointer to information used to link stabs in sections. */ PTR stab_info; + /* A pointer to information used to merge SEC_MERGE sections. */ + PTR merge_info; /* A linked list of local symbols to be added to .dynsym. */ struct elf_link_local_dynamic_entry *dynlocal; /* A linked list of DT_RPATH/DT_RUNPATH names found in dynamic @@ -712,6 +714,8 @@ struct bfd_elf_section_data long dynindx; /* A pointer used for .stab linking optimizations. */ PTR stab_info; + /* A pointer used for SEC_MERGE optimizations. */ + PTR merge_info; /* A pointer available for the processor specific ELF backend. */ PTR tdata; /* Nonzero if this section uses RELA relocations, rather than REL. */ diff -uprN binutils-2.11.90.0.4/bfd/elf.c binutils-2.11.90.0.5/bfd/elf.c --- binutils-2.11.90.0.4/bfd/elf.c Fri Mar 9 11:37:56 2001 +++ binutils-2.11.90.0.5/bfd/elf.c Fri Apr 13 11:47:21 2001 @@ -386,6 +386,13 @@ _bfd_elf_make_section_from_shdr (abfd, h flags |= SEC_CODE; else if ((flags & SEC_LOAD) != 0) flags |= SEC_DATA; + if ((hdr->sh_flags & SHF_MERGE) != 0) + { + flags |= SEC_MERGE; + newsect->entsize = hdr->sh_entsize; + if ((hdr->sh_flags & SHF_STRINGS) != 0) + flags |= SEC_STRINGS; + } /* The debugging sections appear to be recognized only by name, not any sort of flag. */ @@ -1031,6 +1038,7 @@ _bfd_elf_link_hash_table_init (table, ab table->runpath = NULL; table->hgot = NULL; table->stab_info = NULL; + table->merge_info = NULL; table->dynlocal = NULL; return _bfd_link_hash_table_init (&table->root, abfd, newfunc); } @@ -1809,6 +1817,13 @@ elf_fake_sections (abfd, asect, failedpt this_hdr->sh_flags |= SHF_WRITE; if ((asect->flags & SEC_CODE) != 0) this_hdr->sh_flags |= SHF_EXECINSTR; + if ((asect->flags & SEC_MERGE) != 0) + { + this_hdr->sh_flags |= SHF_MERGE; + this_hdr->sh_entsize = asect->entsize; + if ((asect->flags & SEC_STRINGS) != 0) + this_hdr->sh_flags |= SHF_STRINGS; + } /* Check for processor-specific section types. */ if (bed->elf_backend_fake_sections) diff -uprN binutils-2.11.90.0.4/bfd/elf32-i386.c binutils-2.11.90.0.5/bfd/elf32-i386.c --- binutils-2.11.90.0.4/bfd/elf32-i386.c Fri Mar 9 11:37:57 2001 +++ binutils-2.11.90.0.5/bfd/elf32-i386.c Fri Apr 6 15:50:17 2001 @@ -2066,6 +2066,44 @@ elf_i386_finish_dynamic_sections (output return true; } +/* Set the correct type for an x86 ELF section. We do this by the + section name, which is a hack, but ought to work. */ + +static boolean +elf_i386_fake_sections (abfd, hdr, sec) + bfd *abfd ATTRIBUTE_UNUSED; + Elf32_Internal_Shdr *hdr; + asection *sec; +{ + register const char *name; + + name = bfd_get_section_name (abfd, sec); + + if (strcmp (name, ".reloc") == 0) + /* + * This is an ugly, but unfortunately necessary hack that is + * needed when producing EFI binaries on x86. It tells + * elf.c:elf_fake_sections() not to consider ".reloc" as a section + * containing ELF relocation info. We need this hack in order to + * be able to generate ELF binaries that can be translated into + * EFI applications (which are essentially COFF objects). Those + * files contain a COFF ".reloc" section inside an ELFNN object, + * which would normally cause BFD to segfault because it would + * attempt to interpret this section as containing relocation + * entries for section "oc". With this hack enabled, ".reloc" + * will be treated as a normal data section, which will avoid the + * segfault. However, you won't be able to create an ELFNN binary + * with a section named "oc" that needs relocations, but that's + * the kind of ugly side-effects you get when detecting section + * types based on their names... In practice, this limitation is + * unlikely to bite. + */ + hdr->sh_type = SHT_PROGBITS; + + return true; +} + + #define TARGET_LITTLE_SYM bfd_elf32_i386_vec #define TARGET_LITTLE_NAME "elf32-i386" #define ELF_ARCH bfd_arch_i386 @@ -2096,5 +2134,6 @@ elf_i386_finish_dynamic_sections (output #define elf_backend_gc_sweep_hook elf_i386_gc_sweep_hook #define elf_backend_relocate_section elf_i386_relocate_section #define elf_backend_size_dynamic_sections elf_i386_size_dynamic_sections +#define elf_backend_fake_sections elf_i386_fake_sections #include "elf32-target.h" diff -uprN binutils-2.11.90.0.4/bfd/elf32-mips.c binutils-2.11.90.0.5/bfd/elf32-mips.c --- binutils-2.11.90.0.4/bfd/elf32-mips.c Fri Mar 23 14:37:30 2001 +++ binutils-2.11.90.0.5/bfd/elf32-mips.c Sat Apr 7 23:02:56 2001 @@ -208,6 +208,9 @@ static int sort_dynamic_relocs PARAMS ((const void *, const void *)); extern const bfd_target bfd_elf32_tradbigmips_vec; +extern const bfd_target bfd_elf32_tradlittlemips_vec; +extern const bfd_target bfd_elf64_tradbigmips_vec; +extern const bfd_target bfd_elf64_tradlittlemips_vec; /* The level of IRIX compatibility we're striving for. */ @@ -225,8 +228,7 @@ static bfd *reldyn_sorting_bfd; #define ABI_N32_P(abfd) \ ((elf_elfheader (abfd)->e_flags & EF_MIPS_ABI2) != 0) -/* Nonzero if ABFD is using the 64-bit ABI. FIXME: This is never - true, yet. */ +/* Nonzero if ABFD is using the 64-bit ABI. */ #define ABI_64_P(abfd) \ ((elf_elfheader (abfd)->e_ident[EI_CLASS] == ELFCLASS64) != 0) @@ -234,7 +236,10 @@ static bfd *reldyn_sorting_bfd; executables or "normal" MIPS ELF ABI executables. */ #define IRIX_COMPAT(abfd) \ - (abfd->xvec == &bfd_elf32_tradbigmips_vec ? ict_none : \ + (((abfd->xvec == &bfd_elf64_tradbigmips_vec) || \ + (abfd->xvec == &bfd_elf64_tradlittlemips_vec) || \ + (abfd->xvec == &bfd_elf32_tradbigmips_vec) || \ + (abfd->xvec == &bfd_elf32_tradlittlemips_vec)) ? ict_none : \ ((ABI_N32_P (abfd) || ABI_64_P (abfd)) ? ict_irix6 : ict_irix5)) /* Whether we are trying to be compatible with IRIX at all. */ @@ -2301,7 +2306,12 @@ mips_elf_sym_is_global (abfd, sym) bfd *abfd ATTRIBUTE_UNUSED; asymbol *sym; { - return (sym->flags & BSF_SECTION_SYM) == 0 ? true : false; + if (SGI_COMPAT(abfd)) + return (sym->flags & BSF_SECTION_SYM) == 0 ? true : false; + else + return ((sym->flags & (BSF_GLOBAL | BSF_WEAK)) != 0 + || bfd_is_und_section (bfd_get_section (sym)) + || bfd_is_com_section (bfd_get_section (sym))); } /* Set the right machine number for a MIPS ELF file. This is used for diff -uprN binutils-2.11.90.0.4/bfd/elf64-mips.c binutils-2.11.90.0.5/bfd/elf64-mips.c --- binutils-2.11.90.0.4/bfd/elf64-mips.c Fri Mar 9 11:15:56 2001 +++ binutils-2.11.90.0.5/bfd/elf64-mips.c Sat Apr 7 22:46:34 2001 @@ -2189,3 +2189,20 @@ const struct elf_size_info mips_elf64_si _bfd_archive_coff_update_armap_timestamp #include "elf64-target.h" + +/* Support for traditional mips targets */ + +#define INCLUDED_TARGET_FILE /* More a type of flag */ + +#undef TARGET_LITTLE_SYM +#undef TARGET_LITTLE_NAME +#undef TARGET_BIG_SYM +#undef TARGET_BIG_NAME + +#define TARGET_LITTLE_SYM bfd_elf64_tradlittlemips_vec +#define TARGET_LITTLE_NAME "elf64-tradlittlemips" +#define TARGET_BIG_SYM bfd_elf64_tradbigmips_vec +#define TARGET_BIG_NAME "elf64-tradbigmips" + +/* Include the target file again for this target */ +#include "elf64-target.h" diff -uprN binutils-2.11.90.0.4/bfd/elflink.h binutils-2.11.90.0.5/bfd/elflink.h --- binutils-2.11.90.0.4/bfd/elflink.h Fri Mar 9 11:37:59 2001 +++ binutils-2.11.90.0.5/bfd/elflink.h Fri Apr 13 11:47:22 2001 @@ -2179,6 +2179,18 @@ elf_link_add_object_symbols (abfd, info) } } + if (! info->relocateable && ! dynamic) + { + asection *s; + + for (s = abfd->sections; s != NULL; s = s->next) + if ((s->flags & SEC_MERGE) + && ! _bfd_merge_section (abfd, + &elf_hash_table (info)->merge_info, + s, &elf_section_data (s)->merge_info)) + goto error_return; + } + return true; error_return: @@ -2969,14 +2981,13 @@ NAME(bfd_elf,size_dynamic_sections) (out } } + eif.info = info; + eif.failed = false; + /* If we are supposed to export all symbols into the dynamic symbol table (this is not the normal case), then do so. */ if (export_dynamic) { - struct elf_info_failed eif; - - eif.failed = false; - eif.info = info; elf_link_hash_traverse (elf_hash_table (info), elf_export_symbol, (PTR) &eif); if (eif.failed) @@ -2998,8 +3009,6 @@ NAME(bfd_elf,size_dynamic_sections) (out /* Find all symbols which were defined in a dynamic object and make the backend pick a reasonable value for them. */ - eif.failed = false; - eif.info = info; elf_link_hash_traverse (elf_hash_table (info), elf_adjust_dynamic_symbol, (PTR) &eif); @@ -3530,16 +3539,21 @@ elf_fix_symbol_flags (h, eif) /* If -Bsymbolic was used (which means to bind references to global symbols to the definition within the shared object), and this symbol was defined in a regular object, then it actually doesn't - need a PLT entry. Likewise, if the symbol has any kind of - visibility (internal, hidden, or protected), it doesn't need a - PLT. */ + need a PLT entry, and we can accomplish that by forcing it local. + Likewise, if the symbol has hidden or internal visibility. + FIXME: It might be that we also do not need a PLT for other + non-hidden visibilities, but we would have to tell that to the + backend specifically; we can't just clear PLT-related data here. */ if ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0 && eif->info->shared - && (eif->info->symbolic || ELF_ST_VISIBILITY (h->other)) + && (eif->info->symbolic + || ELF_ST_VISIBILITY (h->other) == STV_INTERNAL + || ELF_ST_VISIBILITY (h->other) == STV_HIDDEN) && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) != 0) { - h->elf_link_hash_flags &=~ ELF_LINK_HASH_NEEDS_PLT; - h->plt.offset = (bfd_vma) -1; + struct elf_backend_data *bed; + bed = get_elf_backend_data (elf_hash_table (eif->info)->dynobj); + (*bed->elf_backend_hide_symbol) (eif->info, h); } /* If this is a weak defined symbol in a dynamic object, and we know @@ -4079,6 +4093,8 @@ static boolean elf_link_flush_output_sym PARAMS ((struct elf_final_link_info *)); static boolean elf_link_output_extsym PARAMS ((struct elf_link_hash_entry *, PTR)); +static boolean elf_link_sec_merge_syms + PARAMS ((struct elf_link_hash_entry *, PTR)); static boolean elf_link_input_bfd PARAMS ((struct elf_final_link_info *, bfd *)); static boolean elf_reloc_link_order @@ -4228,6 +4244,7 @@ elf_bfd_final_link (abfd, info) Elf_Internal_Shdr *symstrtab_hdr; struct elf_backend_data *bed = get_elf_backend_data (abfd); struct elf_outext_info eoinfo; + boolean merged; if (info->shared) abfd->flags |= DYNAMIC; @@ -4273,6 +4290,7 @@ elf_bfd_final_link (abfd, info) max_external_reloc_size = 0; max_internal_reloc_count = 0; max_sym_count = 0; + merged = false; for (o = abfd->sections; o != (asection *) NULL; o = o->next) { o->reloc_count = 0; @@ -4294,6 +4312,9 @@ elf_bfd_final_link (abfd, info) the linker has decided to not include. */ sec->linker_mark = true; + if (sec->flags & SEC_MERGE) + merged = true; + if (info->relocateable || info->emitrelocations) o->reloc_count += sec->reloc_count; @@ -4351,6 +4372,10 @@ elf_bfd_final_link (abfd, info) o->vma = 0; } + if (! info->relocateable && merged) + elf_link_hash_traverse (elf_hash_table (info), + elf_link_sec_merge_syms, (PTR) abfd); + /* Figure out the file positions for everything but the symbol table and the relocs. We set symcount to force assign_section_numbers to create a symbol table. */ @@ -5070,6 +5095,33 @@ elf_link_flush_output_syms (finfo) return true; } +/* Adjust all external symbols pointing into SEC_MERGE sections + to reflect the object merging within the sections. */ + +static boolean +elf_link_sec_merge_syms (h, data) + struct elf_link_hash_entry *h; + PTR data; +{ + asection *sec; + + if ((h->root.type == bfd_link_hash_defined + || h->root.type == bfd_link_hash_defweak) + && ((sec = h->root.u.def.section)->flags & SEC_MERGE) + && elf_section_data (sec)->merge_info) + { + bfd *output_bfd = (bfd *) data; + + h->root.u.def.value = + _bfd_merged_section_offset (output_bfd, + &h->root.u.def.section, + elf_section_data (sec)->merge_info, + h->root.u.def.value, (bfd_vma) 0); + } + + return true; +} + /* Add an external symbol to the symbol table. This is called from the hash table traversal routine. When generating a shared object, we go through the symbol table twice. The first time we output @@ -5535,7 +5587,15 @@ elf_link_input_bfd (finfo, input_bfd) name = isec->name; } else if (isym->st_shndx > 0 && isym->st_shndx < SHN_LORESERVE) - isec = section_from_elf_index (input_bfd, isym->st_shndx); + { + isec = section_from_elf_index (input_bfd, isym->st_shndx); + if (isec && elf_section_data (isec)->merge_info + && ELF_ST_TYPE (isym->st_info) != STT_SECTION) + isym->st_value = + _bfd_merged_section_offset (output_bfd, &isec, + elf_section_data (isec)->merge_info, + isym->st_value, (bfd_vma) 0); + } else if (isym->st_shndx == SHN_ABS) { isec = bfd_abs_section_ptr; @@ -5637,7 +5697,9 @@ elf_link_input_bfd (finfo, input_bfd) if ((finfo->info->strip == strip_some && (bfd_hash_lookup (finfo->info->keep_hash, name, false, false) == NULL)) - || (finfo->info->discard == discard_l + || (((finfo->info->discard == discard_sec_merge + && (isec->flags & SEC_MERGE) && ! finfo->info->relocateable) + || finfo->info->discard == discard_l) && bfd_is_local_label_name (input_bfd, name))) continue; @@ -5899,7 +5961,20 @@ elf_link_input_bfd (finfo, input_bfd) } /* Write out the modified section contents. */ - if (elf_section_data (o)->stab_info == NULL) + if (elf_section_data (o)->stab_info) + { + if (! (_bfd_write_section_stabs + (output_bfd, &elf_hash_table (finfo->info)->stab_info, + o, &elf_section_data (o)->stab_info, contents))) + return false; + } + else if (elf_section_data (o)->merge_info) + { + if (! (_bfd_write_merged_section + (output_bfd, o, elf_section_data (o)->merge_info))) + return false; + } + else { if (! (o->flags & SEC_EXCLUDE) && ! bfd_set_section_contents (output_bfd, o->output_section, @@ -5907,13 +5982,6 @@ elf_link_input_bfd (finfo, input_bfd) (o->_cooked_size != 0 ? o->_cooked_size : o->_raw_size))) - return false; - } - else - { - if (! (_bfd_write_section_stabs - (output_bfd, &elf_hash_table (finfo->info)->stab_info, - o, &elf_section_data (o)->stab_info, contents))) return false; } } diff -uprN binutils-2.11.90.0.4/bfd/libbfd-in.h binutils-2.11.90.0.5/bfd/libbfd-in.h --- binutils-2.11.90.0.4/bfd/libbfd-in.h Fri Mar 9 11:16:01 2001 +++ binutils-2.11.90.0.5/bfd/libbfd-in.h Fri Apr 13 11:18:45 2001 @@ -462,6 +462,21 @@ extern boolean _bfd_write_stab_strings P extern bfd_vma _bfd_stab_section_offset PARAMS ((bfd *, PTR *, asection *, PTR *, bfd_vma)); +/* Attempt to merge a SEC_MERGE section. */ + +extern boolean _bfd_merge_section + PARAMS ((bfd *, PTR *, asection *, PTR *)); + +/* Write out a merged section. */ + +extern boolean _bfd_write_merged_section + PARAMS ((bfd *, asection *, PTR)); + +/* Find an offset within a modified SEC_MERGE section. */ + +extern bfd_vma _bfd_merged_section_offset + PARAMS ((bfd *, asection **, PTR, bfd_vma, bfd_vma)); + /* Create a string table. */ extern struct bfd_strtab_hash *_bfd_stringtab_init PARAMS ((void)); diff -uprN binutils-2.11.90.0.4/bfd/libbfd.h binutils-2.11.90.0.5/bfd/libbfd.h --- binutils-2.11.90.0.4/bfd/libbfd.h Fri Mar 23 14:37:31 2001 +++ binutils-2.11.90.0.5/bfd/libbfd.h Fri Apr 13 11:47:23 2001 @@ -462,6 +462,21 @@ extern boolean _bfd_write_stab_strings P extern bfd_vma _bfd_stab_section_offset PARAMS ((bfd *, PTR *, asection *, PTR *, bfd_vma)); +/* Attempt to merge a SEC_MERGE section. */ + +extern boolean _bfd_merge_section + PARAMS ((bfd *, PTR *, asection *, PTR *)); + +/* Write out a merged section. */ + +extern boolean _bfd_write_merged_section + PARAMS ((bfd *, asection *, PTR)); + +/* Find an offset within a modified SEC_MERGE section. */ + +extern bfd_vma _bfd_merged_section_offset + PARAMS ((bfd *, asection **, PTR, bfd_vma, bfd_vma)); + /* Create a string table. */ extern struct bfd_strtab_hash *_bfd_stringtab_init PARAMS ((void)); diff -uprN binutils-2.11.90.0.4/bfd/linker.c binutils-2.11.90.0.5/bfd/linker.c --- binutils-2.11.90.0.4/bfd/linker.c Fri Mar 9 11:38:00 2001 +++ binutils-2.11.90.0.5/bfd/linker.c Fri Apr 13 11:47:23 2001 @@ -2279,6 +2279,12 @@ _bfd_generic_link_output_symbols (output case discard_all: output = false; break; + case discard_sec_merge: + output = true; + if (info->relocateable + || ! (sym->section->flags & SEC_MERGE)) + break; + /* FALLTHROUGH */ case discard_l: if (bfd_is_local_label (input_bfd, sym)) output = false; diff -uprN binutils-2.11.90.0.4/bfd/merge.c binutils-2.11.90.0.5/bfd/merge.c --- binutils-2.11.90.0.4/bfd/merge.c Wed Dec 31 16:00:00 1969 +++ binutils-2.11.90.0.5/bfd/merge.c Fri Apr 13 11:18:52 2001 @@ -0,0 +1,606 @@ +/* SEC_MERGE support. + Copyright 2001 Free Software Foundation, Inc. + Written by Jakub Jelinek . + +This file is part of BFD, the Binary File Descriptor library. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +/* This file contains support for merging duplicate entities within sections, + as used in ELF SHF_MERGE. */ + +#include "bfd.h" +#include "sysdep.h" +#include "libbfd.h" + +#include + +/* An entry in the section merge hash table. */ + +struct sec_merge_hash_entry +{ + struct bfd_hash_entry root; + /* Length of this entry. */ + unsigned int len; + /* Index within the merged section. */ + bfd_size_type index; + /* Which section is it in. */ + asection *sec; + /* Next entity in the hash table. */ + struct sec_merge_hash_entry *next; +}; + +/* The section merge hash table. */ + +struct sec_merge_hash +{ + struct bfd_hash_table table; + /* Next available index. */ + bfd_size_type size; + /* First entity in the SEC_MERGE sections of this type. */ + struct sec_merge_hash_entry *first; + /* Last entity in the SEC_MERGE sections of this type. */ + struct sec_merge_hash_entry *last; + /* Entity size. */ + unsigned int entsize; + /* Start of each string needs to be aligned to 1 << alignment_power + octets. */ + unsigned int alignment_power; + /* Are entries fixed size or zero terminated strings? */ + boolean strings; +}; + +struct sec_merge_info +{ + /* Chain of sec_merge_infos. */ + struct sec_merge_info *next; + /* A hash table used to hold section content. */ + struct sec_merge_hash *htab; + /* The last section attempted for merge. */ + asection *last; +}; + +struct sec_merge_sec_info +{ + /* A hash table used to hold section content. */ + struct sec_merge_hash *htab; + /* First string in this section. */ + struct sec_merge_hash_entry *first; + /* Original section content. */ + unsigned char contents[1]; +}; + +static struct bfd_hash_entry *sec_merge_hash_newfunc + PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *)); +static struct sec_merge_hash_entry *sec_merge_hash_lookup + PARAMS ((struct sec_merge_hash *, const char *, boolean)); +static struct sec_merge_hash *sec_merge_init + PARAMS ((unsigned int, unsigned int, boolean)); +static struct sec_merge_hash_entry *sec_merge_add + PARAMS ((struct sec_merge_hash *, const char *)); +static boolean sec_merge_emit + PARAMS ((bfd *, struct sec_merge_hash *, struct sec_merge_hash_entry *)); + +/* Routine to create an entry in a section merge hashtab. */ + +static struct bfd_hash_entry * +sec_merge_hash_newfunc (entry, table, string) + struct bfd_hash_entry *entry; + struct bfd_hash_table *table; + const char *string; +{ + struct sec_merge_hash_entry *ret = (struct sec_merge_hash_entry *) entry; + + /* Allocate the structure if it has not already been allocated by a + subclass. */ + if (ret == (struct sec_merge_hash_entry *) NULL) + ret = ((struct sec_merge_hash_entry *) + bfd_hash_allocate (table, sizeof (struct sec_merge_hash_entry))); + if (ret == (struct sec_merge_hash_entry *) NULL) + return NULL; + + /* Call the allocation method of the superclass. */ + ret = ((struct sec_merge_hash_entry *) + bfd_hash_newfunc ((struct bfd_hash_entry *) ret, table, string)); + + if (ret) + { + /* Initialize the local fields. */ + ret->index = (bfd_size_type) -1; + ret->sec = NULL; + ret->next = NULL; + } + + return (struct bfd_hash_entry *)ret; +} + +/* Look up an entry in a section merge hash table. */ + +static struct sec_merge_hash_entry * +sec_merge_hash_lookup (table, string, create) + struct sec_merge_hash *table; + const char *string; + boolean create; +{ + register const unsigned char *s; + register unsigned long hash; + register unsigned int c; + struct sec_merge_hash_entry *hashp; + unsigned int len, i; + unsigned int index; + + hash = 0; + len = 0; + s = (const unsigned char *) string; + if (table->strings) + { + if (table->entsize == 1) + { + while ((c = *s++) != '\0') + { + hash += c + (c << 17); + hash ^= hash >> 2; + ++len; + } + hash += len + (len << 17); + } + else + { + for (;;) + { + for (i = 0; i < table->entsize; ++i) + if (s[i] != '\0') + break; + if (i == table->entsize) + break; + for (i = 0; i < table->entsize; ++i) + { + c = *s++; + hash += c + (c << 17); + hash ^= hash >> 2; + } + ++len; + } + hash += len + (len << 17); + len *= table->entsize; + } + hash ^= hash >> 2; + len += table->entsize; + } + else + { + for (i = 0; i < table->entsize; ++i) + { + c = *s++; + hash += c + (c << 17); + hash ^= hash >> 2; + } + len = table->entsize; + } + + index = hash % table->table.size; + for (hashp = (struct sec_merge_hash_entry *) table->table.table[index]; + hashp != (struct sec_merge_hash_entry *) NULL; + hashp = (struct sec_merge_hash_entry *) hashp->next) + { + if (hashp->root.hash == hash + && len == hashp->len + && memcmp (hashp->root.string, string, len) == 0) + return hashp; + } + + if (! create) + return (struct sec_merge_hash_entry *) NULL; + + hashp = (struct sec_merge_hash_entry *) + sec_merge_hash_newfunc ((struct bfd_hash_entry *) NULL, + (struct bfd_hash_table *) table, string); + if (hashp == (struct sec_merge_hash_entry *) NULL) + return (struct sec_merge_hash_entry *) NULL; + hashp->root.string = string; + hashp->root.hash = hash; + hashp->len = len; + hashp->root.next = table->table.table[index]; + table->table.table[index] = (struct bfd_hash_entry *) hashp; + + return hashp; +} + +/* Create a new hash table. */ + +static struct sec_merge_hash * +sec_merge_init (alignment_power, entsize, strings) + unsigned int alignment_power, entsize; + boolean strings; +{ + struct sec_merge_hash *table; + + table = ((struct sec_merge_hash *) + bfd_malloc (sizeof (struct sec_merge_hash))); + if (table == NULL) + return NULL; + + if (! bfd_hash_table_init (&table->table, sec_merge_hash_newfunc)) + { + free (table); + return NULL; + } + + table->size = 0; + table->first = NULL; + table->last = NULL; + table->alignment_power = alignment_power; + table->entsize = entsize; + table->strings = strings; + + return table; +} + +/* Get the index of an entity in a hash table, adding it if it is not + already present. */ + +static struct sec_merge_hash_entry * +sec_merge_add (tab, str) + struct sec_merge_hash *tab; + const char *str; +{ + register struct sec_merge_hash_entry *entry; + + entry = sec_merge_hash_lookup (tab, str, true); + if (entry == NULL) + return NULL; + + if (entry->index == (bfd_size_type) -1) + { + entry->index = tab->size; + tab->size += entry->len; + tab->size = align_power (tab->size, tab->alignment_power); + if (tab->first == NULL) + tab->first = entry; + else + tab->last->next = entry; + tab->last = entry; + } + + return entry; +} + +static boolean +sec_merge_emit (abfd, tab, entry) + register bfd *abfd; + struct sec_merge_hash *tab; + struct sec_merge_hash_entry *entry; +{ + asection *sec = entry->sec; + char *pad = ""; + + if (tab->alignment_power) + pad = bfd_zmalloc (1 << tab->alignment_power); + + for (; entry != NULL && entry->sec == sec; entry = entry->next) + { + register const char *str; + register size_t len; + + str = entry->root.string; + len = entry->len; + + if (bfd_write ((PTR) str, 1, len, abfd) != len) + break; + + if (tab->alignment_power) + { + len &= (1 << tab->alignment_power) - 1; + if (len && bfd_write ((PTR) pad, 1, + (1 << tab->alignment_power) - len, + abfd) != (1 << tab->alignment_power) - len) + break; + } + } + + if (tab->alignment_power) + free (pad); + + return entry == NULL || entry->sec != sec; +} + +/* This function is called for each input file from the add_symbols + pass of the linker. */ + +boolean +_bfd_merge_section (abfd, psinfo, sec, psecinfo) + bfd *abfd; + PTR *psinfo; + asection *sec; + PTR *psecinfo; +{ + boolean first, nul; + struct sec_merge_info *sinfo; + struct sec_merge_sec_info *secinfo; + unsigned char *p, *end; + bfd_vma mask; + unsigned int align; + unsigned int i; + + if (sec->_raw_size == 0 + || (sec->flags & SEC_MERGE) == 0 + || sec->entsize == 0) + return true; + + if ((sec->flags & SEC_RELOC) != 0) + { + /* We aren't prepared to handle relocations in merged sections. */ + return true; + } + + if (sec->output_section != NULL + && bfd_is_abs_section (sec->output_section)) + { + /* The section is being discarded from the link, so we should + just ignore it. */ + return true; + } + + align = bfd_get_section_alignment (abfd, sec); + if ((sec->flags & SEC_STRINGS) + && ((sec->entsize < (unsigned int)(1 << align) + && (sec->entsize & (sec->entsize - 1))) + || (sec->entsize > (unsigned int)(1 << align) + && (sec->entsize & ((1 << align) - 1))))) + { + /* Sanity check. If string character size is smaller than + alignment, then we require character size to be a power + of 2, otherwise character size must be integer multiple + of alignment. */ + return true; + } + + first = false; + + for (sinfo = (struct sec_merge_info *) *psinfo; sinfo; sinfo = sinfo->next) + if (! ((sinfo->last->flags ^ sec->flags) & (SEC_MERGE | SEC_STRINGS)) + && sinfo->last->entsize == sec->entsize + && ! strcmp (sinfo->last->name, sec->name) + && bfd_get_section_alignment (abfd, sinfo->last) == align) + break; + + if (sinfo == NULL) + { + /* Initialize the information we need to keep track of. */ + first = true; + sinfo = (struct sec_merge_info *) + bfd_alloc (abfd, sizeof (struct sec_merge_info)); + if (sinfo == NULL) + goto error_return; + sinfo->next = (struct sec_merge_info *) *psinfo; + *psinfo = (PTR) sinfo; + sinfo->htab = + sec_merge_init ((sec->flags & SEC_STRINGS) ? align : 0, + sec->entsize, (sec->flags & SEC_STRINGS)); + if (sinfo->htab == NULL) + goto error_return; + } + + /* Read the section from abfd. */ + + *psecinfo = bfd_alloc (abfd, sizeof (struct sec_merge_sec_info) + + sec->_raw_size - 1); + if (*psecinfo == NULL) + goto error_return; + + secinfo = (struct sec_merge_sec_info *)*psecinfo; + secinfo->htab = sinfo->htab; + sinfo->htab->size = 0; + secinfo->first = NULL; + + if (! bfd_get_section_contents (abfd, sec, secinfo->contents, 0, + sec->_raw_size)) + goto error_return; + + end = secinfo->contents + sec->_raw_size; + nul = false; + mask = ((bfd_vma)1 << sinfo->htab->alignment_power) - 1; + if (sec->flags & SEC_STRINGS) + { + for (p = secinfo->contents; p < end;) + { + struct sec_merge_hash_entry *entry; + + entry = sec_merge_add (sinfo->htab, p); + if (entry->sec == NULL) + { + if (secinfo->first == NULL) + secinfo->first = entry; + entry->sec = sec; + } + p += entry->len; + if (sec->entsize == 1) + { + while (p < end && *p == 0) + { + if (!nul && !((p - secinfo->contents) & mask)) + { + nul = true; + entry = sec_merge_add (sinfo->htab, ""); + if (entry->sec == NULL) + { + if (secinfo->first == NULL) + secinfo->first = entry; + entry->sec = sec; + } + } + p++; + } + } + else + { + while (p < end) + { + for (i = 0; i < sec->entsize; i++) + if (p[i] != '\0') + break; + if (i != sec->entsize) + break; + if (!nul && !((p - secinfo->contents) & mask)) + { + nul = true; + entry = sec_merge_add (sinfo->htab, p); + if (entry->sec == NULL) + { + if (secinfo->first == NULL) + secinfo->first = entry; + entry->sec = sec; + } + } + p += sec->entsize; + } + } + } + } + else + { + for (p = secinfo->contents; p < end; p += sec->entsize) + { + struct sec_merge_hash_entry *entry; + + entry = sec_merge_add (sinfo->htab, p); + if (entry->sec == NULL) + { + if (secinfo->first == NULL) + secinfo->first = entry; + entry->sec = sec; + } + } + } + + sec->_cooked_size = sinfo->htab->size; + if (!sec->_cooked_size) + sec->flags |= SEC_EXCLUDE; + sinfo->last = sec; + return true; + + error_return: + if (*psecinfo != NULL) + free (*psecinfo); + *psecinfo = NULL; + return false; +} + +/* Write out the merged section. */ + +boolean +_bfd_write_merged_section (output_bfd, sec, psecinfo) + bfd *output_bfd; + asection *sec; + PTR psecinfo; +{ + struct sec_merge_sec_info *secinfo; + + secinfo = (struct sec_merge_sec_info *) psecinfo; + + if (!secinfo->first) + return true; + + if (bfd_seek (output_bfd, + (sec->output_section->filepos + sec->output_offset), + SEEK_SET) != 0) + return false; + + if (! sec_merge_emit (output_bfd, secinfo->htab, secinfo->first)) + return false; + + return true; +} + +/* Adjust an address in the SEC_MERGE section. Given OFFSET within + *PSEC, this returns the new offset in the adjusted SEC_MERGE + section and writes the new section back into *PSEC. */ + +bfd_vma +_bfd_merged_section_offset (output_bfd, psec, psecinfo, offset, addend) + bfd *output_bfd ATTRIBUTE_UNUSED; + asection **psec; + PTR psecinfo; + bfd_vma offset, addend; +{ + struct sec_merge_sec_info *secinfo; + struct sec_merge_hash_entry *entry; + unsigned char *p; + asection *sec = *psec; + + secinfo = (struct sec_merge_sec_info *) psecinfo; + + if (offset + addend >= sec->_raw_size) + { + if (offset + addend > sec->_raw_size) + (*_bfd_error_handler) (_("%s: access beyond end of merged section (%ld + %ld)"), + bfd_get_filename (sec->owner), (long)offset, + (long) addend); + return (secinfo->first ? sec->_cooked_size : 0); + } + + if (secinfo->htab->strings) + { + if (sec->entsize == 1) + { + p = secinfo->contents + offset + addend - 1; + while (*p && p >= secinfo->contents) + --p; + ++p; + } + else + { + p = secinfo->contents + + ((offset + addend) / sec->entsize) * sec->entsize; + p -= sec->entsize; + while (p >= secinfo->contents) + { + unsigned int i; + + for (i = 0; i < sec->entsize; ++i) + if (p[i] != '\0') + break; + if (i == sec->entsize) + break; + p -= sec->entsize; + } + p += sec->entsize; + } + } + else + { + p = secinfo->contents + + ((offset + addend) / sec->entsize) * sec->entsize; + } + entry = sec_merge_hash_lookup (secinfo->htab, p, false); + if (!entry) + { + if (! secinfo->htab->strings) + abort (); + /* This should only happen if somebody points into the padding + after a NUL character but before next entity. */ + if (*p) + abort (); + if (! secinfo->htab->first) + abort (); + entry = secinfo->htab->first; + p = secinfo->contents + + ((offset + addend) / sec->entsize + 1) * sec->entsize + - entry->len; + } + + *psec = entry->sec; + return entry->index + (secinfo->contents + offset - p); +} diff -uprN binutils-2.11.90.0.4/bfd/pdp11.c binutils-2.11.90.0.5/bfd/pdp11.c --- binutils-2.11.90.0.4/bfd/pdp11.c Fri Mar 9 11:16:04 2001 +++ binutils-2.11.90.0.5/bfd/pdp11.c Fri Apr 13 11:18:48 2001 @@ -4110,6 +4110,7 @@ aout_link_write_symbols (finfo, input_bf switch (discard) { case discard_none: + case discard_sec_merge: break; case discard_l: if ((type & N_STAB) == 0 diff -uprN binutils-2.11.90.0.4/bfd/section.c binutils-2.11.90.0.5/bfd/section.c --- binutils-2.11.90.0.4/bfd/section.c Fri Mar 9 11:38:00 2001 +++ binutils-2.11.90.0.5/bfd/section.c Sat Apr 14 12:52:17 2001 @@ -1,6 +1,6 @@ /* Object file "section" support for the BFD library. Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000 + 2000, 2001 Free Software Foundation, Inc. Written by Cygnus Support. @@ -350,6 +350,15 @@ CODE_FRAGMENT . references found to any symbol in the section. *} .#define SEC_CLINK 0x10000000 . +. {* Attempt to merge identical entities in the section. +. Entity size is given in the entsize field. *} +.#define SEC_MERGE 0x20000000 +. +. {* If given with SEC_MERGE, entities to merge are zero terminated +. strings where entsize specifies character size instead of fixed +. size entries. *} +.#define SEC_STRINGS 0x40000000 +. . {* End of section flags. *} . . {* Some internal packed boolean fields. *} @@ -462,6 +471,10 @@ CODE_FRAGMENT . . unsigned int lineno_count; . +. {* Entity size for merging purposes. *} +. +. unsigned int entsize; +. . {* Optional information about a COMDAT entry; NULL if not COMDAT. *} . . struct bfd_comdat_info *comdat; @@ -577,11 +590,11 @@ static const asymbol global_syms[] = /* line_filepos, userdata, contents, lineno, lineno_count, */ \ 0, NULL, NULL, NULL, 0, \ \ - /* comdat, kept_section, moving_line_filepos, target_index, */ \ - NULL, NULL, 0, 0, \ + /* entsize, comdat, kept_section, moving_line_filepos, */ \ + 0, NULL, NULL, 0, \ \ - /* used_by_bfd, constructor_chain, owner, */ \ - NULL, NULL, NULL, \ + /* target_index, used_by_bfd, constructor_chain, owner, */ \ + 0, NULL, NULL, NULL, \ \ /* symbol, */ \ (struct symbol_cache_entry *) &global_syms[IDX], \ diff -uprN binutils-2.11.90.0.4/bfd/targets.c binutils-2.11.90.0.5/bfd/targets.c --- binutils-2.11.90.0.4/bfd/targets.c Fri Mar 9 11:38:01 2001 +++ binutils-2.11.90.0.5/bfd/targets.c Sat Apr 7 23:02:58 2001 @@ -564,6 +564,8 @@ extern const bfd_target bfd_elf64_ia64_b extern const bfd_target bfd_elf64_ia64_little_vec; extern const bfd_target bfd_elf64_little_generic_vec; extern const bfd_target bfd_elf64_littlemips_vec; +extern const bfd_target bfd_elf64_tradbigmips_vec; +extern const bfd_target bfd_elf64_tradlittlemips_vec; extern const bfd_target bfd_elf64_s390_vec; extern const bfd_target bfd_elf64_sparc_vec; extern const bfd_target bfd_elf64_x86_64_vec; @@ -781,7 +783,10 @@ static const bfd_target * const _bfd_tar &bfd_elf32_mcore_little_vec, &bfd_elf32_tradbigmips_vec, &bfd_elf32_tradlittlemips_vec, -#ifdef BFD64 /* No one seems to use this. */ +#ifdef BFD64 + &bfd_elf64_tradbigmips_vec, + &bfd_elf64_tradlittlemips_vec, + /* No one seems to use this. */ &bfd_elf64_big_generic_vec, &bfd_elf64_little_generic_vec, #endif diff -uprN binutils-2.11.90.0.4/binutils/ChangeLog binutils-2.11.90.0.5/binutils/ChangeLog --- binutils-2.11.90.0.4/binutils/ChangeLog Fri Mar 30 22:40:21 2001 +++ binutils-2.11.90.0.5/binutils/ChangeLog Fri Apr 13 11:17:44 2001 @@ -1,3 +1,12 @@ +2001-04-10 Alan Modra + + * MAINTAINERS: Update my email address + * nm.c (print_symbol_info_bsd): Use a simple printf string. + +2001-04-05 Hans-Peter Nilsson + + * readelf.c (display_debug_lines): Fix typo for "Prologue". + 2001-03-30 H.J. Lu * readelf.c (process_unwind): Just return if do_unwind is 0. diff -uprN binutils-2.11.90.0.4/binutils/MAINTAINERS binutils-2.11.90.0.5/binutils/MAINTAINERS --- binutils-2.11.90.0.4/binutils/MAINTAINERS Thu Mar 15 14:51:42 2001 +++ binutils-2.11.90.0.5/binutils/MAINTAINERS Fri Apr 13 11:17:45 2001 @@ -17,7 +17,7 @@ Ian Taylor Jeff Law Jim Wilson DJ Delorie -Alan Modra +Alan Modra Michael Meissner --------- Maintainers --------- @@ -36,10 +36,10 @@ other maintainers. ARM Nick Clifton AVR Denis Chertykov CRIS Hans-Peter Nilsson -HPPA elf32 Alan Modra +HPPA elf32 Alan Modra IA64 Jim Wilson i860 Jason Eckhardt -ix86 Alan Modra +ix86 Alan Modra ix86 COFF,PE DJ Delorie ix86 H.J.Lu ix86 INTEL MODE Diego Novillo diff -uprN binutils-2.11.90.0.4/binutils/addr2line.1 binutils-2.11.90.0.5/binutils/addr2line.1 --- binutils-2.11.90.0.4/binutils/addr2line.1 Sun Apr 1 19:29:24 2001 +++ binutils-2.11.90.0.5/binutils/addr2line.1 Sat Apr 14 17:50:32 2001 @@ -1,5 +1,5 @@ .\" Automatically generated by Pod::Man version 1.02 -.\" Sun Apr 1 19:29:24 2001 +.\" Sat Apr 14 17:50:27 2001 .\" .\" Standard preamble: .\" ====================================================================== @@ -137,7 +137,7 @@ .\" ====================================================================== .\" .IX Title "ADDR2LINE.1 1" -.TH ADDR2LINE.1 1 "binutils-2.11.90.0.4" "2001-04-01" "GNU" +.TH ADDR2LINE.1 1 "binutils-2.11.90.0.5" "2001-04-14" "GNU" .UC .SH "NAME" addr2line \- convert addresses into file names and line numbers. diff -uprN binutils-2.11.90.0.4/binutils/ar.1 binutils-2.11.90.0.5/binutils/ar.1 --- binutils-2.11.90.0.4/binutils/ar.1 Sun Apr 1 19:29:26 2001 +++ binutils-2.11.90.0.5/binutils/ar.1 Sat Apr 14 17:50:33 2001 @@ -1,5 +1,5 @@ .\" Automatically generated by Pod::Man version 1.02 -.\" Sun Apr 1 19:29:25 2001 +.\" Sat Apr 14 17:50:27 2001 .\" .\" Standard preamble: .\" ====================================================================== @@ -137,7 +137,7 @@ .\" ====================================================================== .\" .IX Title "AR.1 1" -.TH AR.1 1 "binutils-2.11.90.0.4" "2001-04-01" "GNU" +.TH AR.1 1 "binutils-2.11.90.0.5" "2001-04-14" "GNU" .UC .SH "NAME" ar \- create, modify, and extract from archives diff -uprN binutils-2.11.90.0.4/binutils/cxxfilt.man binutils-2.11.90.0.5/binutils/cxxfilt.man --- binutils-2.11.90.0.4/binutils/cxxfilt.man Sun Apr 1 19:29:36 2001 +++ binutils-2.11.90.0.5/binutils/cxxfilt.man Sat Apr 14 17:50:41 2001 @@ -1,5 +1,5 @@ .\" Automatically generated by Pod::Man version 1.02 -.\" Sun Apr 1 19:29:35 2001 +.\" Sat Apr 14 17:50:36 2001 .\" .\" Standard preamble: .\" ====================================================================== @@ -137,7 +137,7 @@ .\" ====================================================================== .\" .IX Title "CXXFILT.MAN 1" -.TH CXXFILT.MAN 1 "binutils-2.11.90.0.4" "2001-04-01" "GNU" +.TH CXXFILT.MAN 1 "binutils-2.11.90.0.5" "2001-04-14" "GNU" .UC .SH "NAME" cxxfilt \- Demangle \*(C+ and Java symbols. diff -uprN binutils-2.11.90.0.4/binutils/dlltool.1 binutils-2.11.90.0.5/binutils/dlltool.1 --- binutils-2.11.90.0.4/binutils/dlltool.1 Sun Apr 1 19:29:26 2001 +++ binutils-2.11.90.0.5/binutils/dlltool.1 Sat Apr 14 17:50:34 2001 @@ -1,5 +1,5 @@ .\" Automatically generated by Pod::Man version 1.02 -.\" Sun Apr 1 19:29:25 2001 +.\" Sat Apr 14 17:50:28 2001 .\" .\" Standard preamble: .\" ====================================================================== @@ -137,7 +137,7 @@ .\" ====================================================================== .\" .IX Title "DLLTOOL.1 1" -.TH DLLTOOL.1 1 "binutils-2.11.90.0.4" "2001-04-01" "GNU" +.TH DLLTOOL.1 1 "binutils-2.11.90.0.5" "2001-04-14" "GNU" .UC .SH "NAME" dlltool \- Create files needed to build and use DLLs. diff -uprN binutils-2.11.90.0.4/binutils/nlmconv.1 binutils-2.11.90.0.5/binutils/nlmconv.1 --- binutils-2.11.90.0.4/binutils/nlmconv.1 Sun Apr 1 19:29:28 2001 +++ binutils-2.11.90.0.5/binutils/nlmconv.1 Sat Apr 14 17:50:34 2001 @@ -1,5 +1,5 @@ .\" Automatically generated by Pod::Man version 1.02 -.\" Sun Apr 1 19:29:27 2001 +.\" Sat Apr 14 17:50:29 2001 .\" .\" Standard preamble: .\" ====================================================================== @@ -137,7 +137,7 @@ .\" ====================================================================== .\" .IX Title "NLMCONV.1 1" -.TH NLMCONV.1 1 "binutils-2.11.90.0.4" "2001-04-01" "GNU" +.TH NLMCONV.1 1 "binutils-2.11.90.0.5" "2001-04-14" "GNU" .UC .SH "NAME" nlmconv \- converts object code into an \s-1NLM\s0. diff -uprN binutils-2.11.90.0.4/binutils/nm.1 binutils-2.11.90.0.5/binutils/nm.1 --- binutils-2.11.90.0.4/binutils/nm.1 Sun Apr 1 19:29:29 2001 +++ binutils-2.11.90.0.5/binutils/nm.1 Sat Apr 14 17:50:35 2001 @@ -1,5 +1,5 @@ .\" Automatically generated by Pod::Man version 1.02 -.\" Sun Apr 1 19:29:28 2001 +.\" Sat Apr 14 17:50:30 2001 .\" .\" Standard preamble: .\" ====================================================================== @@ -137,7 +137,7 @@ .\" ====================================================================== .\" .IX Title "NM.1 1" -.TH NM.1 1 "binutils-2.11.90.0.4" "2001-04-01" "GNU" +.TH NM.1 1 "binutils-2.11.90.0.5" "2001-04-14" "GNU" .UC .SH "NAME" nm \- list symbols from object files diff -uprN binutils-2.11.90.0.4/binutils/nm.c binutils-2.11.90.0.5/binutils/nm.c --- binutils-2.11.90.0.4/binutils/nm.c Sat Mar 17 12:47:58 2001 +++ binutils-2.11.90.0.5/binutils/nm.c Fri Apr 13 11:47:25 2001 @@ -1476,10 +1476,9 @@ print_symbol_info_bsd (info, abfd) if (bfd_is_undefined_symclass (info->type)) { #ifdef BFD64 - printf ("%*s", 16, ""); -#else - printf ("%*s", 8, ""); + printf (" "); #endif + printf (" "); } else print_value (info->value); diff -uprN binutils-2.11.90.0.4/binutils/objcopy.1 binutils-2.11.90.0.5/binutils/objcopy.1 --- binutils-2.11.90.0.4/binutils/objcopy.1 Sun Apr 1 19:29:31 2001 +++ binutils-2.11.90.0.5/binutils/objcopy.1 Sat Apr 14 17:50:37 2001 @@ -1,5 +1,5 @@ .\" Automatically generated by Pod::Man version 1.02 -.\" Sun Apr 1 19:29:29 2001 +.\" Sat Apr 14 17:50:31 2001 .\" .\" Standard preamble: .\" ====================================================================== @@ -137,7 +137,7 @@ .\" ====================================================================== .\" .IX Title "OBJCOPY.1 1" -.TH OBJCOPY.1 1 "binutils-2.11.90.0.4" "2001-04-01" "GNU" +.TH OBJCOPY.1 1 "binutils-2.11.90.0.5" "2001-04-14" "GNU" .UC .SH "NAME" objcopy \- copy and translate object files diff -uprN binutils-2.11.90.0.4/binutils/objdump.1 binutils-2.11.90.0.5/binutils/objdump.1 --- binutils-2.11.90.0.4/binutils/objdump.1 Sun Apr 1 19:29:32 2001 +++ binutils-2.11.90.0.5/binutils/objdump.1 Sat Apr 14 17:50:37 2001 @@ -1,5 +1,5 @@ .\" Automatically generated by Pod::Man version 1.02 -.\" Sun Apr 1 19:29:31 2001 +.\" Sat Apr 14 17:50:32 2001 .\" .\" Standard preamble: .\" ====================================================================== @@ -137,7 +137,7 @@ .\" ====================================================================== .\" .IX Title "OBJDUMP.1 1" -.TH OBJDUMP.1 1 "binutils-2.11.90.0.4" "2001-04-01" "GNU" +.TH OBJDUMP.1 1 "binutils-2.11.90.0.5" "2001-04-14" "GNU" .UC .SH "NAME" objdump \- display information from object files. diff -uprN binutils-2.11.90.0.4/binutils/ranlib.1 binutils-2.11.90.0.5/binutils/ranlib.1 --- binutils-2.11.90.0.4/binutils/ranlib.1 Sun Apr 1 19:29:32 2001 +++ binutils-2.11.90.0.5/binutils/ranlib.1 Sat Apr 14 17:50:38 2001 @@ -1,5 +1,5 @@ .\" Automatically generated by Pod::Man version 1.02 -.\" Sun Apr 1 19:29:32 2001 +.\" Sat Apr 14 17:50:33 2001 .\" .\" Standard preamble: .\" ====================================================================== @@ -137,7 +137,7 @@ .\" ====================================================================== .\" .IX Title "RANLIB.1 1" -.TH RANLIB.1 1 "binutils-2.11.90.0.4" "2001-04-01" "GNU" +.TH RANLIB.1 1 "binutils-2.11.90.0.5" "2001-04-14" "GNU" .UC .SH "NAME" ranlib \- generate index to archive. diff -uprN binutils-2.11.90.0.4/binutils/readelf.1 binutils-2.11.90.0.5/binutils/readelf.1 --- binutils-2.11.90.0.4/binutils/readelf.1 Sun Apr 1 19:29:33 2001 +++ binutils-2.11.90.0.5/binutils/readelf.1 Sat Apr 14 17:50:39 2001 @@ -1,5 +1,5 @@ .\" Automatically generated by Pod::Man version 1.02 -.\" Sun Apr 1 19:29:33 2001 +.\" Sat Apr 14 17:50:34 2001 .\" .\" Standard preamble: .\" ====================================================================== @@ -137,7 +137,7 @@ .\" ====================================================================== .\" .IX Title "READELF.1 1" -.TH READELF.1 1 "binutils-2.11.90.0.4" "2001-04-01" "GNU" +.TH READELF.1 1 "binutils-2.11.90.0.5" "2001-04-14" "GNU" .UC .SH "NAME" readelf \- Displays information about \s-1ELF\s0 files. diff -uprN binutils-2.11.90.0.4/binutils/readelf.c binutils-2.11.90.0.5/binutils/readelf.c --- binutils-2.11.90.0.4/binutils/readelf.c Fri Mar 30 22:50:05 2001 +++ binutils-2.11.90.0.5/binutils/readelf.c Fri Apr 6 15:50:28 2001 @@ -5494,7 +5494,7 @@ display_debug_lines (section, start, fil printf (_(" Length: %ld\n"), info.li_length); printf (_(" DWARF Version: %d\n"), info.li_version); - printf (_(" Prolgue Length: %d\n"), info.li_prologue_length); + printf (_(" Prologue Length: %d\n"), info.li_prologue_length); printf (_(" Minimum Instruction Length: %d\n"), info.li_min_insn_length); printf (_(" Initial value of 'is_stmt': %d\n"), info.li_default_is_stmt); printf (_(" Line Base: %d\n"), info.li_line_base); diff -uprN binutils-2.11.90.0.4/binutils/size.1 binutils-2.11.90.0.5/binutils/size.1 --- binutils-2.11.90.0.4/binutils/size.1 Sun Apr 1 19:29:34 2001 +++ binutils-2.11.90.0.5/binutils/size.1 Sat Apr 14 17:50:39 2001 @@ -1,5 +1,5 @@ .\" Automatically generated by Pod::Man version 1.02 -.\" Sun Apr 1 19:29:33 2001 +.\" Sat Apr 14 17:50:34 2001 .\" .\" Standard preamble: .\" ====================================================================== @@ -137,7 +137,7 @@ .\" ====================================================================== .\" .IX Title "SIZE.1 1" -.TH SIZE.1 1 "binutils-2.11.90.0.4" "2001-04-01" "GNU" +.TH SIZE.1 1 "binutils-2.11.90.0.5" "2001-04-14" "GNU" .UC .SH "NAME" size \- list section sizes and total size. diff -uprN binutils-2.11.90.0.4/binutils/strings.1 binutils-2.11.90.0.5/binutils/strings.1 --- binutils-2.11.90.0.4/binutils/strings.1 Sun Apr 1 19:29:34 2001 +++ binutils-2.11.90.0.5/binutils/strings.1 Sat Apr 14 17:50:39 2001 @@ -1,5 +1,5 @@ .\" Automatically generated by Pod::Man version 1.02 -.\" Sun Apr 1 19:29:33 2001 +.\" Sat Apr 14 17:50:34 2001 .\" .\" Standard preamble: .\" ====================================================================== @@ -137,7 +137,7 @@ .\" ====================================================================== .\" .IX Title "STRINGS.1 1" -.TH STRINGS.1 1 "binutils-2.11.90.0.4" "2001-04-01" "GNU" +.TH STRINGS.1 1 "binutils-2.11.90.0.5" "2001-04-14" "GNU" .UC .SH "NAME" strings \- print the strings of printable characters in files. diff -uprN binutils-2.11.90.0.4/binutils/strip.1 binutils-2.11.90.0.5/binutils/strip.1 --- binutils-2.11.90.0.4/binutils/strip.1 Sun Apr 1 19:29:35 2001 +++ binutils-2.11.90.0.5/binutils/strip.1 Sat Apr 14 17:50:41 2001 @@ -1,5 +1,5 @@ .\" Automatically generated by Pod::Man version 1.02 -.\" Sun Apr 1 19:29:34 2001 +.\" Sat Apr 14 17:50:35 2001 .\" .\" Standard preamble: .\" ====================================================================== @@ -137,7 +137,7 @@ .\" ====================================================================== .\" .IX Title "STRIP.1 1" -.TH STRIP.1 1 "binutils-2.11.90.0.4" "2001-04-01" "GNU" +.TH STRIP.1 1 "binutils-2.11.90.0.5" "2001-04-14" "GNU" .UC .SH "NAME" strip \- Discard symbols from object files. diff -uprN binutils-2.11.90.0.4/binutils/windres.1 binutils-2.11.90.0.5/binutils/windres.1 --- binutils-2.11.90.0.4/binutils/windres.1 Sun Apr 1 19:29:35 2001 +++ binutils-2.11.90.0.5/binutils/windres.1 Sat Apr 14 17:50:41 2001 @@ -1,5 +1,5 @@ .\" Automatically generated by Pod::Man version 1.02 -.\" Sun Apr 1 19:29:35 2001 +.\" Sat Apr 14 17:50:35 2001 .\" .\" Standard preamble: .\" ====================================================================== @@ -137,7 +137,7 @@ .\" ====================================================================== .\" .IX Title "WINDRES.1 1" -.TH WINDRES.1 1 "binutils-2.11.90.0.4" "2001-04-01" "GNU" +.TH WINDRES.1 1 "binutils-2.11.90.0.5" "2001-04-14" "GNU" .UC .SH "NAME" windres \- manipulate Windows resources. diff -uprN binutils-2.11.90.0.4/binutils.spec binutils-2.11.90.0.5/binutils.spec --- binutils-2.11.90.0.4/binutils.spec Sun Apr 1 19:15:46 2001 +++ binutils-2.11.90.0.5/binutils.spec Sat Apr 14 17:31:49 2001 @@ -5,12 +5,12 @@ Summary: A GNU collection of binary util Name: binutils %ifarch i386 i486 i586 i686 %if %{COFF} -Version: 2.11.90.0.4.coff +Version: 2.11.90.0.5.coff %else -Version: 2.11.90.0.4 +Version: 2.11.90.0.5 %endif %else -Version: 2.11.90.0.4 +Version: 2.11.90.0.5 %endif Release: 1 Copyright: GPL diff -uprN binutils-2.11.90.0.4/gas/ChangeLog binutils-2.11.90.0.5/gas/ChangeLog --- binutils-2.11.90.0.4/gas/ChangeLog Sat Mar 31 19:48:09 2001 +++ binutils-2.11.90.0.5/gas/ChangeLog Sat Apr 14 12:41:44 2001 @@ -1,3 +1,86 @@ +2001-04-14 Alexandre Oliva + + * struc-symbol.h (struct local_symbol): New TC_LOCAL_SYMFIELD_TYPE. + * symbols.c (local_symbol_convert): Call TC_LOCAL_SYMFIELD_CONVERT. + + * config/tc-mn10300.c (md_assemble): Simplify offset adjustment of + pc-relative relocations not placed at the end of the instruction. + +2001-04-13 Jim Wilson + + * tc-ia64.c (is_conditional_branch): Return true for br, brl, and br. + excluding br.i. + +2001-04-13 Jakub Jelinek + + * config/obj-elf.c (obj_elf_change_section): Add entsize argument, + handle SHF_MERGE and SHF_STRINGS. + (obj_elf_parse_section_letters): Set SHF_MERGE and SHF_STRINGS. + (obj_elf_section): Allow additional argument specifying entity size. + * write.c (adjust_reloc_syms): Keep relocations against local symbols + in SEC_MERGE sections. + +2001-04-12 Jason Merrill + + * dwarf2dbg.c (process_entries): Don't optimize redundant line notes. + +2001-04-12 Alexandre Oliva + + * expr.c (operand): Pass &c to md_parse_name(). + * config/tc-ia64.h, config/tc-ppc.h, config/tc-tic54x.h: Adjust. + +2001-04-07 Steven J. Hill + + * config/tc-mips.c: Support ELF64 for traditional MIPS targets. + + * Makefile.am: (TARG_ENV_HFILES): Add tc-mips.h. + * Makefile.in: Regenerated. + + * configure.in: Use traditional MIPS targets for Linux/MIPS. + * configure: Regenerated. + +2001-04-06 Alexandre Oliva + + * config/tc-mn10300.c (xr_registers): Added `pc'. + +2001-04-05 Alan Modra + + * configure.in: Add h8500-*-coff and h8500-*-rtems targets. + * configure: Regenerate. + + * config/tc-h8500.c (md_estimate_size_before_relax): Add missing + cases, and always return size based on current fr_subtype. + (md_begin): Move initialization of md_relax_table.. + (md_relax_table): ..to static initializer. Set rlx_length for + UNDEF_WORD_DISP cases. + * config/tc-w65.c (md_estimate_size_before_relax): Likewise. + (md_begin): Likewise. + (md_relax_table): Likewise. + * config/tc-mcore.c (md_estimate_size_before_relax): Likewise. + (md_relax_table): Set rlx_length for UNDEF_WORD_DISP cases. + Set rlx_backward and rlx_forward to zero for unused states. + * config/tc-sh.c (md_estimate_size_before_relax): Likewise. + (md_relax_table): Set rlx_length for UNDEF_WORD_DISP cases. + (UNCOND12, UNCOND32): Remove duplicate defines. + +2001-04-04 Hans-Peter Nilsson + + * config/tc-cris.c (md_estimate_size_before_relax) : Don't emit + 32-bit branch, just set fragP->fr_subtype. Set fragP->fr_var. + : Always set fragP->fr_var using md_cris_relax_table. + Add cases to cover all relax states. + (cris_insn_first_word_frag): New. + (md_assemble): Call cris_insn_first_word_frag to get the first + frag in an insn, not frag_more. Don't call dwarf2_emit_insn at + end. Drop variable insn_size. + (gen_bdap): Call cris_insn_first_word_frag, not frag_more. + (cris_sym_leading_underscore): Wrap first as_bad parameter in _(). + (cris_sym_no_leading_underscore, s_cris_file, s_cris_loc): Ditto. + + * write.c (write_object_file): Reset broken word state before + calling relax_seg. + 2001-03-31 Alan Modra * listing.c (listing_listing): Enable listing on EDICT_NOLIST_NEXT diff -uprN binutils-2.11.90.0.4/gas/Makefile.am binutils-2.11.90.0.5/gas/Makefile.am --- binutils-2.11.90.0.4/gas/Makefile.am Tue Feb 27 10:48:47 2001 +++ binutils-2.11.90.0.5/gas/Makefile.am Sat Apr 7 23:03:02 2001 @@ -361,7 +361,8 @@ TARG_ENV_HFILES = \ config/te-sparcaout.h \ config/te-sun3.h \ config/te-svr4.h \ - config/te-sysv32.h + config/te-sysv32.h \ + config/te-tmips.h # Multi files in config diff -uprN binutils-2.11.90.0.4/gas/Makefile.in binutils-2.11.90.0.5/gas/Makefile.in --- binutils-2.11.90.0.4/gas/Makefile.in Tue Feb 27 10:48:47 2001 +++ binutils-2.11.90.0.5/gas/Makefile.in Sat Apr 7 23:03:03 2001 @@ -482,7 +482,8 @@ TARG_ENV_HFILES = \ config/te-sparcaout.h \ config/te-sun3.h \ config/te-svr4.h \ - config/te-sysv32.h + config/te-sysv32.h \ + config/te-tmips.h # Multi files in config diff -uprN binutils-2.11.90.0.4/gas/config/obj-elf.c binutils-2.11.90.0.5/gas/config/obj-elf.c --- binutils-2.11.90.0.4/gas/config/obj-elf.c Fri Mar 9 11:38:15 2001 +++ binutils-2.11.90.0.5/gas/config/obj-elf.c Fri Apr 13 11:47:28 2001 @@ -619,9 +619,9 @@ static struct special_section const spec }; void -obj_elf_change_section (name, type, attr, push) +obj_elf_change_section (name, type, attr, entsize, push) char *name; - int type, attr, push; + int type, attr, entsize, push; { asection *old_sec; segT sec; @@ -689,7 +689,9 @@ obj_elf_change_section (name, type, attr | ((attr & SHF_WRITE) ? 0 : SEC_READONLY) | ((attr & SHF_ALLOC) ? SEC_ALLOC : 0) | (((attr & SHF_ALLOC) && type != SHT_NOBITS) ? SEC_LOAD : 0) - | ((attr & SHF_EXECINSTR) ? SEC_CODE : 0)); + | ((attr & SHF_EXECINSTR) ? SEC_CODE : 0) + | ((attr & SHF_MERGE) ? SEC_MERGE : 0) + | ((attr & SHF_STRINGS) ? SEC_STRINGS : 0)); #ifdef md_elf_section_flags flags = md_elf_section_flags (flags, attr, type); #endif @@ -703,6 +705,8 @@ obj_elf_change_section (name, type, attr seg_info (sec)->bss = 1; bfd_set_section_flags (stdoutput, sec, flags); + if (flags & SEC_MERGE) + sec->entsize = entsize; /* Add a symbol for this section to the symbol table. */ secsym = symbol_find (name); @@ -718,8 +722,10 @@ obj_elf_change_section (name, type, attr saw the first time. */ if ((old_sec->flags ^ flags) & (SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_CODE - | SEC_EXCLUDE | SEC_SORT_ENTRIES)) + | SEC_EXCLUDE | SEC_SORT_ENTRIES | SEC_MERGE | SEC_STRINGS)) as_warn (_("Ignoring changed section attributes for %s"), name); + else if ((flags & SEC_MERGE) && old_sec->entsize != entsize) + as_warn (_("Ignoring changed section entity size for %s"), name); } #ifdef md_elf_section_change_hook @@ -747,9 +753,15 @@ obj_elf_parse_section_letters (str, len) case 'x': attr |= SHF_EXECINSTR; break; + case 'm': + attr |= SHF_MERGE; + break; + case 's': + attr |= SHF_STRINGS; + break; default: { - char *bad_msg = _("Unrecognized .section attribute: want a,w,x"); + char *bad_msg = _("Unrecognized .section attribute: want a,m,s,w,x"); #ifdef md_elf_section_letter int md_attr = md_elf_section_letter (*str, &bad_msg); if (md_attr >= 0) @@ -821,6 +833,7 @@ obj_elf_section (push) { char *name, *beg, *end; int type, attr, dummy; + int entsize; #ifndef TC_I370 if (flag_mri) @@ -876,6 +889,7 @@ obj_elf_section (push) type = SHT_NULL; attr = 0; + entsize = 0; if (*input_line_pointer == ',') { @@ -918,6 +932,20 @@ obj_elf_section (push) type = obj_elf_section_type (beg, input_line_pointer - beg); } } + + SKIP_WHITESPACE (); + if ((attr & SHF_MERGE) && *input_line_pointer == ',') + { + ++input_line_pointer; + SKIP_WHITESPACE (); + entsize = get_absolute_expression (); + if (entsize < 0) + { + as_warn (_("Bad .section directive - invalid merge entity size")); + attr &= ~SHF_MERGE; + entsize = 0; + } + } } else { @@ -947,7 +975,13 @@ obj_elf_section (push) demand_empty_rest_of_line (); - obj_elf_change_section (name, type, attr, push); + if ((attr & SHF_MERGE) && entsize == 0) + { + as_warn (_("Entity size for SHF_MERGE not specified.\nSpecify entity size as 4th argument")); + attr &= SHF_MERGE; + } + + obj_elf_change_section (name, type, attr, entsize, push); } /* Change to the .data section. */ diff -uprN binutils-2.11.90.0.4/gas/config/tc-cris.c binutils-2.11.90.0.5/gas/config/tc-cris.c --- binutils-2.11.90.0.4/gas/config/tc-cris.c Thu Mar 29 17:36:03 2001 +++ binutils-2.11.90.0.5/gas/config/tc-cris.c Fri Apr 6 15:32:56 2001 @@ -145,6 +145,7 @@ static void cris_force_reg_prefix PARAMS static void cris_relax_reg_prefix PARAMS ((void)); static void cris_sym_leading_underscore PARAMS ((void)); static void cris_sym_no_leading_underscore PARAMS ((void)); +static char *cris_insn_first_word_frag PARAMS ((void)); /* Handle to the opcode hash table. */ static struct hash_control *op_hash = NULL; @@ -357,33 +358,14 @@ md_estimate_size_before_relax (fragP, se { case ENCODE_RELAX (STATE_CONDITIONAL_BRANCH, STATE_UNDF): if (S_GET_SEGMENT (fragP->fr_symbol) == segment_type) - { - /* The symbol lies in the same segment - a relaxable case. */ - fragP->fr_subtype - = ENCODE_RELAX (STATE_CONDITIONAL_BRANCH, STATE_BYTE); - } + /* The symbol lies in the same segment - a relaxable case. */ + fragP->fr_subtype + = ENCODE_RELAX (STATE_CONDITIONAL_BRANCH, STATE_BYTE); else - { - /* Unknown or not the same segment, so not relaxable. */ - char *writep; - - /* A small branch-always (2 bytes) to the "real" branch - instruction, plus a delay-slot nop (2 bytes), plus a - jump (2 plus 4 bytes). See gen_cond_branch_32. */ - fragP->fr_fix += 2 + 2 + 2 + 4; - writep = fragP->fr_literal + old_fr_fix; - gen_cond_branch_32 (fragP->fr_opcode, writep, fragP, - fragP->fr_symbol, (symbolS *) NULL, - fragP->fr_offset); - frag_wane (fragP); - } - break; - - case ENCODE_RELAX (STATE_CONDITIONAL_BRANCH, STATE_BYTE): - case ENCODE_RELAX (STATE_CONDITIONAL_BRANCH, STATE_WORD): - /* We *might* give a better initial guess if we peek at offsets - now, but the caller will relax correctly and without this, so - don't bother. */ + /* Unknown or not the same segment, so not relaxable. */ + fragP->fr_subtype + = ENCODE_RELAX (STATE_CONDITIONAL_BRANCH, STATE_DWORD); + fragP->fr_var = md_cris_relax_table[fragP->fr_subtype].rlx_length; break; case ENCODE_RELAX (STATE_BASE_PLUS_DISP_PREFIX, STATE_UNDF): @@ -402,7 +384,7 @@ md_estimate_size_before_relax (fragP, se /* Go for dword if not absolute or same segment. */ fragP->fr_subtype = ENCODE_RELAX (STATE_BASE_PLUS_DISP_PREFIX, STATE_DWORD); - fragP->fr_var += 4; + fragP->fr_var = md_cris_relax_table[fragP->fr_subtype].rlx_length; } else { @@ -445,9 +427,15 @@ md_estimate_size_before_relax (fragP, se } break; + case ENCODE_RELAX (STATE_CONDITIONAL_BRANCH, STATE_BYTE): + case ENCODE_RELAX (STATE_CONDITIONAL_BRANCH, STATE_WORD): + case ENCODE_RELAX (STATE_CONDITIONAL_BRANCH, STATE_DWORD): + case ENCODE_RELAX (STATE_BASE_PLUS_DISP_PREFIX, STATE_BYTE): + case ENCODE_RELAX (STATE_BASE_PLUS_DISP_PREFIX, STATE_WORD): case ENCODE_RELAX (STATE_BASE_PLUS_DISP_PREFIX, STATE_DWORD): /* When relaxing a section for the second time, we don't need to - do anything. */ + do anything except making sure that fr_var is set right. */ + fragP->fr_var = md_cris_relax_table[fragP->fr_subtype].rlx_length; break; default: @@ -662,6 +650,26 @@ md_create_long_jump (storep, from_addr, } } +/* Allocate space for the first piece of an insn, and mark it as the + start of the insn for debug-format use. */ + +static char * +cris_insn_first_word_frag () +{ + char *insnp = frag_more (2); + + /* We need to mark the start of the insn by passing dwarf2_emit_insn + the offset from the current fragment position. This must be done + after the first fragment is created but before any other fragments + (fixed or varying) are created. Note that the offset only + corresponds to the "size" of the insn for a fixed-size, + non-expanded insn. */ + if (OUTPUT_FLAVOR == bfd_target_elf_flavour) + dwarf2_emit_insn (2); + + return insnp; +} + /* Port-specific assembler initialization. */ void @@ -706,7 +714,6 @@ md_assemble (str) struct cris_prefix prefix; char *opcodep; char *p; - int insn_size = 0; know (str); @@ -734,8 +741,7 @@ md_assemble (str) case PREFIX_BDAP: case PREFIX_BIAP: case PREFIX_DIP: - insn_size += 2; - opcodep = frag_more (2); + opcodep = cris_insn_first_word_frag (); /* Output the prefix opcode. */ md_number_to_chars (opcodep, (long) prefix.opcode, 2); @@ -749,7 +755,6 @@ md_assemble (str) = (prefix.kind == PREFIX_DIP ? 4 : cris_get_pic_reloc_size (prefix.reloc)); - insn_size += relocsize; p = frag_more (relocsize); fix_new_exp (frag_now, (p - frag_now->fr_literal), relocsize, &prefix.expr, 0, prefix.reloc); @@ -757,8 +762,7 @@ md_assemble (str) break; case PREFIX_PUSH: - insn_size += 2; - opcodep = frag_more (2); + opcodep = cris_insn_first_word_frag (); /* Output the prefix opcode. Being a "push", we add the negative size of the register to "sp". */ @@ -784,8 +788,10 @@ md_assemble (str) return; /* Done with the prefix. Continue with the main instruction. */ - insn_size += 2; - opcodep = frag_more (2); + if (prefix.kind == PREFIX_NONE) + opcodep = cris_insn_first_word_frag (); + else + opcodep = frag_more (2); /* Output the instruction opcode. */ md_number_to_chars (opcodep, (long) (output_instruction.opcode), 2); @@ -833,7 +839,6 @@ md_assemble (str) branch. */ char *cond_jump = frag_more (10); - insn_size += 10; gen_cond_branch_32 (opcodep, cond_jump, frag_now, output_instruction.expr.X_add_symbol, (symbolS *) NULL, @@ -874,7 +879,6 @@ md_assemble (str) BAD_CASE (output_instruction.imm_oprnd_size); } - insn_size += output_instruction.imm_oprnd_size; p = frag_more (output_instruction.imm_oprnd_size); fix_new_exp (frag_now, (p - frag_now->fr_literal), output_instruction.imm_oprnd_size, @@ -894,9 +898,6 @@ md_assemble (str) output_instruction.reloc); } } - - if (OUTPUT_FLAVOR == bfd_target_elf_flavour) - dwarf2_emit_insn (insn_size); } /* Low level text-to-bits assembly. */ @@ -2350,7 +2351,7 @@ gen_bdap (base_regno, exprP) /* Put out the prefix opcode; assume quick immediate mode at first. */ opcode = BDAP_QUICK_OPCODE | (base_regno << 12); - opcodep = frag_more (2); + opcodep = cris_insn_first_word_frag (); md_number_to_chars (opcodep, opcode, 2); if (exprP->X_op == O_constant) @@ -3113,7 +3114,7 @@ static void cris_sym_leading_underscore the bfd is already created. */ if (symbols_have_leading_underscore == false) - as_bad (".syntax %s requires command-line option `--underscore'", + as_bad (_(".syntax %s requires command-line option `--underscore'"), SYNTAX_USER_SYM_LEADING_UNDERSCORE); } @@ -3122,7 +3123,7 @@ static void cris_sym_leading_underscore static void cris_sym_no_leading_underscore () { if (symbols_have_leading_underscore == true) - as_bad (".syntax %s requires command-line option `--no-underscore'", + as_bad (_(".syntax %s requires command-line option `--no-underscore'"), SYNTAX_USER_SYM_NO_LEADING_UNDERSCORE); } @@ -3171,7 +3172,7 @@ s_cris_file (dummy) int dummy; { if (OUTPUT_FLAVOR != bfd_target_elf_flavour) - as_bad ("Pseudodirective .file is only valid when generating ELF"); + as_bad (_("Pseudodirective .file is only valid when generating ELF")); else dwarf2_directive_file (dummy); } @@ -3184,7 +3185,7 @@ s_cris_loc (dummy) int dummy; { if (OUTPUT_FLAVOR != bfd_target_elf_flavour) - as_bad ("Pseudodirective .loc is only valid when generating ELF"); + as_bad (_("Pseudodirective .loc is only valid when generating ELF")); else dwarf2_directive_loc (dummy); } diff -uprN binutils-2.11.90.0.4/gas/config/tc-h8500.c binutils-2.11.90.0.5/gas/config/tc-h8500.c --- binutils-2.11.90.0.4/gas/config/tc-h8500.c Thu Mar 29 17:36:04 2001 +++ binutils-2.11.90.0.5/gas/config/tc-h8500.c Fri Apr 6 15:32:57 2001 @@ -86,7 +86,31 @@ const char FLT_CHARS[] = "rRsSfFdDxXpP"; #define WORD_F 32767 #define WORD_B 32768 -relax_typeS md_relax_table[C (END, 0)]; +relax_typeS md_relax_table[C (END, 0)] = { + { 0, 0, 0, 0 }, + { 0, 0, 0, 0 }, + { 0, 0, 0, 0 }, + { 0, 0, 0, 0 }, + + /* BRANCH */ + { 0, 0, 0, 0 }, + { BYTE_F, BYTE_B, 2, C (BRANCH, WORD_DISP) }, + { WORD_F, WORD_B, 3, 0 }, + { 0, 0, 3, 0 }, + + /* SCB_F */ + { 0, 0, 0, 0 }, + { BYTE_F, BYTE_B, 3, C (SCB_F, WORD_DISP) }, + { WORD_F, WORD_B, 8, 0 }, + { 0, 0, 8, 0 }, + + /* SCB_TST */ + { 0, 0, 0, 0 }, + { BYTE_F, BYTE_B, 3, C (SCB_TST, WORD_DISP) }, + { WORD_F, WORD_B, 10, 0 }, + { 0, 0, 10, 0 } + +}; static struct hash_control *opcode_hash_control; /* Opcode mnemonics */ @@ -101,7 +125,6 @@ md_begin () h8500_opcode_info *opcode; char prev_buffer[100]; int idx = 0; - register relax_typeS *table; opcode_hash_control = hash_new (); prev_buffer[0] = 0; @@ -115,40 +138,6 @@ md_begin () idx++; } } - - /* Initialize the relax table. We use a local variable to avoid - warnings about modifying a supposedly const data structure. */ - table = (relax_typeS *) md_relax_table; - table[C (BRANCH, BYTE_DISP)].rlx_forward = BYTE_F; - table[C (BRANCH, BYTE_DISP)].rlx_backward = BYTE_B; - table[C (BRANCH, BYTE_DISP)].rlx_length = 2; - table[C (BRANCH, BYTE_DISP)].rlx_more = C (BRANCH, WORD_DISP); - - table[C (BRANCH, WORD_DISP)].rlx_forward = WORD_F; - table[C (BRANCH, WORD_DISP)].rlx_backward = WORD_B; - table[C (BRANCH, WORD_DISP)].rlx_length = 3; - table[C (BRANCH, WORD_DISP)].rlx_more = 0; - - table[C (SCB_F, BYTE_DISP)].rlx_forward = BYTE_F; - table[C (SCB_F, BYTE_DISP)].rlx_backward = BYTE_B; - table[C (SCB_F, BYTE_DISP)].rlx_length = 3; - table[C (SCB_F, BYTE_DISP)].rlx_more = C (SCB_F, WORD_DISP); - - table[C (SCB_F, WORD_DISP)].rlx_forward = WORD_F; - table[C (SCB_F, WORD_DISP)].rlx_backward = WORD_B; - table[C (SCB_F, WORD_DISP)].rlx_length = 8; - table[C (SCB_F, WORD_DISP)].rlx_more = 0; - - table[C (SCB_TST, BYTE_DISP)].rlx_forward = BYTE_F; - table[C (SCB_TST, BYTE_DISP)].rlx_backward = BYTE_B; - table[C (SCB_TST, BYTE_DISP)].rlx_length = 3; - table[C (SCB_TST, BYTE_DISP)].rlx_more = C (SCB_TST, WORD_DISP); - - table[C (SCB_TST, WORD_DISP)].rlx_forward = WORD_F; - table[C (SCB_TST, WORD_DISP)].rlx_backward = WORD_B; - table[C (SCB_TST, WORD_DISP)].rlx_length = 10; - table[C (SCB_TST, WORD_DISP)].rlx_more = 0; - } static int rn; /* register number used by RN */ @@ -1442,7 +1431,7 @@ md_estimate_size_before_relax (fragP, se register fragS *fragP; register segT segment_type; { - int what = GET_WHAT (fragP->fr_subtype); + int what; switch (fragP->fr_subtype) { @@ -1452,33 +1441,37 @@ md_estimate_size_before_relax (fragP, se case C (BRANCH, UNDEF_BYTE_DISP): case C (SCB_F, UNDEF_BYTE_DISP): case C (SCB_TST, UNDEF_BYTE_DISP): + what = GET_WHAT (fragP->fr_subtype); /* used to be a branch to somewhere which was unknown */ if (S_GET_SEGMENT (fragP->fr_symbol) == segment_type) { /* Got a symbol and it's defined in this segment, become byte sized - maybe it will fix up. */ fragP->fr_subtype = C (what, BYTE_DISP); - fragP->fr_var = md_relax_table[C (what, BYTE_DISP)].rlx_length; } else { /* Its got a segment, but its not ours, so it will always be long. */ fragP->fr_subtype = C (what, UNDEF_WORD_DISP); - fragP->fr_var = md_relax_table[C (what, WORD_DISP)].rlx_length; } break; case C (BRANCH, BYTE_DISP): + case C (BRANCH, WORD_DISP): case C (BRANCH, UNDEF_WORD_DISP): case C (SCB_F, BYTE_DISP): + case C (SCB_F, WORD_DISP): case C (SCB_F, UNDEF_WORD_DISP): case C (SCB_TST, BYTE_DISP): + case C (SCB_TST, WORD_DISP): case C (SCB_TST, UNDEF_WORD_DISP): /* When relaxing a section for the second time, we don't need to - do anything. */ + do anything besides return the current size. */ break; } + + fragP->fr_var = md_relax_table[fragP->fr_subtype].rlx_length; return fragP->fr_var; } diff -uprN binutils-2.11.90.0.4/gas/config/tc-ia64.c binutils-2.11.90.0.5/gas/config/tc-ia64.c --- binutils-2.11.90.0.4/gas/config/tc-ia64.c Sat Mar 17 12:59:28 2001 +++ binutils-2.11.90.0.5/gas/config/tc-ia64.c Sat Apr 14 12:52:24 2001 @@ -6889,19 +6889,19 @@ ia64_canonicalize_symbol_name (name) return name; } +/* Return true if idesc is a conditional branch instruction. */ + static int is_conditional_branch (idesc) struct ia64_opcode *idesc; { - return (strncmp (idesc->name, "br", 2) == 0 - && (strcmp (idesc->name, "br") == 0 - || strncmp (idesc->name, "br.cond", 7) == 0 - || strncmp (idesc->name, "br.call", 7) == 0 - || strncmp (idesc->name, "br.ret", 6) == 0 - || strcmp (idesc->name, "brl") == 0 - || strncmp (idesc->name, "brl.cond", 7) == 0 - || strncmp (idesc->name, "brl.call", 7) == 0 - || strncmp (idesc->name, "brl.ret", 6) == 0)); + /* br is a conditional branch. Everything that starts with br. except + br.ia is a conditional branch. Everything that starts with brl is a + conditional branch. */ + return (idesc->name[0] == 'b' && idesc->name[1] == 'r' + && (idesc->name[2] == '\0' + || (idesc->name[2] == '.' && idesc->name[3] != 'i') + || idesc->name[2] == 'l')); } /* Return whether the given opcode is a taken branch. If there's any doubt, diff -uprN binutils-2.11.90.0.4/gas/config/tc-ia64.h binutils-2.11.90.0.5/gas/config/tc-ia64.h --- binutils-2.11.90.0.4/gas/config/tc-ia64.h Fri Mar 9 11:38:16 2001 +++ binutils-2.11.90.0.5/gas/config/tc-ia64.h Fri Apr 13 11:47:30 2001 @@ -92,7 +92,7 @@ extern void ia64_handle_align PARAMS ((f #define tc_unrecognized_line(ch) ia64_unrecognized_line (ch) #define tc_frob_label(s) ia64_frob_label (s) #define md_flush_pending_output() ia64_flush_pending_output () -#define md_parse_name(s,e) ia64_parse_name (s, e) +#define md_parse_name(s,e,c) ia64_parse_name (s, e) #define tc_canonicalize_symbol_name(s) ia64_canonicalize_symbol_name (s) #define md_optimize_expr(l,o,r) ia64_optimize_expr (l, o, r) #define md_cons_align(n) ia64_cons_align (n) diff -uprN binutils-2.11.90.0.4/gas/config/tc-mcore.c binutils-2.11.90.0.5/gas/config/tc-mcore.c --- binutils-2.11.90.0.4/gas/config/tc-mcore.c Thu Mar 29 17:36:10 2001 +++ binutils-2.11.90.0.5/gas/config/tc-mcore.c Fri Apr 6 15:33:02 2001 @@ -111,20 +111,24 @@ cpu_type; cpu_type cpu = M340; /* Initialize the relax table. */ -const relax_typeS md_relax_table[] = -{ -{ 1, 1, 0, 0 }, /* 0: unused */ -{ 1, 1, 0, 0 }, /* 1: unused */ -{ 1, 1, 0, 0 }, /* 2: unused */ -{ 1, 1, 0, 0 }, /* 3: unused */ -{ 1, 1, 0, 0 }, /* 4: unused */ -{ 2048, -2046, C12_LEN, C(COND_JUMP, DISP32) }, /* 5: C(COND_JUMP, DISP12) */ -{ 0, 0, C32_LEN, 0 }, /* 6: C(COND_JUMP, DISP32) */ -{ 1, 1, 0, 0 }, /* 7: unused */ -{ 1, 1, 0, 0 }, /* 8: unused */ -{ 2048, -2046, U12_LEN, C(UNCD_JUMP, DISP32) }, /* 9: C(UNCD_JUMP, DISP12) */ -{ 0, 0, U32_LEN, 0 }, /*10: C(UNCD_JUMP, DISP32) */ -{ 1, 1, 0, 0 }, /*11: unused */ +const relax_typeS md_relax_table[] = { + { 0, 0, 0, 0 }, + { 0, 0, 0, 0 }, + { 0, 0, 0, 0 }, + { 0, 0, 0, 0 }, + + /* COND_JUMP */ + { 0, 0, 0, 0 }, /* UNDEF_DISP */ + { 2048, -2046, C12_LEN, C(COND_JUMP, DISP32) }, /* DISP12 */ + { 0, 0, C32_LEN, 0 }, /* DISP32 */ + { 0, 0, C32_LEN, 0 }, /* UNDEF_WORD_DISP */ + + /* UNCD_JUMP */ + { 0, 0, 0, 0 }, /* UNDEF_DISP */ + { 2048, -2046, U12_LEN, C(UNCD_JUMP, DISP32) }, /* DISP12 */ + { 0, 0, U32_LEN, 0 }, /* DISP32 */ + { 0, 0, U32_LEN, 0 } /* UNDEF_WORD_DISP */ + }; /* Literal pool data structures. */ @@ -2251,17 +2255,14 @@ md_estimate_size_before_relax (fragP, se if (!fragP->fr_symbol) { fragP->fr_subtype = C (UNCD_JUMP, DISP12); - fragP->fr_var = md_relax_table[C (UNCD_JUMP, DISP12)].rlx_length; } else if (S_GET_SEGMENT (fragP->fr_symbol) == segment_type) { fragP->fr_subtype = C (UNCD_JUMP, DISP12); - fragP->fr_var = md_relax_table[C (UNCD_JUMP, DISP12)].rlx_length; } else { fragP->fr_subtype = C (UNCD_JUMP, UNDEF_WORD_DISP); - fragP->fr_var = md_relax_table[C (UNCD_JUMP, DISP32)].rlx_length; } break; @@ -2273,31 +2274,31 @@ md_estimate_size_before_relax (fragP, se /* Got a symbol and it's defined in this segment, become byte sized - maybe it will fix up */ fragP->fr_subtype = C (COND_JUMP, DISP12); - fragP->fr_var = md_relax_table[C (COND_JUMP, DISP12)].rlx_length; } else if (fragP->fr_symbol) { /* Its got a segment, but its not ours, so it will always be long. */ fragP->fr_subtype = C (COND_JUMP, UNDEF_WORD_DISP); - fragP->fr_var = md_relax_table[C (COND_JUMP, DISP32)].rlx_length; } else { /* We know the abs value. */ fragP->fr_subtype = C (COND_JUMP, DISP12); - fragP->fr_var = md_relax_table[C (COND_JUMP, DISP12)].rlx_length; } break; case C (UNCD_JUMP, DISP12): + case C (UNCD_JUMP, DISP32): case C (UNCD_JUMP, UNDEF_WORD_DISP): case C (COND_JUMP, DISP12): + case C (COND_JUMP, DISP32): case C (COND_JUMP, UNDEF_WORD_DISP): /* When relaxing a section for the second time, we don't need to - do anything. */ + do anything besides return the current size. */ break; } + fragP->fr_var = md_relax_table[fragP->fr_subtype].rlx_length; return fragP->fr_var; } diff -uprN binutils-2.11.90.0.4/gas/config/tc-mips.c binutils-2.11.90.0.5/gas/config/tc-mips.c --- binutils-2.11.90.0.4/gas/config/tc-mips.c Thu Mar 29 23:37:35 2001 +++ binutils-2.11.90.0.5/gas/config/tc-mips.c Tue Apr 10 14:48:30 2001 @@ -126,7 +126,8 @@ mips_target_format () #ifdef TE_TMIPS /* This is traditional mips */ return (target_big_endian - ? "elf32-tradbigmips" : "elf32-tradlittlemips"); + ? (mips_64 ? "elf64-tradbigmips" : "elf32-tradbigmips") + : (mips_64 ? "elf64-tradlittlemips" : "elf32-tradlittlemips")); #else return (target_big_endian ? (mips_64 ? "elf64-bigmips" : "elf32-bigmips") @@ -10066,7 +10067,7 @@ mips_enable_auto_align () static void s_ident (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { mips_emit_delays (true); obj_elf_ident(0); diff -uprN binutils-2.11.90.0.4/gas/config/tc-mn10300.c binutils-2.11.90.0.5/gas/config/tc-mn10300.c --- binutils-2.11.90.0.4/gas/config/tc-mn10300.c Thu Mar 29 17:36:13 2001 +++ binutils-2.11.90.0.5/gas/config/tc-mn10300.c Sat Apr 14 12:42:32 2001 @@ -212,6 +212,7 @@ static const struct reg_name xr_register { "mcrl", 3 }, { "mcvf", 4 }, { "mdrq", 1 }, + { "pc", 0 }, { "sp", 0 }, { "xr0", 0 }, { "xr1", 1 }, @@ -936,7 +937,7 @@ md_assemble (str) struct mn10300_opcode *next_opcode; const unsigned char *opindex_ptr; int next_opindex, relaxable; - unsigned long insn, extension, size = 0, real_size; + unsigned long insn, extension, size = 0; char *f; int i; int match; @@ -1512,8 +1513,6 @@ keep_going: if (opcode->format == FMT_D4) size = 6; - real_size = size; - if (relaxable && fc > 0) { int type; @@ -1728,25 +1727,14 @@ keep_going: /* Is the reloc pc-relative? */ pcrel = (operand->flags & MN10300_OPERAND_PCREL) != 0; - /* Gross. This disgusting hack is to make sure we - get the right offset for the 16/32 bit reloc in - "call" instructions. Basically they're a pain - because the reloc isn't at the end of the instruction. */ - if ((size == 5 || size == 7) - && (((insn >> 24) & 0xff) == 0xcd - || ((insn >> 24) & 0xff) == 0xdd)) - size -= 2; - - /* Similarly for certain bit instructions which don't - hav their 32bit reloc at the tail of the instruction. */ - if (size == 7 - && (((insn >> 16) & 0xffff) == 0xfe00 - || ((insn >> 16) & 0xffff) == 0xfe01 - || ((insn >> 16) & 0xffff) == 0xfe02)) - size -= 1; - offset = size - reloc_size / 8; + /* If the pcrel relocation isn't at the end of the insn, + we have to adjust the offset for the relocation to be + correct. */ + if (pcrel) + offset -= operand->shift / 8; + /* Choose a proper BFD relocation type. */ if (pcrel) { @@ -1790,7 +1778,7 @@ keep_going: } } - dwarf2_emit_insn (real_size); + dwarf2_emit_insn (size); } /* If while processing a fixup, a reloc really needs to be created diff -uprN binutils-2.11.90.0.4/gas/config/tc-ppc.h binutils-2.11.90.0.5/gas/config/tc-ppc.h --- binutils-2.11.90.0.4/gas/config/tc-ppc.h Fri Mar 9 11:17:07 2001 +++ binutils-2.11.90.0.5/gas/config/tc-ppc.h Fri Apr 13 11:19:47 2001 @@ -268,7 +268,7 @@ extern const char *ppc_comment_chars; #define MD_PCREL_FROM_SECTION(FIXP, SEC) md_pcrel_from_section(FIXP, SEC) extern long md_pcrel_from_section PARAMS ((struct fix *, segT)); -#define md_parse_name(name, exp) ppc_parse_name (name, exp) +#define md_parse_name(name, exp, c) ppc_parse_name (name, exp) extern int ppc_parse_name PARAMS ((const char *, struct expressionS *)); #define md_operand(x) diff -uprN binutils-2.11.90.0.4/gas/config/tc-sh.c binutils-2.11.90.0.5/gas/config/tc-sh.c --- binutils-2.11.90.0.4/gas/config/tc-sh.c Thu Mar 29 17:36:14 2001 +++ binutils-2.11.90.0.5/gas/config/tc-sh.c Fri Apr 6 15:33:06 2001 @@ -140,8 +140,6 @@ const char FLT_CHARS[] = "rRsSfFdDxXpP"; #define COND8 1 #define COND12 2 #define COND32 3 -#define UNCOND12 1 -#define UNCOND32 2 #define UNDEF_WORD_DISP 4 #define UNCOND12 1 @@ -190,7 +188,9 @@ const relax_typeS md_relax_table[C (END, { COND12_F, COND12_M, COND12_LENGTH, C (COND_JUMP, COND32), }, /* C (COND_JUMP, COND32) */ { COND32_F, COND32_M, COND32_LENGTH, 0, }, - EMPTY, EMPTY, EMPTY, EMPTY, + /* C (COND_JUMP, UNDEF_WORD_DISP) */ + { 0, 0, COND32_LENGTH, 0, }, + EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, @@ -200,7 +200,9 @@ const relax_typeS md_relax_table[C (END, { COND12_F, COND12_M, COND12_DELAY_LENGTH, C (COND_JUMP_DELAY, COND32), }, /* C (COND_JUMP_DELAY, COND32) */ { COND32_F, COND32_M, COND32_LENGTH, 0, }, - EMPTY, EMPTY, EMPTY, EMPTY, + /* C (COND_JUMP_DELAY, UNDEF_WORD_DISP) */ + { 0, 0, COND32_LENGTH, 0, }, + EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, @@ -208,7 +210,10 @@ const relax_typeS md_relax_table[C (END, { UNCOND12_F, UNCOND12_M, UNCOND12_LENGTH, C (UNCOND_JUMP, UNCOND32), }, /* C (UNCOND_JUMP, UNCOND32) */ { UNCOND32_F, UNCOND32_M, UNCOND32_LENGTH, 0, }, - EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, + EMPTY, + /* C (UNCOND_JUMP, UNDEF_WORD_DISP) */ + { 0, 0, UNCOND32_LENGTH, 0, }, + EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, }; @@ -3028,6 +3033,8 @@ md_estimate_size_before_relax (fragP, se register fragS *fragP; register segT segment_type; { + int what; + switch (fragP->fr_subtype) { default: @@ -3038,58 +3045,57 @@ md_estimate_size_before_relax (fragP, se if (!fragP->fr_symbol) { fragP->fr_subtype = C (UNCOND_JUMP, UNCOND12); - fragP->fr_var = md_relax_table[C (UNCOND_JUMP, UNCOND12)].rlx_length; } else if (S_GET_SEGMENT (fragP->fr_symbol) == segment_type) { fragP->fr_subtype = C (UNCOND_JUMP, UNCOND12); - fragP->fr_var = md_relax_table[C (UNCOND_JUMP, UNCOND12)].rlx_length; } else { fragP->fr_subtype = C (UNCOND_JUMP, UNDEF_WORD_DISP); - fragP->fr_var = md_relax_table[C (UNCOND_JUMP, UNCOND32)].rlx_length; } break; case C (COND_JUMP, UNDEF_DISP): case C (COND_JUMP_DELAY, UNDEF_DISP): + what = GET_WHAT (fragP->fr_subtype); /* Used to be a branch to somewhere which was unknown. */ if (fragP->fr_symbol && S_GET_SEGMENT (fragP->fr_symbol) == segment_type) { - int what = GET_WHAT (fragP->fr_subtype); /* Got a symbol and it's defined in this segment, become byte sized - maybe it will fix up. */ fragP->fr_subtype = C (what, COND8); - fragP->fr_var = md_relax_table[C (what, COND8)].rlx_length; } else if (fragP->fr_symbol) { - int what = GET_WHAT (fragP->fr_subtype); /* Its got a segment, but its not ours, so it will always be long. */ fragP->fr_subtype = C (what, UNDEF_WORD_DISP); - fragP->fr_var = md_relax_table[C (what, COND32)].rlx_length; } else { - int what = GET_WHAT (fragP->fr_subtype); /* We know the abs value. */ fragP->fr_subtype = C (what, COND8); - fragP->fr_var = md_relax_table[C (what, COND8)].rlx_length; } break; case C (UNCOND_JUMP, UNCOND12): + case C (UNCOND_JUMP, UNCOND32): case C (UNCOND_JUMP, UNDEF_WORD_DISP): case C (COND_JUMP, COND8): + case C (COND_JUMP, COND12): + case C (COND_JUMP, COND32): case C (COND_JUMP, UNDEF_WORD_DISP): case C (COND_JUMP_DELAY, COND8): + case C (COND_JUMP_DELAY, COND12): + case C (COND_JUMP_DELAY, COND32): case C (COND_JUMP_DELAY, UNDEF_WORD_DISP): /* When relaxing a section for the second time, we don't need to - do anything. */ + do anything besides return the current size. */ break; } + + fragP->fr_var = md_relax_table[fragP->fr_subtype].rlx_length; return fragP->fr_var; } diff -uprN binutils-2.11.90.0.4/gas/config/tc-tic54x.h binutils-2.11.90.0.5/gas/config/tc-tic54x.h --- binutils-2.11.90.0.4/gas/config/tc-tic54x.h Fri Mar 9 11:17:10 2001 +++ binutils-2.11.90.0.5/gas/config/tc-tic54x.h Fri Apr 13 11:19:49 2001 @@ -88,7 +88,7 @@ extern void tic54x_number_to_chars PARAM extern void tic54x_adjust_symtab PARAMS(()); #define tc_unrecognized_line(ch) tic54x_unrecognized_line(ch) extern int tic54x_unrecognized_line PARAMS((int ch)); -#define md_parse_name(s,e) tic54x_parse_name(s,e) +#define md_parse_name(s,e,c) tic54x_parse_name(s,e) extern int tic54x_parse_name PARAMS((char *name, expressionS *e)); #define md_undefined_symbol(s) tic54x_undefined_symbol(s) extern symbolS *tic54x_undefined_symbol PARAMS((char *name)); diff -uprN binutils-2.11.90.0.4/gas/config/tc-w65.c binutils-2.11.90.0.5/gas/config/tc-w65.c --- binutils-2.11.90.0.4/gas/config/tc-w65.c Thu Mar 29 17:36:16 2001 +++ binutils-2.11.90.0.5/gas/config/tc-w65.c Fri Apr 6 15:33:09 2001 @@ -101,7 +101,25 @@ int X; /* X flag */ #define WORD_F 32767 #define WORD_B 32768 -relax_typeS md_relax_table[C (END, 0)]; +relax_typeS md_relax_table[C (END, 0)] = { + { 0, 0, 0, 0 }, + { 0, 0, 0, 0 }, + { 0, 0, 0, 0 }, + { 0, 0, 0, 0 }, + + /* COND_BRANCH */ + { 0, 0, 0, 0 }, /* UNDEF_BYTE_DISP */ + { BYTE_F, BYTE_B, 2, C (COND_BRANCH, WORD_DISP) }, /* BYTE_DISP */ + { WORD_F, WORD_B, 5, 0 }, /* WORD_DISP */ + { 0, 0, 5, 0 }, /* UNDEF_WORD_DISP */ + + /* UNCOND_BRANCH */ + { 0, 0, 0, 0 }, /* UNDEF_BYTE_DISP */ + { BYTE_F, BYTE_B, 2, C (UNCOND_BRANCH, WORD_DISP) }, /* BYTE_DISP */ + { WORD_F, WORD_B, 3, 0 }, /* WORD_DISP */ + { 0, 0, 3, 0 } /* UNDEF_WORD_DISP */ + +}; /* This function is called once, at assembler startup time. This should set up all the tables, etc that the MD part of the assembler @@ -131,7 +149,6 @@ s_longa (xmode) void md_begin () { - relax_typeS *table; struct opinfo *opcode; char *prev_name = ""; @@ -153,29 +170,6 @@ md_begin () } } - /* Initialize the relax table. We use a local variable to avoid - warnings about modifying a supposedly const data structure. */ - table = (relax_typeS *) md_relax_table; - table[C (COND_BRANCH, BYTE_DISP)].rlx_forward = BYTE_F; - table[C (COND_BRANCH, BYTE_DISP)].rlx_backward = BYTE_B; - table[C (COND_BRANCH, BYTE_DISP)].rlx_length = 2; - table[C (COND_BRANCH, BYTE_DISP)].rlx_more = C (COND_BRANCH, WORD_DISP); - - table[C (COND_BRANCH, WORD_DISP)].rlx_forward = WORD_F; - table[C (COND_BRANCH, WORD_DISP)].rlx_backward = WORD_B; - table[C (COND_BRANCH, WORD_DISP)].rlx_length = 5; - table[C (COND_BRANCH, WORD_DISP)].rlx_more = 0; - - table[C (UNCOND_BRANCH, BYTE_DISP)].rlx_forward = BYTE_F; - table[C (UNCOND_BRANCH, BYTE_DISP)].rlx_backward = BYTE_B; - table[C (UNCOND_BRANCH, BYTE_DISP)].rlx_length = 2; - table[C (UNCOND_BRANCH, BYTE_DISP)].rlx_more = C (UNCOND_BRANCH, WORD_DISP); - - table[C (UNCOND_BRANCH, WORD_DISP)].rlx_forward = WORD_F; - table[C (UNCOND_BRANCH, WORD_DISP)].rlx_backward = WORD_B; - table[C (UNCOND_BRANCH, WORD_DISP)].rlx_length = 3; - table[C (UNCOND_BRANCH, WORD_DISP)].rlx_more = 0; - flag_signed_overflow_ok = 1; } @@ -1148,7 +1142,7 @@ md_estimate_size_before_relax (fragP, se register fragS *fragP; register segT segment_type; { - int what = GET_WHAT (fragP->fr_subtype); + int what; switch (fragP->fr_subtype) { @@ -1157,31 +1151,34 @@ md_estimate_size_before_relax (fragP, se case C (COND_BRANCH, UNDEF_BYTE_DISP): case C (UNCOND_BRANCH, UNDEF_BYTE_DISP): + what = GET_WHAT (fragP->fr_subtype); /* Used to be a branch to somewhere which was unknown. */ if (S_GET_SEGMENT (fragP->fr_symbol) == segment_type) { /* Got a symbol and it's defined in this segment, become byte sized - maybe it will fix up. */ fragP->fr_subtype = C (what, BYTE_DISP); - fragP->fr_var = md_relax_table[C (what, BYTE_DISP)].rlx_length; } else { /* Its got a segment, but its not ours, so it will always be long. */ fragP->fr_subtype = C (what, UNDEF_WORD_DISP); - fragP->fr_var = md_relax_table[C (what, WORD_DISP)].rlx_length; } break; case C (COND_BRANCH, BYTE_DISP): case C (COND_BRANCH, WORD_DISP): + case C (COND_BRANCH, UNDEF_WORD_DISP): case C (UNCOND_BRANCH, BYTE_DISP): case C (UNCOND_BRANCH, WORD_DISP): + case C (UNCOND_BRANCH, UNDEF_WORD_DISP): /* When relaxing a section for the second time, we don't need to - do anything. */ + do anything besides return the current size. */ break; } + + fragP->fr_var = md_relax_table[fragP->fr_subtype].rlx_length; return fragP->fr_var; } diff -uprN binutils-2.11.90.0.4/gas/configure binutils-2.11.90.0.5/gas/configure --- binutils-2.11.90.0.4/gas/configure Tue Mar 27 08:55:08 2001 +++ binutils-2.11.90.0.5/gas/configure Sat Apr 7 23:03:03 2001 @@ -55,7 +55,6 @@ program_suffix=NONE program_transform_name=s,x,x, silent= site= -sitefile= srcdir= target=NONE verbose= @@ -170,7 +169,6 @@ Configuration: --help print this message --no-create do not create output files --quiet, --silent do not print \`checking...' messages - --site-file=FILE use FILE as the site file --version print the version of autoconf that created configure Directory and file names: --prefix=PREFIX install architecture-independent files in PREFIX @@ -341,11 +339,6 @@ EOF -site=* | --site=* | --sit=*) site="$ac_optarg" ;; - -site-file | --site-file | --site-fil | --site-fi | --site-f) - ac_prev=sitefile ;; - -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*) - sitefile="$ac_optarg" ;; - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) @@ -511,16 +504,12 @@ fi srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` # Prefer explicitly selected file to automatically selected ones. -if test -z "$sitefile"; then - if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi +if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi -else - CONFIG_SITE="$sitefile" fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then @@ -559,12 +548,12 @@ else fi echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 -echo "configure:563: checking for Cygwin environment" >&5 +echo "configure:552: checking for Cygwin environment" >&5 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:568: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cygwin=yes else @@ -592,19 +581,19 @@ echo "$ac_t""$ac_cv_cygwin" 1>&6 CYGWIN= test "$ac_cv_cygwin" = yes && CYGWIN=yes echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 -echo "configure:596: checking for mingw32 environment" >&5 +echo "configure:585: checking for mingw32 environment" >&5 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:597: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_mingw32=yes else @@ -669,7 +658,7 @@ else { echo "configure: error: can not r fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:673: checking host system type" >&5 +echo "configure:662: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -690,7 +679,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)- echo "$ac_t""$host" 1>&6 echo $ac_n "checking target system type""... $ac_c" 1>&6 -echo "configure:694: checking target system type" >&5 +echo "configure:683: checking target system type" >&5 target_alias=$target case "$target_alias" in @@ -708,7 +697,7 @@ target_os=`echo $target | sed 's/^\([^-] echo "$ac_t""$target" 1>&6 echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:712: checking build system type" >&5 +echo "configure:701: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -732,7 +721,7 @@ test "$host_alias" != "$target_alias" && echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6 -echo "configure:736: checking for strerror in -lcposix" >&5 +echo "configure:725: checking for strerror in -lcposix" >&5 ac_lib_var=`echo cposix'_'strerror | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -740,7 +729,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcposix $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -787,7 +776,7 @@ BFD_VERSION=`sed -n -e 's/^.._INIT_AUTOM # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:791: checking for a BSD compatible install" >&5 +echo "configure:780: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -840,7 +829,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCR test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 -echo "configure:844: checking whether build environment is sane" >&5 +echo "configure:833: checking whether build environment is sane" >&5 # Just in case sleep 1 echo timestamp > conftestfile @@ -897,7 +886,7 @@ test "$program_suffix" != NONE && test "$program_transform_name" = "" && program_transform_name="s,x,x," echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:901: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:890: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -943,7 +932,7 @@ EOF missing_dir=`cd $ac_aux_dir && pwd` echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 -echo "configure:947: checking for working aclocal" >&5 +echo "configure:936: checking for working aclocal" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -956,7 +945,7 @@ else fi echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 -echo "configure:960: checking for working autoconf" >&5 +echo "configure:949: checking for working autoconf" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -969,7 +958,7 @@ else fi echo $ac_n "checking for working automake""... $ac_c" 1>&6 -echo "configure:973: checking for working automake" >&5 +echo "configure:962: checking for working automake" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -982,7 +971,7 @@ else fi echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 -echo "configure:986: checking for working autoheader" >&5 +echo "configure:975: checking for working autoheader" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -995,7 +984,7 @@ else fi echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 -echo "configure:999: checking for working makeinfo" >&5 +echo "configure:988: checking for working makeinfo" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -1081,7 +1070,7 @@ fi # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1085: checking for $ac_word" >&5 +echo "configure:1074: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1111,7 +1100,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1115: checking for $ac_word" >&5 +echo "configure:1104: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1162,7 +1151,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1166: checking for $ac_word" >&5 +echo "configure:1155: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1194,7 +1183,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1198: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1187: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -1205,12 +1194,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 1209 "configure" +#line 1198 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1236,12 +1225,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1240: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1229: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1245: checking whether we are using GNU C" >&5 +echo "configure:1234: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1250,7 +1239,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1254: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1243: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -1269,7 +1258,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1273: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1262: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1312,7 +1301,7 @@ ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 -echo "configure:1316: checking for ld used by GCC" >&5 +echo "configure:1305: checking for ld used by GCC" >&5 case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw @@ -1342,10 +1331,10 @@ echo "configure:1316: checking for ld us esac elif test "$with_gnu_ld" = yes; then echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 -echo "configure:1346: checking for GNU ld" >&5 +echo "configure:1335: checking for GNU ld" >&5 else echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 -echo "configure:1349: checking for non-GNU ld" >&5 +echo "configure:1338: checking for non-GNU ld" >&5 fi if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1380,7 +1369,7 @@ else fi test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 -echo "configure:1384: checking if the linker ($LD) is GNU ld" >&5 +echo "configure:1373: checking if the linker ($LD) is GNU ld" >&5 if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1397,7 +1386,7 @@ with_gnu_ld=$lt_cv_prog_gnu_ld echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6 -echo "configure:1401: checking for $LD option to reload object files" >&5 +echo "configure:1390: checking for $LD option to reload object files" >&5 if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1409,7 +1398,7 @@ reload_flag=$lt_cv_ld_reload_flag test -n "$reload_flag" && reload_flag=" $reload_flag" echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 -echo "configure:1413: checking for BSD-compatible nm" >&5 +echo "configure:1402: checking for BSD-compatible nm" >&5 if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1447,7 +1436,7 @@ NM="$lt_cv_path_NM" echo "$ac_t""$NM" 1>&6 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1451: checking whether ln -s works" >&5 +echo "configure:1440: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1468,7 +1457,7 @@ else fi echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6 -echo "configure:1472: checking how to recognise dependant libraries" >&5 +echo "configure:1461: checking how to recognise dependant libraries" >&5 if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1623,13 +1612,13 @@ file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method echo $ac_n "checking for object suffix""... $ac_c" 1>&6 -echo "configure:1627: checking for object suffix" >&5 +echo "configure:1616: checking for object suffix" >&5 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else rm -f conftest* echo 'int i = 1;' > conftest.$ac_ext -if { (eval echo configure:1633: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1622: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then for ac_file in conftest.*; do case $ac_file in *.c) ;; @@ -1649,7 +1638,7 @@ ac_objext=$ac_cv_objext echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:1653: checking for executable suffix" >&5 +echo "configure:1642: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1659,10 +1648,10 @@ else rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= - if { (eval echo configure:1663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + if { (eval echo configure:1652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in - *.c | *.o | *.obj | *.ilk | *.pdb) ;; + *.c | *.o | *.obj) ;; *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; esac done @@ -1692,7 +1681,7 @@ case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6 -echo "configure:1696: checking for ${ac_tool_prefix}file" >&5 +echo "configure:1685: checking for ${ac_tool_prefix}file" >&5 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1754,7 +1743,7 @@ fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then echo $ac_n "checking for file""... $ac_c" 1>&6 -echo "configure:1758: checking for file" >&5 +echo "configure:1747: checking for file" >&5 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1825,7 +1814,7 @@ esac # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1829: checking for $ac_word" >&5 +echo "configure:1818: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1857,7 +1846,7 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1861: checking for $ac_word" >&5 +echo "configure:1850: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1892,7 +1881,7 @@ fi # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1896: checking for $ac_word" >&5 +echo "configure:1885: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1924,7 +1913,7 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1928: checking for $ac_word" >&5 +echo "configure:1917: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1991,8 +1980,8 @@ test x"$pic_mode" = xno && libtool_flags case $host in *-*-irix6*) # Find out which ABI we are using. - echo '#line 1995 "configure"' > conftest.$ac_ext - if { (eval echo configure:1996: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + echo '#line 1984 "configure"' > conftest.$ac_ext + if { (eval echo configure:1985: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" @@ -2013,7 +2002,7 @@ case $host in SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 -echo "configure:2017: checking whether the C compiler needs -belf" >&5 +echo "configure:2006: checking whether the C compiler needs -belf" >&5 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2026,14 +2015,14 @@ ac_link='${CC-cc} -o conftest${ac_exeext cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* lt_cv_cc_needs_belf=yes else @@ -2380,6 +2369,8 @@ for this_target in $target $canon_target h8300-*-rtems*) fmt=coff ;; h8300-*-coff) fmt=coff ;; + h8500-*-rtems*) fmt=coff ;; + h8500-*-coff) fmt=coff ;; i370-*-elf* | i370-*-linux*) fmt=elf ;; i386-ibm-aix*) fmt=coff em=i386aix ;; @@ -2496,9 +2487,10 @@ EOF mips-*-irix*) fmt=ecoff ;; mips-*-lnews*) fmt=ecoff em=lnews ;; mips-*-riscos*) fmt=ecoff ;; - mips-*-sysv4*MP*) fmt=elf em=tmips ;; + mips-*-sysv4*MP* | mips-*-linux-gnu* | mips-*-gnu*) + fmt=elf em=tmips ;; mips-*-sysv*) fmt=ecoff ;; - mips-*-elf* | mips-*-rtems* | mips-*-linux-gnu* | mips-*-gnu* | mips-*-openbsd*) + mips-*-elf* | mips-*-rtems* | mips-*-openbsd*) fmt=elf ;; mips-*-vxworks*) fmt=elf cat >> confdefs.h <<\EOF @@ -3110,7 +3102,7 @@ EOF # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3114: checking for $ac_word" >&5 +echo "configure:3106: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3140,7 +3132,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3144: checking for $ac_word" >&5 +echo "configure:3136: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3191,7 +3183,7 @@ fi # Extract the first word of "cl", so it can be a program n