source: patches/binutils-2.17-branch_update-1.patch@ f1758c8

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since f1758c8 was c4678fd, checked in by Jim Gifford <clfs@…>, 18 years ago

Added Binutils Branch Update Patch

  • Property mode set to 100644
File size: 20.2 KB
  • bfd/bfd-in2.h

    Submitted By: Robert Connolly <robert at linuxfromscratch dot org> (ashes)
    Date: 2006-12-04
    Initial Package Version: 2.17
    Upstream Status: From Upstream
    Origin: cvs -z 9 -d :pserver:anoncvs@sourceware.org:/cvs/src co \
    		-rbinutils-2_17-branch binutils
    Description: This is the binutils-2_17-branch (bug fix branch) update,
    compared from binutils-2.17-release and binutils-2_17-branch with all
    the fluff removed (CVS entries, maintainer files, etc). This patch
    should be updated periodically.
    
    diff -Naur binutils-2.17/bfd/bfd-in2.h src/bfd/bfd-in2.h
    old new  
    643643  DYN_NO_NEEDED = 8
    644644};
    645645
     646enum notice_asneeded_action {
     647  notice_as_needed,
     648  notice_not_needed,
     649  notice_needed
     650};
     651
    646652extern bfd_boolean bfd_elf_record_link_assignment
    647653  (bfd *, struct bfd_link_info *, const char *, bfd_boolean,
    648654   bfd_boolean);
  • bfd/bfd-in.h

    diff -Naur binutils-2.17/bfd/bfd-in.h src/bfd/bfd-in.h
    old new  
    636636  DYN_NO_NEEDED = 8
    637637};
    638638
     639enum notice_asneeded_action {
     640  notice_as_needed,
     641  notice_not_needed,
     642  notice_needed
     643};
     644
    639645extern bfd_boolean bfd_elf_record_link_assignment
    640646  (bfd *, struct bfd_link_info *, const char *, bfd_boolean,
    641647   bfd_boolean);
  • bfd/ChangeLog

    diff -Naur binutils-2.17/bfd/ChangeLog src/bfd/ChangeLog
    old new  
     12006-08-08  Nick Clifton  <nickc@redhat.com>
     2
     3        PR binutils/2724
     4        * coffcode.h (coff_new_section_hook): Only modify the section
     5        symbol of sections which were created by the user.
     6
     72006-07-19  Alan Modra  <amodra@bigpond.net.au>
     8
     9        * bfd-in.h (enum notice_asneeded_action): Define.
     10        * bfd-in2.h: Regenerate.
     11        * elflink.c (elf_link_add_object_symbols): Call linker "notice"
     12        function with NULL name for as-needed handling.
     13
     142006-07-12  Matthew R. Dempsky  <mrd@alkemio.org>
     15
     16        * cpu-m68k.c (bfd_m68k_compatible): Handle CPU32.
     17
     182006-06-23  Daniel Jacobowitz  <dan@codesourcery.com>
     19
     20        * Makefile.am: Clear RELEASE.
     21        * Makefile.in: Regenerated.
     22
    1232006-06-23  Daniel Jacobowitz  <dan@codesourcery.com>
    224
    325        * configure.in: Update version to 2.17.
  • bfd/coffcode.h

    diff -Naur binutils-2.17/bfd/coffcode.h src/bfd/coffcode.h
    old new  
    15461546static bfd_boolean
    15471547coff_new_section_hook (bfd * abfd, asection * section)
    15481548{
    1549   combined_entry_type *native;
    1550   bfd_size_type amt;
    1551 
    15521549  section->alignment_power = COFF_DEFAULT_SECTION_ALIGNMENT_POWER;
    15531550
    15541551#ifdef RS6000COFF_C
     
    15601557    section->alignment_power = bfd_xcoff_data_align_power (abfd);
    15611558#endif
    15621559
    1563   /* Allocate aux records for section symbols, to store size and
    1564      related info.
    1565 
    1566      @@ The 10 is a guess at a plausible maximum number of aux entries
    1567      (but shouldn't be a constant).  */
    1568   amt = sizeof (combined_entry_type) * 10;
    1569   native = bfd_zalloc (abfd, amt);
    1570   if (native == NULL)
    1571     return FALSE;
    1572 
    1573   /* We don't need to set up n_name, n_value, or n_scnum in the native
    1574      symbol information, since they'll be overridden by the BFD symbol
    1575      anyhow.  However, we do need to set the type and storage class,
    1576      in case this symbol winds up getting written out.  The value 0
    1577      for n_numaux is already correct.  */
    1578 
    1579   native->u.syment.n_type = T_NULL;
    1580   native->u.syment.n_sclass = C_STAT;
     1560  /* PR binutils/2724: Only real sections have a symbol that
     1561     has the coff_symbol_type structure allocated for it.  */
     1562  if (! bfd_is_const_section (section))
     1563    {
     1564      combined_entry_type *native;
     1565      bfd_size_type amt;
     1566
     1567      /* Allocate aux records for section symbols, to store size and
     1568         related info.
     1569
     1570         @@ The 10 is a guess at a plausible maximum number of aux entries
     1571         (but shouldn't be a constant).  */
     1572      amt = sizeof (combined_entry_type) * 10;
     1573      native = bfd_zalloc (abfd, amt);
     1574      if (native == NULL)
     1575        return FALSE;
    15811576
    1582   coffsymbol (section->symbol)->native = native;
     1577      /* We don't need to set up n_name, n_value, or n_scnum in the native
     1578         symbol information, since they'll be overridden by the BFD symbol
     1579         anyhow.  However, we do need to set the type and storage class,
     1580         in case this symbol winds up getting written out.  The value 0
     1581         for n_numaux is already correct.  */
     1582      native->u.syment.n_type = T_NULL;
     1583      native->u.syment.n_sclass = C_STAT;
    15831584
     1585      coffsymbol (section->symbol)->native = native;
     1586    }
     1587 
    15841588  coff_set_custom_section_alignment (abfd, section,
    15851589                                     coff_section_alignment_table,
    15861590                                     coff_section_alignment_table_size);
  • bfd/cpu-m68k.c

    diff -Naur binutils-2.17/bfd/cpu-m68k.c src/bfd/cpu-m68k.c
    old new  
    202202  if (a->mach <= bfd_mach_m68060 && b->mach <= bfd_mach_m68060)
    203203    /* Merge m68k machine. */
    204204    return a->mach > b->mach ? a : b;
     205  else if (a->mach == bfd_mach_cpu32 && b->mach == bfd_mach_cpu32)
     206    /* CPU32 is compatible with itself. */
     207    return a;
    205208  else if (a->mach >= bfd_mach_mcf_isa_a_nodiv
    206209           && b->mach >= bfd_mach_mcf_isa_a_nodiv)
    207210    {
  • bfd/elflink.c

    diff -Naur binutils-2.17/bfd/elflink.c src/bfd/elflink.c
    old new  
    34963496      if (alloc_mark == NULL)
    34973497        goto error_free_vers;
    34983498
     3499      /* Make a special call to the linker "notice" function to
     3500         tell it that we are about to handle an as-needed lib.  */
     3501      if (!(*info->callbacks->notice) (info, NULL, abfd, NULL,
     3502                                       notice_as_needed))
     3503        return FALSE;
     3504
     3505
    34993506      /* Clone the symbol table and sym hashes.  Remember some
    35003507         pointers into the symbol table, and dynamic symbol count.  */
    35013508      old_hash = (char *) old_tab + tabsize;
     
    41694176            }
    41704177        }
    41714178
     4179      /* Make a special call to the linker "notice" function to
     4180         tell it that symbols added for crefs may need to be removed.  */
     4181      if (!(*info->callbacks->notice) (info, NULL, abfd, NULL,
     4182                                       notice_not_needed))
     4183        return FALSE;
     4184
    41724185      free (old_tab);
    41734186      objalloc_free_block ((struct objalloc *) htab->root.table.memory,
    41744187                           alloc_mark);
     
    41794192
    41804193  if (old_tab != NULL)
    41814194    {
     4195      if (!(*info->callbacks->notice) (info, NULL, abfd, NULL,
     4196                                       notice_needed))
     4197        return FALSE;
    41824198      free (old_tab);
    41834199      old_tab = NULL;
    41844200    }
  • bfd/Makefile.am

    diff -Naur binutils-2.17/bfd/Makefile.am src/bfd/Makefile.am
    old new  
    33AUTOMAKE_OPTIONS = 1.9 cygnus
    44
    55# Uncomment the following line when doing a release.
    6 RELEASE=y
     6# RELEASE=y
    77
    88INCDIR = $(srcdir)/../include
    99CSEARCH = -I. -I$(srcdir) -I$(INCDIR)
  • bfd/version.h

    diff -Naur binutils-2.17/bfd/version.h src/bfd/version.h
    old new  
    1 #define BFD_VERSION_DATE 20060623
     1#define BFD_VERSION_DATE 20061204
    22#define BFD_VERSION @bfd_version@
    33#define BFD_VERSION_STRING @bfd_version_string@
  • binutils/ChangeLog

    diff -Naur binutils-2.17/binutils/ChangeLog src/binutils/ChangeLog
    old new  
     12006-08-15  Nick Clifton  <nickc@redhat.com>
     2
     3        PR binutils/3039
     4        * wrstabs.c (stab_tag_type): Initialize 'size'.
     5
    162006-06-07  Joseph S. Myers  <joseph@codesourcery.com>
    27
    38        * po/Make-in (pdf, ps): New dummy targets.
  • binutils/wrstabs.c

    diff -Naur binutils-2.17/binutils/wrstabs.c src/binutils/wrstabs.c
    old new  
    18691869{
    18701870  struct stab_write_handle *info = (struct stab_write_handle *) p;
    18711871  long index;
    1872   unsigned int size;
     1872  unsigned int size = 0;
    18731873
    18741874  index = stab_get_struct_index (info, name, id, kind, &size);
    18751875  if (index < 0)
  • configure.in

    diff -Naur binutils-2.17/configure.in src/configure.in
    old new  
    130130# know that we are building the simulator.
    131131# binutils, gas and ld appear in that order because it makes sense to run
    132132# "make check" in that particular order.
    133 host_tools="byacc flex bison binutils gas ld fixincludes gcc sid sim gdb make patch prms send-pr gprof etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool diff rcs fileutils shellutils time textutils wdiff find uudecode hello tar gzip indent recode release sed utils guile perl gawk findutils gettext zip fastjar gnattools"
     133host_tools="texinfo byacc flex bison binutils gas ld fixincludes gcc sid sim gdb make patch prms send-pr gprof etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool diff rcs fileutils shellutils time textutils wdiff find uudecode hello tar gzip indent recode release sed utils guile perl gawk findutils gettext zip fastjar gnattools"
    134134
    135135# libgcj represents the runtime libraries only used by gcj.
    136136libgcj="target-libffi \
  • gas/ChangeLog

    diff -Naur binutils-2.17/gas/ChangeLog src/gas/ChangeLog
    old new  
     12006-07-19  Mat Hostetter  <mat@lcs.mit.edu>
     2
     3        * symbols.c (report_op_error): Fix pasto.  Don't use as_bad_where
     4        when file and line unknown.
     5
    162006-06-07  Joseph S. Myers  <joseph@codesourcery.com>
    27
    38        * po/Make-in (pdf, ps): New dummy targets.
  • gas/symbols.c

    diff -Naur binutils-2.17/gas/symbols.c src/gas/symbols.c
    old new  
    928928          && seg_right != undefined_section)
    929929        {
    930930          if (right)
    931             as_bad_where (file, line,
    932                           _("invalid sections for operation on `%s' and `%s' setting `%s'"),
    933                           S_GET_NAME (left), S_GET_NAME (right), S_GET_NAME (symp));
     931            as_bad (_("invalid sections for operation on `%s' and `%s' setting `%s'"),
     932                    S_GET_NAME (left), S_GET_NAME (right), S_GET_NAME (symp));
    934933          else
    935             as_bad_where (file, line,
    936                           _("invalid section for operation on `%s' setting `%s'"),
    937                           S_GET_NAME (left), S_GET_NAME (symp));
     934            as_bad (_("invalid section for operation on `%s' setting `%s'"),
     935                    S_GET_NAME (left), S_GET_NAME (symp));
    938936        }
    939937    }
    940938}
  • ld/ChangeLog

    diff -Naur binutils-2.17/ld/ChangeLog src/ld/ChangeLog
    old new  
     12006-07-19  Alan Modra  <amodra@bigpond.net.au>
     2
     3        * ld.h (handle_asneeded_cref): Declare.
     4        * ldcref.c: Include objalloc.h.
     5        (old_table, old_tab, alloc_mark): New variables.
     6        (tabsize, entsize, refsize, old_symcount): Likewise.
     7        (add_cref): Use bfd_hash_allocate for refs.
     8        (handle_asneeded_cref): New function.
     9        * ldmain.c (notice): Call handle_asneeded_cref for NULL name.
     10
     112006-07-04  Daniel Jacobowitz  <dan@codesourcery.com>
     12
     13        Backport:
     14        2006-05-19  Alan Modra  <amodra@bigpond.net.au>
     15        * ldlang.c (lang_size_sections_1): Don't check mem regions for
     16        os->ignored sections.
     17
    1182006-06-12  Fred Fish  <fnf@specifix.com>
    219
    320        * emulparams/elf32bmip.sh (OTHER_SECTIONS): Keep the
  • ld/ldcref.c

    diff -Naur binutils-2.17/ld/ldcref.c src/ld/ldcref.c
    old new  
    2727#include "sysdep.h"
    2828#include "bfdlink.h"
    2929#include "libiberty.h"
     30#include "objalloc.h"
    3031
    3132#include "ld.h"
    3233#include "ldmain.h"
     
    101102
    102103static size_t cref_symcount;
    103104
     105/* Used to take a snapshot of the cref hash table when starting to
     106   add syms from an as-needed library.  */
     107static struct bfd_hash_entry **old_table;
     108static unsigned int old_size;
     109static void *old_tab;
     110static void *alloc_mark;
     111static size_t tabsize, entsize, refsize;
     112static size_t old_symcount;
     113
    104114/* Create an entry in a cref hash table.  */
    105115
    106116static struct bfd_hash_entry *
     
    165175
    166176  if (r == NULL)
    167177    {
    168       r = xmalloc (sizeof *r);
     178      r = bfd_hash_allocate (&cref_table.root, sizeof *r);
     179      if (r == NULL)
     180        einfo (_("%X%P: cref alloc failed: %E\n"));
    169181      r->next = h->refs;
    170182      h->refs = r;
    171183      r->abfd = abfd;
     
    182194    r->def = TRUE;
    183195}
    184196
     197/* Called before loading an as-needed library to take a snapshot of
     198   the cref hash table, and after we have loaded or found that the
     199   library was not needed.  */
     200
     201bfd_boolean
     202handle_asneeded_cref (bfd *abfd ATTRIBUTE_UNUSED,
     203                      enum notice_asneeded_action act)
     204{
     205  unsigned int i;
     206
     207  if (!cref_initialized)
     208    return TRUE;
     209
     210  if (act == notice_as_needed)
     211    {
     212      char *old_ent, *old_ref;
     213
     214      for (i = 0; i < cref_table.root.size; i++)
     215        {
     216          struct bfd_hash_entry *p;
     217          struct cref_hash_entry *c;
     218          struct cref_ref *r;
     219
     220          for (p = cref_table.root.table[i]; p != NULL; p = p->next)
     221            {
     222              entsize += cref_table.root.entsize;
     223              c = (struct cref_hash_entry *) p;
     224              for (r = c->refs; r != NULL; r = r->next)
     225                refsize += sizeof (struct cref_hash_entry);
     226            }
     227        }
     228
     229      tabsize = cref_table.root.size * sizeof (struct bfd_hash_entry *);
     230      old_tab = xmalloc (tabsize + entsize + refsize);
     231
     232      alloc_mark = bfd_hash_allocate (&cref_table.root, 1);
     233      if (alloc_mark == NULL)
     234        return FALSE;
     235
     236      memcpy (old_tab, cref_table.root.table, tabsize);
     237      old_ent = (char *) old_tab + tabsize;
     238      old_ref = (char *) old_ent + entsize;
     239      old_table = cref_table.root.table;
     240      old_size = cref_table.root.size;
     241      old_symcount = cref_symcount;
     242
     243      for (i = 0; i < cref_table.root.size; i++)
     244        {
     245          struct bfd_hash_entry *p;
     246          struct cref_hash_entry *c;
     247          struct cref_ref *r;
     248
     249          for (p = cref_table.root.table[i]; p != NULL; p = p->next)
     250            {
     251              memcpy (old_ent, p, cref_table.root.entsize);
     252              old_ent = (char *) old_ent + cref_table.root.entsize;
     253              c = (struct cref_hash_entry *) p;
     254              for (r = c->refs; r != NULL; r = r->next)
     255                {
     256                  memcpy (old_ref, r, sizeof (struct cref_hash_entry));
     257                  old_ref = (char *) old_ref + sizeof (struct cref_hash_entry);
     258                }
     259            }
     260        }
     261      return TRUE;
     262    }
     263
     264  if (act == notice_not_needed)
     265    {
     266      char *old_ent, *old_ref;
     267
     268      if (old_tab == NULL)
     269        {
     270          /* The only way old_tab can be NULL is if the cref hash table
     271             had not been initialised when notice_as_needed.  */
     272          bfd_hash_table_free (&cref_table.root);
     273          cref_initialized = FALSE;
     274          return TRUE;
     275        }
     276
     277      old_ent = (char *) old_tab + tabsize;
     278      old_ref = (char *) old_ent + entsize;
     279      cref_table.root.table = old_table;
     280      cref_table.root.size = old_size;
     281      memcpy (cref_table.root.table, old_tab, tabsize);
     282      cref_symcount = old_symcount;
     283
     284      for (i = 0; i < cref_table.root.size; i++)
     285        {
     286          struct bfd_hash_entry *p;
     287          struct cref_hash_entry *c;
     288          struct cref_ref *r;
     289
     290          for (p = cref_table.root.table[i]; p != NULL; p = p->next)
     291            {
     292              memcpy (p, old_ent, cref_table.root.entsize);
     293              old_ent = (char *) old_ent + cref_table.root.entsize;
     294              c = (struct cref_hash_entry *) p;
     295              for (r = c->refs; r != NULL; r = r->next)
     296                {
     297                  memcpy (r, old_ref, sizeof (struct cref_hash_entry));
     298                  old_ref = (char *) old_ref + sizeof (struct cref_hash_entry);
     299                }
     300            }
     301        }
     302
     303      objalloc_free_block ((struct objalloc *) cref_table.root.memory,
     304                           alloc_mark);
     305    }
     306  else if (act != notice_needed)
     307    return FALSE;
     308
     309  free (old_tab);
     310  old_tab = NULL;
     311  return TRUE;
     312}
     313
    185314/* Copy the addresses of the hash table entries into an array.  This
    186315   is called via cref_hash_traverse.  We also fill in the demangled
    187316   name.  */
  • ld/ld.h

    diff -Naur binutils-2.17/ld/ld.h src/ld/ld.h
    old new  
    11/* ld.h -- general linker header file
    22   Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
    3    2001, 2002, 2003, 2004, 2005
     3   2001, 2002, 2003, 2004, 2005, 2006
    44   Free Software Foundation, Inc.
    55
    66   This file is part of GLD, the Gnu Linker.
     
    282282
    283283extern int yyparse (void);
    284284extern void add_cref (const char *, bfd *, asection *, bfd_vma);
     285extern bfd_boolean handle_asneeded_cref (bfd *, enum notice_asneeded_action);
    285286extern void output_cref (FILE *);
    286287extern void check_nocrossrefs (void);
    287288extern void ld_abort (const char *, int, const char *) ATTRIBUTE_NORETURN;
  • ld/ldlang.c

    diff -Naur binutils-2.17/ld/ldlang.c src/ld/ldlang.c
    old new  
    42074207                    /* If a loadable section is using the default memory
    42084208                       region, and some non default memory regions were
    42094209                       defined, issue an error message.  */
    4210                     if (!IGNORE_SECTION (os->bfd_section)
     4210                    if (!os->ignored
     4211                        && !IGNORE_SECTION (os->bfd_section)
    42114212                        && ! link_info.relocatable
    42124213                        && check_regions
    42134214                        && strcmp (os->region->name,
  • ld/ldmain.c

    diff -Naur binutils-2.17/ld/ldmain.c src/ld/ldmain.c
    old new  
    15111511        asection *section,
    15121512        bfd_vma value)
    15131513{
     1514  if (name == NULL)
     1515    {
     1516      if (command_line.cref || nocrossref_list != NULL)
     1517        return handle_asneeded_cref (abfd, value);
     1518      return TRUE;
     1519    }
     1520
    15141521  if (! info->notice_all
    15151522      || (info->notice_hash != NULL
    15161523          && bfd_hash_lookup (info->notice_hash, name, FALSE, FALSE) != NULL))
  • ld/testsuite/ChangeLog

    diff -Naur binutils-2.17/ld/testsuite/ChangeLog src/ld/testsuite/ChangeLog
    old new  
     12006-07-12  Richard Sandiford  <richard@codesourcery.com>
     2
     3        * ld-m68k/merge-ok-1c.d: New test.
     4        * ld-m68k/m68k.exp: Run it.
     5
     62006-07-04  Daniel Jacobowitz  <dan@codesourcery.com>
     7
     8        Backport:
     9        2006-05-19  Alan Modra  <amodra@bigpond.net.au>
     10        * ld-scripts/empty-orphan.d: Update again.
     11
     12        * ld-scripts/empty-orphan.t: Discard .reginfo.
     13        * ld-scripts/empty-orphan.d: Update.
     14
    1152006-06-12  Daniel Jacobowitz  <dan@codesourcery.com>
    216
    317        Backport:
  • ld/testsuite/ld-m68k/m68k.exp

    diff -Naur binutils-2.17/ld/testsuite/ld-m68k/m68k.exp src/ld/testsuite/ld-m68k/m68k.exp
    old new  
    5353run_dump_test "merge-error-1e"
    5454run_dump_test "merge-ok-1a"
    5555run_dump_test "merge-ok-1b"
     56run_dump_test "merge-ok-1c"
  • ld/testsuite/ld-m68k/merge-ok-1c.d

    diff -Naur binutils-2.17/ld/testsuite/ld-m68k/merge-ok-1c.d src/ld/testsuite/ld-m68k/merge-ok-1c.d
    old new  
     1#source: merge-error-1a.s -march=cpu32
     2#source: merge-error-1b.s -march=cpu32
     3#ld: -r
     4#objdump: -p
     5#...
     6private flags = 810000: \[cpu32\]
  • ld/testsuite/ld-scripts/empty-orphan.d

    diff -Naur binutils-2.17/ld/testsuite/ld-scripts/empty-orphan.d src/ld/testsuite/ld-scripts/empty-orphan.d
    old new  
    11#source: empty-orphan.s
    22#ld: -T empty-orphan.t
    3 #error: no memory region specified for loadable section
     3#readelf: -l --wide
     4#...
     5 +LOAD +[x0-9a-f]+ [x0]+70000000 [x0]+70000000 [x0]+(2|4|8|10|20|40|80) .*
     6#pass
  • ld/testsuite/ld-scripts/empty-orphan.t

    diff -Naur binutils-2.17/ld/testsuite/ld-scripts/empty-orphan.t src/ld/testsuite/ld-scripts/empty-orphan.t
    old new  
    1717   .text : { *(.text) } > text_mem : text_phdr
    1818   .data : { *(.data) } > data_mem : data_phdr
    1919   .bss : { *(.bss) } > data_mem : data_phdr
     20   /DISCARD/ : { *(.reginfo) }
    2021   /* .orphan_data is an orphan */
    2122}
Note: See TracBrowser for help on using the repository browser.