source:
clfs-sysroot/patches/binutils-2.17-branch_update-1.patch@
820590f
Last change on this file since 820590f was 16ca464, checked in by , 18 years ago | |
---|---|
|
|
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 643 643 DYN_NO_NEEDED = 8 644 644 }; 645 645 646 enum notice_asneeded_action { 647 notice_as_needed, 648 notice_not_needed, 649 notice_needed 650 }; 651 646 652 extern bfd_boolean bfd_elf_record_link_assignment 647 653 (bfd *, struct bfd_link_info *, const char *, bfd_boolean, 648 654 bfd_boolean); -
bfd/bfd-in.h
diff -Naur binutils-2.17/bfd/bfd-in.h src/bfd/bfd-in.h
old new 636 636 DYN_NO_NEEDED = 8 637 637 }; 638 638 639 enum notice_asneeded_action { 640 notice_as_needed, 641 notice_not_needed, 642 notice_needed 643 }; 644 639 645 extern bfd_boolean bfd_elf_record_link_assignment 640 646 (bfd *, struct bfd_link_info *, const char *, bfd_boolean, 641 647 bfd_boolean); -
bfd/ChangeLog
diff -Naur binutils-2.17/bfd/ChangeLog src/bfd/ChangeLog
old new 1 2006-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 7 2006-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 14 2006-07-12 Matthew R. Dempsky <mrd@alkemio.org> 15 16 * cpu-m68k.c (bfd_m68k_compatible): Handle CPU32. 17 18 2006-06-23 Daniel Jacobowitz <dan@codesourcery.com> 19 20 * Makefile.am: Clear RELEASE. 21 * Makefile.in: Regenerated. 22 1 23 2006-06-23 Daniel Jacobowitz <dan@codesourcery.com> 2 24 3 25 * configure.in: Update version to 2.17. -
bfd/coffcode.h
diff -Naur binutils-2.17/bfd/coffcode.h src/bfd/coffcode.h
old new 1546 1546 static bfd_boolean 1547 1547 coff_new_section_hook (bfd * abfd, asection * section) 1548 1548 { 1549 combined_entry_type *native;1550 bfd_size_type amt;1551 1552 1549 section->alignment_power = COFF_DEFAULT_SECTION_ALIGNMENT_POWER; 1553 1550 1554 1551 #ifdef RS6000COFF_C … … 1560 1557 section->alignment_power = bfd_xcoff_data_align_power (abfd); 1561 1558 #endif 1562 1559 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; 1581 1576 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; 1583 1584 1585 coffsymbol (section->symbol)->native = native; 1586 } 1587 1584 1588 coff_set_custom_section_alignment (abfd, section, 1585 1589 coff_section_alignment_table, 1586 1590 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 202 202 if (a->mach <= bfd_mach_m68060 && b->mach <= bfd_mach_m68060) 203 203 /* Merge m68k machine. */ 204 204 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; 205 208 else if (a->mach >= bfd_mach_mcf_isa_a_nodiv 206 209 && b->mach >= bfd_mach_mcf_isa_a_nodiv) 207 210 { -
bfd/elflink.c
diff -Naur binutils-2.17/bfd/elflink.c src/bfd/elflink.c
old new 3496 3496 if (alloc_mark == NULL) 3497 3497 goto error_free_vers; 3498 3498 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 3499 3506 /* Clone the symbol table and sym hashes. Remember some 3500 3507 pointers into the symbol table, and dynamic symbol count. */ 3501 3508 old_hash = (char *) old_tab + tabsize; … … 4169 4176 } 4170 4177 } 4171 4178 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 4172 4185 free (old_tab); 4173 4186 objalloc_free_block ((struct objalloc *) htab->root.table.memory, 4174 4187 alloc_mark); … … 4179 4192 4180 4193 if (old_tab != NULL) 4181 4194 { 4195 if (!(*info->callbacks->notice) (info, NULL, abfd, NULL, 4196 notice_needed)) 4197 return FALSE; 4182 4198 free (old_tab); 4183 4199 old_tab = NULL; 4184 4200 } -
bfd/Makefile.am
diff -Naur binutils-2.17/bfd/Makefile.am src/bfd/Makefile.am
old new 3 3 AUTOMAKE_OPTIONS = 1.9 cygnus 4 4 5 5 # Uncomment the following line when doing a release. 6 RELEASE=y6 # RELEASE=y 7 7 8 8 INCDIR = $(srcdir)/../include 9 9 CSEARCH = -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 2006 06231 #define BFD_VERSION_DATE 20061204 2 2 #define BFD_VERSION @bfd_version@ 3 3 #define BFD_VERSION_STRING @bfd_version_string@ -
binutils/ChangeLog
diff -Naur binutils-2.17/binutils/ChangeLog src/binutils/ChangeLog
old new 1 2006-08-15 Nick Clifton <nickc@redhat.com> 2 3 PR binutils/3039 4 * wrstabs.c (stab_tag_type): Initialize 'size'. 5 1 6 2006-06-07 Joseph S. Myers <joseph@codesourcery.com> 2 7 3 8 * 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 1869 1869 { 1870 1870 struct stab_write_handle *info = (struct stab_write_handle *) p; 1871 1871 long index; 1872 unsigned int size ;1872 unsigned int size = 0; 1873 1873 1874 1874 index = stab_get_struct_index (info, name, id, kind, &size); 1875 1875 if (index < 0) -
configure.in
diff -Naur binutils-2.17/configure.in src/configure.in
old new 130 130 # know that we are building the simulator. 131 131 # binutils, gas and ld appear in that order because it makes sense to run 132 132 # "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"133 host_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" 134 134 135 135 # libgcj represents the runtime libraries only used by gcj. 136 136 libgcj="target-libffi \ -
gas/ChangeLog
diff -Naur binutils-2.17/gas/ChangeLog src/gas/ChangeLog
old new 1 2006-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 1 6 2006-06-07 Joseph S. Myers <joseph@codesourcery.com> 2 7 3 8 * 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 928 928 && seg_right != undefined_section) 929 929 { 930 930 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)); 934 933 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)); 938 936 } 939 937 } 940 938 } -
ld/ChangeLog
diff -Naur binutils-2.17/ld/ChangeLog src/ld/ChangeLog
old new 1 2006-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 11 2006-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 1 18 2006-06-12 Fred Fish <fnf@specifix.com> 2 19 3 20 * emulparams/elf32bmip.sh (OTHER_SECTIONS): Keep the -
ld/ldcref.c
diff -Naur binutils-2.17/ld/ldcref.c src/ld/ldcref.c
old new 27 27 #include "sysdep.h" 28 28 #include "bfdlink.h" 29 29 #include "libiberty.h" 30 #include "objalloc.h" 30 31 31 32 #include "ld.h" 32 33 #include "ldmain.h" … … 101 102 102 103 static size_t cref_symcount; 103 104 105 /* Used to take a snapshot of the cref hash table when starting to 106 add syms from an as-needed library. */ 107 static struct bfd_hash_entry **old_table; 108 static unsigned int old_size; 109 static void *old_tab; 110 static void *alloc_mark; 111 static size_t tabsize, entsize, refsize; 112 static size_t old_symcount; 113 104 114 /* Create an entry in a cref hash table. */ 105 115 106 116 static struct bfd_hash_entry * … … 165 175 166 176 if (r == NULL) 167 177 { 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")); 169 181 r->next = h->refs; 170 182 h->refs = r; 171 183 r->abfd = abfd; … … 182 194 r->def = TRUE; 183 195 } 184 196 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 201 bfd_boolean 202 handle_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 185 314 /* Copy the addresses of the hash table entries into an array. This 186 315 is called via cref_hash_traverse. We also fill in the demangled 187 316 name. */ -
ld/ld.h
diff -Naur binutils-2.17/ld/ld.h src/ld/ld.h
old new 1 1 /* ld.h -- general linker header file 2 2 Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 3 2001, 2002, 2003, 2004, 2005 3 2001, 2002, 2003, 2004, 2005, 2006 4 4 Free Software Foundation, Inc. 5 5 6 6 This file is part of GLD, the Gnu Linker. … … 282 282 283 283 extern int yyparse (void); 284 284 extern void add_cref (const char *, bfd *, asection *, bfd_vma); 285 extern bfd_boolean handle_asneeded_cref (bfd *, enum notice_asneeded_action); 285 286 extern void output_cref (FILE *); 286 287 extern void check_nocrossrefs (void); 287 288 extern 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 4207 4207 /* If a loadable section is using the default memory 4208 4208 region, and some non default memory regions were 4209 4209 defined, issue an error message. */ 4210 if (!IGNORE_SECTION (os->bfd_section) 4210 if (!os->ignored 4211 && !IGNORE_SECTION (os->bfd_section) 4211 4212 && ! link_info.relocatable 4212 4213 && check_regions 4213 4214 && strcmp (os->region->name, -
ld/ldmain.c
diff -Naur binutils-2.17/ld/ldmain.c src/ld/ldmain.c
old new 1511 1511 asection *section, 1512 1512 bfd_vma value) 1513 1513 { 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 1514 1521 if (! info->notice_all 1515 1522 || (info->notice_hash != NULL 1516 1523 && 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 1 2006-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 6 2006-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 1 15 2006-06-12 Daniel Jacobowitz <dan@codesourcery.com> 2 16 3 17 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 53 53 run_dump_test "merge-error-1e" 54 54 run_dump_test "merge-ok-1a" 55 55 run_dump_test "merge-ok-1b" 56 run_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 #... 6 private 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 1 1 #source: empty-orphan.s 2 2 #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 17 17 .text : { *(.text) } > text_mem : text_phdr 18 18 .data : { *(.data) } > data_mem : data_phdr 19 19 .bss : { *(.bss) } > data_mem : data_phdr 20 /DISCARD/ : { *(.reginfo) } 20 21 /* .orphan_data is an orphan */ 21 22 }
Note:
See TracBrowser
for help on using the repository browser.