Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/gnu/dist/toolchain Resolve conflicts from binutils 2.10.1 im...



details:   https://anonhg.NetBSD.org/src/rev/f583e12a6ac6
branches:  trunk
changeset: 503070:f583e12a6ac6
user:      tv <tv%NetBSD.org@localhost>
date:      Tue Jan 30 19:08:57 2001 +0000

description:
Resolve conflicts from binutils 2.10.1 import.

diffstat:

 gnu/dist/toolchain/bfd/coffcode.h        |    6 +
 gnu/dist/toolchain/bfd/config.bfd        |    6 +-
 gnu/dist/toolchain/bfd/configure         |    2 +-
 gnu/dist/toolchain/bfd/configure.in      |    2 +-
 gnu/dist/toolchain/bfd/elf.c             |   44 +-
 gnu/dist/toolchain/bfd/elf64-alpha.c     |    7 +-
 gnu/dist/toolchain/bfd/elflink.h         |   23 +-
 gnu/dist/toolchain/binutils/objcopy.c    |    2 +-
 gnu/dist/toolchain/binutils/objdump.c    |   69 +-
 gnu/dist/toolchain/config.guess          |  625 +++++++++++++++++++++---------
 gnu/dist/toolchain/config.sub            |  434 ++++++++++++--------
 gnu/dist/toolchain/gas/config/tc-alpha.c |    2 +-
 gnu/dist/toolchain/gas/config/tc-arm.c   |    6 +-
 gnu/dist/toolchain/gas/configure         |  225 +++++-----
 gnu/dist/toolchain/gas/configure.in      |    2 +-
 gnu/dist/toolchain/ld/Makefile.am        |    2 +-
 gnu/dist/toolchain/ld/Makefile.in        |    2 +-
 gnu/dist/toolchain/ld/configure.tgt      |    2 +-
 gnu/dist/toolchain/ld/ldlex.c            |    7 +-
 19 files changed, 941 insertions(+), 527 deletions(-)

diffs (truncated from 3212 to 300 lines):

diff -r 4ac8637b4208 -r f583e12a6ac6 gnu/dist/toolchain/bfd/coffcode.h
--- a/gnu/dist/toolchain/bfd/coffcode.h Tue Jan 30 18:32:08 2001 +0000
+++ b/gnu/dist/toolchain/bfd/coffcode.h Tue Jan 30 19:08:57 2001 +0000
@@ -2597,6 +2597,12 @@
       return true;
 #endif
       
+#ifdef W65MAGIC
+    case bfd_arch_w65:
+      *magicp = W65MAGIC;
+      return true;
+#endif
+
     default:                   /* Unknown architecture */
       /* return false;  -- fall through to "return false" below, to avoid
        "statement never reached" errors on the one below. */
diff -r 4ac8637b4208 -r f583e12a6ac6 gnu/dist/toolchain/bfd/config.bfd
--- a/gnu/dist/toolchain/bfd/config.bfd Tue Jan 30 18:32:08 2001 +0000
+++ b/gnu/dist/toolchain/bfd/config.bfd Tue Jan 30 19:08:57 2001 +0000
@@ -126,7 +126,11 @@
     targ_selvecs=armcoff_big_vec
     targ_underscore=yes
     ;;
-  arm-*-elf | arm*-*-linux-gnu* | arm*-*-conix*)
+  armeb-*-elf | arm*b-*-linux-gnu*)
+    targ_defvec=bfd_elf32_bigarm_vec
+    targ_selvecs=bfd_elf32_littlearm_vec
+    ;;
+  arm-*-elf | arm*-*-linux-gnu* | arm*-*-conix* | arm*-*-uclinux*)
     targ_defvec=bfd_elf32_littlearm_vec
     targ_selvecs=bfd_elf32_bigarm_vec
     ;;
diff -r 4ac8637b4208 -r f583e12a6ac6 gnu/dist/toolchain/bfd/configure
--- a/gnu/dist/toolchain/bfd/configure  Tue Jan 30 18:32:08 2001 +0000
+++ b/gnu/dist/toolchain/bfd/configure  Tue Jan 30 19:08:57 2001 +0000
@@ -1050,7 +1050,7 @@
 
 PACKAGE=bfd
 
-VERSION=2.10
+VERSION=2.10.1
 
 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; }
diff -r 4ac8637b4208 -r f583e12a6ac6 gnu/dist/toolchain/bfd/configure.in
--- a/gnu/dist/toolchain/bfd/configure.in       Tue Jan 30 18:32:08 2001 +0000
+++ b/gnu/dist/toolchain/bfd/configure.in       Tue Jan 30 19:08:57 2001 +0000
@@ -7,7 +7,7 @@
 AC_CANONICAL_SYSTEM
 AC_ISC_POSIX
 
-AM_INIT_AUTOMAKE(bfd, 2.10)
+AM_INIT_AUTOMAKE(bfd, 2.10.1)
 
 dnl These must be called before AM_PROG_LIBTOOL, because it may want
 dnl to call AC_CHECK_PROG.
diff -r 4ac8637b4208 -r f583e12a6ac6 gnu/dist/toolchain/bfd/elf.c
--- a/gnu/dist/toolchain/bfd/elf.c      Tue Jan 30 18:32:08 2001 +0000
+++ b/gnu/dist/toolchain/bfd/elf.c      Tue Jan 30 19:08:57 2001 +0000
@@ -4488,18 +4488,13 @@
       Elf_Internal_Shdr *hdr;
       Elf_External_Verdef *everdef;
       Elf_Internal_Verdef *iverdef;
+      Elf_Internal_Verdef *iverdefarr;
+      Elf_Internal_Verdef iverdefmem;
       unsigned int i;
+      unsigned int maxidx;
 
       hdr = &elf_tdata (abfd)->dynverdef_hdr;
 
-      elf_tdata (abfd)->verdef =
-       ((Elf_Internal_Verdef *)
-        bfd_zalloc (abfd, hdr->sh_info * sizeof (Elf_Internal_Verdef)));
-      if (elf_tdata (abfd)->verdef == NULL)
-       goto error_return;
-
-      elf_tdata (abfd)->cverdefs = hdr->sh_info;
-
       contents = (bfd_byte *) bfd_malloc (hdr->sh_size);
       if (contents == NULL)
        goto error_return;
@@ -4507,15 +4502,42 @@
          || bfd_read ((PTR) contents, 1, hdr->sh_size, abfd) != hdr->sh_size)
        goto error_return;
 
+      /* We know the number of entries in the section but not the maximum
+        index.  Therefore we have to run through all entries and find
+        the maximum.  */
       everdef = (Elf_External_Verdef *) contents;
-      iverdef = elf_tdata (abfd)->verdef;
-      for (i = 0; i < hdr->sh_info; i++, iverdef++)
+      maxidx = 0;
+      for (i = 0; i < hdr->sh_info; ++i)
+       {
+         _bfd_elf_swap_verdef_in (abfd, everdef, &iverdefmem);
+
+         if ((iverdefmem.vd_ndx & VERSYM_VERSION) > maxidx)
+           maxidx = iverdefmem.vd_ndx & VERSYM_VERSION;
+
+         everdef = ((Elf_External_Verdef *)
+                    ((bfd_byte *) everdef + iverdefmem.vd_next));
+       }
+
+      elf_tdata (abfd)->verdef =
+       ((Elf_Internal_Verdef *)
+        bfd_zalloc (abfd, maxidx * sizeof (Elf_Internal_Verdef)));
+      if (elf_tdata (abfd)->verdef == NULL)
+       goto error_return;
+
+      elf_tdata (abfd)->cverdefs = maxidx;
+
+      everdef = (Elf_External_Verdef *) contents;
+      iverdefarr = elf_tdata (abfd)->verdef;
+      for (i = 0; i < hdr->sh_info; i++)
        {
          Elf_External_Verdaux *everdaux;
          Elf_Internal_Verdaux *iverdaux;
          unsigned int j;
 
-         _bfd_elf_swap_verdef_in (abfd, everdef, iverdef);
+         _bfd_elf_swap_verdef_in (abfd, everdef, &iverdefmem);
+
+         iverdef = &iverdefarr[(iverdefmem.vd_ndx & VERSYM_VERSION) - 1];
+         memcpy (iverdef, &iverdefmem, sizeof (Elf_Internal_Verdef));
 
          iverdef->vd_bfd = abfd;
 
diff -r 4ac8637b4208 -r f583e12a6ac6 gnu/dist/toolchain/bfd/elf64-alpha.c
--- a/gnu/dist/toolchain/bfd/elf64-alpha.c      Tue Jan 30 18:32:08 2001 +0000
+++ b/gnu/dist/toolchain/bfd/elf64-alpha.c      Tue Jan 30 19:08:57 2001 +0000
@@ -3482,14 +3482,17 @@
            }
          else if (h->root.root.type == bfd_link_hash_undefweak)
            relocation = 0;
-         else if (info->shared && !info->symbolic && !info->no_undefined)
+         else if (info->shared && !info->symbolic
+                  && !info->no_undefined
+                  && ELF_ST_VISIBILITY (h->root.other) == STV_DEFAULT)
            relocation = 0;
          else
            {
              if (!((*info->callbacks->undefined_symbol)
                    (info, h->root.root.root.string, input_bfd,
                     input_section, rel->r_offset,
-                    (!info->shared || info->no_undefined))))
+                    (!info->shared || info->no_undefined
+                     || ELF_ST_VISIBILITY (h->root.other)))))
                return false;
              relocation = 0;
            }
diff -r 4ac8637b4208 -r f583e12a6ac6 gnu/dist/toolchain/bfd/elflink.h
--- a/gnu/dist/toolchain/bfd/elflink.h  Tue Jan 30 18:32:08 2001 +0000
+++ b/gnu/dist/toolchain/bfd/elflink.h  Tue Jan 30 19:08:57 2001 +0000
@@ -1855,6 +1855,18 @@
                    goto error_return;
                }
            }
+         else if (dynsym && h->dynindx != -1)
+           /* If the symbol already has a dynamic index, but
+              visibility says it should not be visible, turn it into
+              a local symbol.  */
+           switch (ELF_ST_VISIBILITY (h->other))
+             {
+             case STV_INTERNAL:
+             case STV_HIDDEN:  
+               h->elf_link_hash_flags |= ELF_LINK_FORCED_LOCAL;
+               (*bed->elf_backend_hide_symbol) (h);
+               break;
+             }
        }
     }
 
@@ -3344,10 +3356,12 @@
   /* 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.  */
+     need a PLT entry.  Likewise, if the symbol has any kind of
+     visibility (internal, hidden, or protected), it doesn't need a
+     PLT.  */
   if ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0
       && eif->info->shared
-      && eif->info->symbolic
+      && (eif->info->symbolic || ELF_ST_VISIBILITY (h->other))
       && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) != 0)
     {
       h->elf_link_hash_flags &=~ ELF_LINK_HASH_NEEDS_PLT;
@@ -5077,6 +5091,11 @@
       sym.st_info = ELF_ST_INFO (bindtype, ELF_ST_TYPE (sym.st_info));
     }
 
+  /* If a symbol is not defined locally, we clear the visibility
+     field. */
+  if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
+    sym.st_other ^= ELF_ST_VISIBILITY(sym.st_other);
+
   /* If this symbol should be put in the .dynsym section, then put it
      there now.  We have already know the symbol index.  We also fill
      in the entry in the .hash section.  */
diff -r 4ac8637b4208 -r f583e12a6ac6 gnu/dist/toolchain/binutils/objcopy.c
--- a/gnu/dist/toolchain/binutils/objcopy.c     Tue Jan 30 18:32:08 2001 +0000
+++ b/gnu/dist/toolchain/binutils/objcopy.c     Tue Jan 30 19:08:57 2001 +0000
@@ -1687,7 +1687,7 @@
          break;
        case 'S':
        case 'g':
-       case 'd':
+       case 'd':       /* NetBSD, historic BSD strip */
          strip_symbols = STRIP_DEBUG;
          break;
        case OPTION_STRIP_UNNEEDED:
diff -r 4ac8637b4208 -r f583e12a6ac6 gnu/dist/toolchain/binutils/objdump.c
--- a/gnu/dist/toolchain/binutils/objdump.c     Tue Jan 30 18:32:08 2001 +0000
+++ b/gnu/dist/toolchain/binutils/objdump.c     Tue Jan 30 19:08:57 2001 +0000
@@ -220,55 +220,56 @@
      FILE *stream;
      int status;
 {
-  fprintf (stream, _("Usage: %s <switches> file(s)\n"), program_name);
-  fprintf (stream, _(" At least one of the following switches must be given:\n"));
+  fprintf (stream, _("Usage: %s OPTION... FILE...\n"), program_name);
+  fprintf (stream, _("Display information from object FILE.\n"));
+  fprintf (stream, _("\n At least one of the following switches must be given:\n"));
   fprintf (stream, _("\
-  -a  --archive-headers    Display archive header information\n\
-  -f  --file-headers       Display the contents of the overall file header\n\
-  -p  --private-headers    Display object format specific file header contents\n\
-  -h  --[section-]headers  Display the contents of the section headers\n\
-  -x  --all-headers        Display the contents of all headers\n\
-  -d  --disassemble        Display assembler contents of executable sections\n\
-  -D  --disassemble-all    Display assembler contents of all sections\n\
-  -S  --source             Intermix source code with disassembly\n\
-  -s  --full-contents      Display the full contents of all sections requested\n\
-  -g  --debugging          Display debug information in object file\n\
-  -G  --stabs              Display the STABS contents of an ELF format file\n\
-  -t  --syms               Display the contents of the symbol table(s)\n\
-  -T  --dynamic-syms       Display the contents of the dynamic symbol table\n\
-  -r  --reloc              Display the relocation entries in the file\n\
-  -R  --dynamic-reloc      Display the dynamic relocation entries in the file\n\
-  -V  --version            Display this program's version number\n\
-  -i  --info               List object formats and architectures supported\n\
-  -H  --help               Display this information\n\
+  -a, --archive-headers    Display archive header information\n\
+  -f, --file-headers       Display the contents of the overall file header\n\
+  -p, --private-headers    Display object format specific file header contents\n\
+  -h, --[section-]headers  Display the contents of the section headers\n\
+  -x, --all-headers        Display the contents of all headers\n\
+  -d, --disassemble        Display assembler contents of executable sections\n\
+  -D, --disassemble-all    Display assembler contents of all sections\n\
+  -S, --source             Intermix source code with disassembly\n\
+  -s, --full-contents      Display the full contents of all sections requested\n\
+  -g, --debugging          Display debug information in object file\n\
+  -G, --stabs              Display (in raw form) any STABS info in the file\n\
+  -t, --syms               Display the contents of the symbol table(s)\n\
+  -T, --dynamic-syms       Display the contents of the dynamic symbol table\n\
+  -r, --reloc              Display the relocation entries in the file\n\
+  -R, --dynamic-reloc      Display the dynamic relocation entries in the file\n\
+  -V, --version            Display this program's version number\n\
+  -i, --info               List object formats and architectures supported\n\
+  -H, --help               Display this information\n\
 "));
   if (status != 2)
     {
       fprintf (stream, _("\n The following switches are optional:\n"));
       fprintf (stream, _("\
-  -b  --target <bfdname>         Specify the target object format as <bfdname>\n\
-  -m  --architecture <machine>   Specify the target architecture as <machine>\n\
-  -j  --section <name>           Only display information for section <name>\n\
-  -M  --disassembler-options <o> Pass text <o> on to the disassembler\n\
+  -b, --target=BFDNAME           Specify the target object format as BFDNAME\n\
+  -m, --architecture=MACHINE     Specify the target architecture as MACHINE\n\
+  -j, --section=NAME             Only display information for section NAME\n\
+  -M, --disassembler-options=OPT Pass text OPT on to the disassembler\n\
   -EB --endian=big               Assume big endian format when disassembling\n\
   -EL --endian=little            Assume little endian format when disassembling\n\
       --file-start-context       Include context from start of file (with -S)\n\
-  -l  --line-numbers             Include line numbers and filenames in output\n\
-  -C  --demangle                 Decode mangled/processed symbol names\n\
-  -w  --wide                     Format output for more than 80 columns\n\
-  -z  --disassemble-zeroes       Do not skip blocks of zeroes when disassembling\n\
-      --start-address <addr>     Only process data whoes address is >= <addr>\n\
-      --stop-address <addr>      Only process data whoes address is <= <addr>\n\
+  -l, --line-numbers             Include line numbers and filenames in output\n\
+  -C, --demangle                 Decode mangled/processed symbol names\n\
+  -w, --wide                     Format output for more than 80 columns\n\
+  -z, --disassemble-zeroes       Do not skip blocks of zeroes when disassembling\n\
+      --start-address=ADDR       Only process data whoes address is >= ADDR\n\
+      --stop-address=ADDR        Only process data whoes address is <= ADDR\n\
       --prefix-addresses         Print complete address alongside disassembly\n\
       --[no-]show-raw-insn       Display hex alongside symbolic disassembly\n\
-      --adjust-vma <offset>      Add <offset> to all displayed section addresses\n\
+      --adjust-vma=OFFSET        Add OFFSET to all displayed section addresses\n\
 \n"));
       list_supported_targets (program_name, stream);
-      
+
       disassembler_usage (stream);
     }
   if (status == 0)
-    fprintf (stream, _("Report bugs to %s\n"), REPORT_BUGS_TO);



Home | Main Index | Thread Index | Old Index