diff options
author | Alan Modra <amodra@bigpond.net.au> | 2011-02-01 12:25:31 +0000 |
---|---|---|
committer | Alan Modra <amodra@bigpond.net.au> | 2011-02-01 12:25:31 +0000 |
commit | f5fd623673f7fbd576382a237c4ef0a5c48a371b (patch) | |
tree | 826c396b88bbbe429049187a8362d1631e821016 /bfd | |
parent | 12f8145b2baf1fbd752d8629d390c671cf4965d5 (diff) | |
download | binutils-redhat-f5fd623673f7fbd576382a237c4ef0a5c48a371b.tar.gz |
backport from mainline
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 93 | ||||
-rw-r--r-- | bfd/Makefile.am | 2 | ||||
-rw-r--r-- | bfd/Makefile.in | 3 | ||||
-rw-r--r-- | bfd/aoutx.h | 43 | ||||
-rw-r--r-- | bfd/bfd-in.h | 4 | ||||
-rw-r--r-- | bfd/bfd-in2.h | 7 | ||||
-rw-r--r-- | bfd/bfd.c | 5 | ||||
-rw-r--r-- | bfd/coff-i860.c | 4 | ||||
-rw-r--r-- | bfd/coff-ppc.c | 16 | ||||
-rw-r--r-- | bfd/coff-sh.c | 5 | ||||
-rw-r--r-- | bfd/cofflink.c | 47 | ||||
-rw-r--r-- | bfd/compress.c | 127 | ||||
-rw-r--r-- | bfd/ecoff.c | 25 | ||||
-rw-r--r-- | bfd/elf-attrs.c | 4 | ||||
-rw-r--r-- | bfd/elf-eh-frame.c | 34 | ||||
-rw-r--r-- | bfd/elf.c | 35 | ||||
-rw-r--r-- | bfd/elf32-bfin.c | 9 | ||||
-rw-r--r-- | bfd/elf32-dlx.c | 12 | ||||
-rw-r--r-- | bfd/elf32-mep.c | 9 | ||||
-rw-r--r-- | bfd/elf32-v850.c | 4 | ||||
-rw-r--r-- | bfd/elf64-hppa.c | 7 | ||||
-rw-r--r-- | bfd/elflink.c | 54 | ||||
-rw-r--r-- | bfd/elfxx-ia64.c | 7 | ||||
-rw-r--r-- | bfd/elfxx-mips.c | 7 | ||||
-rw-r--r-- | bfd/hash.c | 58 | ||||
-rw-r--r-- | bfd/libbfd.c | 4 | ||||
-rw-r--r-- | bfd/linker.c | 22 | ||||
-rw-r--r-- | bfd/mach-o.c | 55 | ||||
-rw-r--r-- | bfd/pdp11.c | 35 | ||||
-rw-r--r-- | bfd/pef.c | 8 | ||||
-rw-r--r-- | bfd/plugin.c | 1 | ||||
-rw-r--r-- | bfd/po/SRC-POTFILES.in | 1 | ||||
-rw-r--r-- | bfd/po/bfd.pot | 596 | ||||
-rw-r--r-- | bfd/section.c | 23 | ||||
-rw-r--r-- | bfd/som.c | 3 | ||||
-rw-r--r-- | bfd/vms-alpha.c | 11 | ||||
-rw-r--r-- | bfd/xcofflink.c | 30 |
37 files changed, 883 insertions, 527 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 5eb0e1e1be..2ca6bc60cd 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,98 @@ 2011-02-01 Alan Modra <amodra@gmail.com> + Backport from mainline + 2011-01-22 Richard Sandiford <rdsandiford@googlemail.com> + * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Ignore + common sections too. + + 2011-01-14 Alan Modra <amodra@gmail.com> + * bfd.c (bfd_perror): Flush stdout before and stderr after printing + error. + (_bfd_default_error_handler): Likewise. + * elf.c (print_segment_map): Likewise. + * libbfd.c (warn_deprecated): Likewise. + * som.c (som_sizeof_headers): No need to do so here. + * coff-i860.c: Replace use of printf for error messages with + _bfd_error_handler. + * coff-ppc.c: Likewise. + * coff-sh.c: Likewise. + * elf32-bfin.c: Likewise. + * elf32-dlx.c: Likewise. + * elf32-mep.c: Likewise. + * elf32-v850.c: Likewise. + * mach-o.c: Likewise. + * pef.c: Likewise. + + 2010-12-24 Alan Modra <amodra@gmail.com> + * compress.c (decompress_contents): Style. + (bfd_get_full_section_contents): Do not decompress directly into + caller buffer or directly return cached section contents. + Check malloc return for compressed_buffer. + + 2010-12-13 Alan Modra <amodra@gmail.com> + * aoutx.h (aout_link_check_ar_symbols): Formatting. + * cofflink.c (coff_link_check_ar_symbols): Likewise. + * elflink.c (elf_link_add_archive_symbols): Likewise. + * pdp11.c (aout_link_check_ar_symbols): Likewise. + * xcofflink.c (xcoff_link_check_dynamic_ar_symbols, + xcoff_link_check_dynamic_ar_symbols): Likewise. + * aoutx.h (aout_link_check_archive_element): Simplify code dealing + with add_archive_element substitute BFD. + * cofflink.c (coff_link_check_archive_element): Likewise. + * ecoff.c (ecoff_link_check_archive_element): Likewise. + (ecoff_link_add_archive_symbols): Likewise. + * linker.c (generic_link_check_archive_element): Likewise. + * pdp11.c (aout_link_check_archive_element): Likewise. + * vms-alpha.c (alpha_vms_link_add_archive_symbols): Likewise. + * xcofflink.c (xcoff_link_check_archive_element): Likewise. + * aoutx.h (aout_link_check_archive_element): Free symbols from old + bfd if !keep_memory. + * cofflink.c (coff_link_check_archive_element): Likewise. + * pdp11.c (aout_link_check_archive_element): Likewise. + * xcofflink.c (xcoff_link_check_archive_element): Likewise. + + 2010-12-12 H.J. Lu <hongjiu.lu@intel.com> + * elflink.c (elf_link_add_archive_symbols): Remove subsbfd. + + 2010-12-06 Dmitry Gorbachev <d.g.gorbachev@gmail.com> + PR ld/12288 + * plugin.c (message): Add putchar for the trailing `\n'. + + 2010-12-04 Alan Modra <amodra@gmail.com> + PR ld/12277 + * elflink.c (elf_link_output_extsym): Set bfd_error on symbol + and section errors. Allow better translation of error messages. + + 2010-11-24 Joel Brobecker <brobecker@adacore.com> + * Makefile.am (OPTIONAL_BACKENDS): Add rs6000-core.lo. + (OPTIONAL_BACKENDS_CFILES): Add rs6000-core.c. + * Makefile.in: Regenerate. + + 2010-11-24 Alan Modra <amodra@gmail.com> + PR ld/12253 + * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Correct + DW_EH_PE_datarel handling. Truncate .eh_frame_hdr address to + ptr_size. + + 2010-11-08 Alan Modra <amodra@gmail.com> + * hash.c (bfd_hash_hash): Extract from.. + (bfd_hash_lookup): ..here. + (bfd_hash_rename): New function. + * section.c (bfd_rename_section): New function. + * bfd-in.h (bfd_hash_rename): Declare. + * bfd-in2.h: Regenerate. + * elf.c (_bfd_elf_make_section_from_shdr): Rename input sections + when compressing or decompressing. Don't assert name match. + * elf64-hppa.c (get_reloc_section): Don't assert name match. + * elfxx-ia64.c (get_reloc_section): Likewise. + + 2010-11-05 Joseph Myers <joseph@codesourcery.com> + * elf-attrs.c (_bfd_elf_merge_unknown_attribute_low, + _bfd_elf_merge_unknown_attribute_list): Correct test for matching + string attributes. + +2011-02-01 Alan Modra <amodra@gmail.com> + * elf64-ppc.c (ppc64_elf_next_input_section): Use elf_gp value for toc pointer on any section having makes_toc_func_call set. (check_pasted_section): Ensure pasted .init/.fini fragments use diff --git a/bfd/Makefile.am b/bfd/Makefile.am index 343125374a..9c454cc1c8 100644 --- a/bfd/Makefile.am +++ b/bfd/Makefile.am @@ -653,6 +653,7 @@ OPTIONAL_BACKENDS = \ irix-core.lo \ lynx-core.lo \ osf-core.lo \ + rs6000-core.lo \ sco5-core.lo \ trad-core.lo @@ -663,6 +664,7 @@ OPTIONAL_BACKENDS_CFILES = \ irix-core.c \ lynx-core.c \ osf-core.c \ + rs6000-core.c \ sco5-core.c \ trad-core.c diff --git a/bfd/Makefile.in b/bfd/Makefile.in index 183ae9691a..2cbf6a0e46 100644 --- a/bfd/Makefile.in +++ b/bfd/Makefile.in @@ -954,6 +954,7 @@ OPTIONAL_BACKENDS = \ irix-core.lo \ lynx-core.lo \ osf-core.lo \ + rs6000-core.lo \ sco5-core.lo \ trad-core.lo @@ -964,6 +965,7 @@ OPTIONAL_BACKENDS_CFILES = \ irix-core.c \ lynx-core.c \ osf-core.c \ + rs6000-core.c \ sco5-core.c \ trad-core.c @@ -1464,6 +1466,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reloc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reloc16.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/riscix.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rs6000-core.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sco5-core.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/section.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simple.Plo@am__quote@ diff --git a/bfd/aoutx.h b/bfd/aoutx.h index efa9d47431..7ca221ecd6 100644 --- a/bfd/aoutx.h +++ b/bfd/aoutx.h @@ -3305,8 +3305,8 @@ aout_link_check_ar_symbols (bfd *abfd, continue; } - if (! (*info->callbacks->add_archive_element) - (info, abfd, name, subsbfd)) + if (!(*info->callbacks + ->add_archive_element) (info, abfd, name, subsbfd)) return FALSE; *pneeded = TRUE; return TRUE; @@ -3333,8 +3333,8 @@ aout_link_check_ar_symbols (bfd *abfd, outside BFD. We assume that we should link in the object file. This is done for the -u option in the linker. */ - if (! (*info->callbacks->add_archive_element) - (info, abfd, name, subsbfd)) + if (!(*info->callbacks + ->add_archive_element) (info, abfd, name, subsbfd)) return FALSE; *pneeded = TRUE; return TRUE; @@ -3343,8 +3343,8 @@ aout_link_check_ar_symbols (bfd *abfd, symbol. It is already on the undefs list. */ h->type = bfd_link_hash_common; h->u.c.p = (struct bfd_link_hash_common_entry *) - bfd_hash_allocate (&info->hash->table, - sizeof (struct bfd_link_hash_common_entry)); + bfd_hash_allocate (&info->hash->table, + sizeof (struct bfd_link_hash_common_entry)); if (h->u.c.p == NULL) return FALSE; @@ -3382,8 +3382,8 @@ aout_link_check_ar_symbols (bfd *abfd, it if the current link symbol is common. */ if (h->type == bfd_link_hash_undefined) { - if (! (*info->callbacks->add_archive_element) - (info, abfd, name, subsbfd)) + if (!(*info->callbacks + ->add_archive_element) (info, abfd, name, subsbfd)) return FALSE; *pneeded = TRUE; return TRUE; @@ -3404,27 +3404,36 @@ aout_link_check_archive_element (bfd *abfd, struct bfd_link_info *info, bfd_boolean *pneeded) { - bfd *subsbfd = NULL; + bfd *oldbfd; + bfd_boolean needed; - if (! aout_get_external_symbols (abfd)) + if (!aout_get_external_symbols (abfd)) return FALSE; - if (! aout_link_check_ar_symbols (abfd, info, pneeded, &subsbfd)) + oldbfd = abfd; + if (!aout_link_check_ar_symbols (abfd, info, pneeded, &abfd)) return FALSE; - if (*pneeded) + needed = *pneeded; + if (needed) { /* Potentially, the add_archive_element hook may have set a substitute BFD for us. */ - if (subsbfd && !aout_get_external_symbols (subsbfd)) - return FALSE; - if (! aout_link_add_symbols (subsbfd ? subsbfd : abfd, info)) + if (abfd != oldbfd) + { + if (!info->keep_memory + && !aout_link_free_symbols (oldbfd)) + return FALSE; + if (!aout_get_external_symbols (abfd)) + return FALSE; + } + if (!aout_link_add_symbols (abfd, info)) return FALSE; } - if (! info->keep_memory || ! *pneeded) + if (!info->keep_memory || !needed) { - if (! aout_link_free_symbols (abfd)) + if (!aout_link_free_symbols (abfd)) return FALSE; } diff --git a/bfd/bfd-in.h b/bfd/bfd-in.h index cfa5225325..63fcdc9bb4 100644 --- a/bfd/bfd-in.h +++ b/bfd/bfd-in.h @@ -404,6 +404,10 @@ extern struct bfd_hash_entry *bfd_hash_lookup extern struct bfd_hash_entry *bfd_hash_insert (struct bfd_hash_table *, const char *, unsigned long); +/* Rename an entry in a hash table. */ +extern void bfd_hash_rename + (struct bfd_hash_table *, const char *, struct bfd_hash_entry *); + /* Replace an entry in a hash table. */ extern void bfd_hash_replace (struct bfd_hash_table *, struct bfd_hash_entry *old, diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h index c6a54b5acb..f3e2b45791 100644 --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -411,6 +411,10 @@ extern struct bfd_hash_entry *bfd_hash_lookup extern struct bfd_hash_entry *bfd_hash_insert (struct bfd_hash_table *, const char *, unsigned long); +/* Rename an entry in a hash table. */ +extern void bfd_hash_rename + (struct bfd_hash_table *, const char *, struct bfd_hash_entry *); + /* Replace an entry in a hash table. */ extern void bfd_hash_replace (struct bfd_hash_table *, struct bfd_hash_entry *old, @@ -1713,6 +1717,9 @@ asection *bfd_make_section (bfd *, const char *name); bfd_boolean bfd_set_section_flags (bfd *abfd, asection *sec, flagword flags); +void bfd_rename_section + (bfd *abfd, asection *sec, const char *newname); + void bfd_map_over_sections (bfd *abfd, void (*func) (bfd *abfd, asection *sect, void *obj), @@ -1,6 +1,6 @@ /* Generic BFD library interface and support routines. Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 + 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. Written by Cygnus Support. @@ -523,10 +523,12 @@ DESCRIPTION void bfd_perror (const char *message) { + fflush (stdout); if (message == NULL || *message == '\0') fprintf (stderr, "%s\n", bfd_errmsg (bfd_get_error ())); else fprintf (stderr, "%s: %s\n", message, bfd_errmsg (bfd_get_error ())); + fflush (stderr); } /* @@ -723,6 +725,7 @@ _bfd_default_error_handler (const char *fmt, ...) va_end (ap); putc ('\n', stderr); + fflush (stderr); } /* This is a function pointer to the routine which should handle BFD diff --git a/bfd/coff-i860.c b/bfd/coff-i860.c index b7ada16474..d50b070eff 100644 --- a/bfd/coff-i860.c +++ b/bfd/coff-i860.c @@ -1,6 +1,6 @@ /* BFD back-end for Intel i860 COFF files. Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1999, 2000, 2001, 2002, - 2003, 2004, 2005, 2007, 2008, 2010 Free Software Foundation, Inc. + 2003, 2004, 2005, 2007, 2008, 2010, 2011 Free Software Foundation, Inc. Created mostly by substituting "860" for "386" in coff-i386.c Harry Dolan <dolan@ssd.intel.com>, October 1995 @@ -144,7 +144,7 @@ coff_i860_reloc_nyi (bfd *abfd ATTRIBUTE_UNUSED, char **error_message ATTRIBUTE_UNUSED) { reloc_howto_type *howto = reloc_entry->howto; - fprintf (stderr, _("Relocation `%s' not yet implemented\n"), howto->name); + (*_bfd_error_handler) (_("relocation `%s' not yet implemented"), howto->name); return bfd_reloc_notsupported; } diff --git a/bfd/coff-ppc.c b/bfd/coff-ppc.c index 06eed247c3..69e10d8c66 100644 --- a/bfd/coff-ppc.c +++ b/bfd/coff-ppc.c @@ -1,6 +1,6 @@ /* BFD back-end for PowerPC Microsoft Portable Executable files. Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 + 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. Original version pieced together by Kim Knuttila (krk@cygnus.com) @@ -1843,10 +1843,9 @@ ppc_coff_rtype2howto (relent, internal) howto = ppc_coff_howto_table + IMAGE_REL_PPC_TOCREL16; break; default: - fprintf (stderr, - _("Warning: Unsupported reloc %s [%d] used -- it may not work.\n"), - ppc_coff_howto_table[r_type].name, - r_type); + (*_bfd_error_handler) (_("warning: unsupported reloc %s [%d] used -- it may not work"), + ppc_coff_howto_table[r_type].name, + r_type); howto = ppc_coff_howto_table + r_type; break; } @@ -1916,10 +1915,9 @@ coff_ppc_rtype_to_howto (abfd, sec, rel, h, sym, addendp) howto = ppc_coff_howto_table + r_type; break; default: - fprintf (stderr, - _("Warning: Unsupported reloc %s [%d] used -- it may not work.\n"), - ppc_coff_howto_table[r_type].name, - r_type); + (*_bfd_error_handler) (_("warning: unsupported reloc %s [%d] used -- it may not work"), + ppc_coff_howto_table[r_type].name, + r_type); howto = ppc_coff_howto_table + r_type; break; } diff --git a/bfd/coff-sh.c b/bfd/coff-sh.c index 28ac0aba46..b77af7c394 100644 --- a/bfd/coff-sh.c +++ b/bfd/coff-sh.c @@ -1,6 +1,7 @@ /* BFD back-end for Renesas Super-H COFF binaries. Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, - 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. + 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2011 + Free Software Foundation, Inc. Contributed by Cygnus Support. Written by Steve Chamberlain, <sac@cygnus.com>. Relaxing code written by Ian Lance Taylor, <ian@cygnus.com>. @@ -517,7 +518,7 @@ sh_coff_reloc_type_lookup (abfd, code) if (sh_reloc_map[i].bfd_reloc_val == code) return &sh_coff_howtos[(int) sh_reloc_map[i].shcoff_reloc_val]; - fprintf (stderr, "SH Error: unknown reloc type %d\n", code); + (*_bfd_error_handler) (_("SH Error: unknown reloc type %d"), code); return NULL; } diff --git a/bfd/cofflink.c b/bfd/cofflink.c index a28d396919..33de7fe3cc 100644 --- a/bfd/cofflink.c +++ b/bfd/cofflink.c @@ -244,8 +244,8 @@ coff_link_check_ar_symbols (bfd *abfd, if (h != (struct bfd_link_hash_entry *) NULL && h->type == bfd_link_hash_undefined) { - if (! (*info->callbacks->add_archive_element) - (info, abfd, name, subsbfd)) + if (!(*info->callbacks + ->add_archive_element) (info, abfd, name, subsbfd)) return FALSE; *pneeded = TRUE; return TRUE; @@ -269,29 +269,38 @@ coff_link_check_archive_element (bfd *abfd, struct bfd_link_info *info, bfd_boolean *pneeded) { - bfd *subsbfd = NULL; + bfd *oldbfd; + bfd_boolean needed; - if (! _bfd_coff_get_external_symbols (abfd)) - return FALSE; - - if (! coff_link_check_ar_symbols (abfd, info, pneeded, &subsbfd)) - return FALSE; - - /* Potentially, the add_archive_element hook may have set a - substitute BFD for us. */ - if (*pneeded - && subsbfd - && ! _bfd_coff_get_external_symbols (subsbfd)) + if (!_bfd_coff_get_external_symbols (abfd)) return FALSE; - if (*pneeded - && ! coff_link_add_symbols (subsbfd ? subsbfd : abfd, info)) + oldbfd = abfd; + if (!coff_link_check_ar_symbols (abfd, info, pneeded, &abfd)) return FALSE; - if ((! info->keep_memory || ! *pneeded) - && ! _bfd_coff_free_symbols (abfd)) - return FALSE; + needed = *pneeded; + if (needed) + { + /* Potentially, the add_archive_element hook may have set a + substitute BFD for us. */ + if (abfd != oldbfd) + { + if (!info->keep_memory + && !_bfd_coff_free_symbols (oldbfd)) + return FALSE; + if (!_bfd_coff_get_external_symbols (abfd)) + return FALSE; + } + if (!coff_link_add_symbols (abfd, info)) + return FALSE; + } + if (!info->keep_memory || !needed) + { + if (!_bfd_coff_free_symbols (abfd)) + return FALSE; + } return TRUE; } diff --git a/bfd/compress.c b/bfd/compress.c index bdaa3c4751..a526ea99c7 100644 --- a/bfd/compress.c +++ b/bfd/compress.c @@ -59,7 +59,7 @@ decompress_contents (bfd_byte *compressed_buffer, rc = inflateReset (&strm); } rc = inflateEnd (&strm); - return rc != Z_OK || strm.avail_out != 0 ? FALSE: TRUE; + return rc == Z_OK && strm.avail_out == 0; } #endif @@ -157,8 +157,8 @@ bfd_get_full_section_contents (bfd *abfd, sec_ptr sec, bfd_byte **ptr) { bfd_size_type sz = sec->rawsize ? sec->rawsize : sec->size; bfd_byte *p = *ptr; - bfd_boolean need_free, ret; #ifdef HAVE_ZLIB_H + bfd_boolean ret; bfd_size_type compressed_size; bfd_size_type uncompressed_size; bfd_size_type rawsize; @@ -177,88 +177,77 @@ bfd_get_full_section_contents (bfd *abfd, sec_ptr sec, bfd_byte **ptr) p = (bfd_byte *) bfd_malloc (sz); if (p == NULL) return FALSE; - need_free = TRUE; - *ptr = p; } - else - need_free = FALSE; - ret = bfd_get_section_contents (abfd, sec, p, 0, sz); - if (!ret && need_free) - free (p); - return ret; - - case COMPRESS_SECTION_DONE: - if (p) - memcpy (p, sec->contents, sz); - else - *ptr = sec->contents; + if (!bfd_get_section_contents (abfd, sec, p, 0, sz)) + { + if (*ptr != p) + free (p); + return FALSE; + } + *ptr = p; return TRUE; case DECOMPRESS_SECTION_SIZED: - break; - - default: - abort (); - } - #ifndef HAVE_ZLIB_H - bfd_set_error (bfd_error_invalid_operation); - return FALSE; + bfd_set_error (bfd_error_invalid_operation); + return FALSE; #else - /* Read in the full compressed section contents. */ - uncompressed_size = sec->size; - compressed_size = sec->compressed_size; - compressed_buffer = (bfd_byte *) bfd_malloc (compressed_size); - rawsize = sec->rawsize; - /* Clear rawsize, set size to compressed size and set compress_status - to COMPRESS_SECTION_NONE. If the compressed size is bigger than - the uncompressed size, bfd_get_section_contents will fail. */ - sec->rawsize = 0; - sec->size = compressed_size; - sec->compress_status = COMPRESS_SECTION_NONE; - ret = bfd_get_section_contents (abfd, sec, compressed_buffer, - 0, compressed_size); - /* Restore rawsize and size. */ - sec->rawsize = rawsize; - sec->size = uncompressed_size; - if (!ret) - { -fail_compressed: + /* Read in the full compressed section contents. */ + uncompressed_size = sec->size; + compressed_size = sec->compressed_size; + compressed_buffer = (bfd_byte *) bfd_malloc (compressed_size); + if (compressed_buffer == NULL) + return FALSE; + rawsize = sec->rawsize; + /* Clear rawsize, set size to compressed size and set compress_status + to COMPRESS_SECTION_NONE. If the compressed size is bigger than + the uncompressed size, bfd_get_section_contents will fail. */ + sec->rawsize = 0; + sec->size = compressed_size; + sec->compress_status = COMPRESS_SECTION_NONE; + ret = bfd_get_section_contents (abfd, sec, compressed_buffer, + 0, compressed_size); + /* Restore rawsize and size. */ + sec->rawsize = rawsize; + sec->size = uncompressed_size; sec->compress_status = DECOMPRESS_SECTION_SIZED; - free (compressed_buffer); - return ret; - } + if (!ret) + goto fail_compressed; - /* Decompress to caller buffer directly if it is provided. */ - if (p) - uncompressed_buffer = p; - else - { uncompressed_buffer = (bfd_byte *) bfd_malloc (uncompressed_size); if (uncompressed_buffer == NULL) goto fail_compressed; - } - if (!decompress_contents (compressed_buffer, compressed_size, - uncompressed_buffer, uncompressed_size)) - { - sec->compress_status = DECOMPRESS_SECTION_SIZED; - free (compressed_buffer); - if (p == NULL) - free (uncompressed_buffer); - bfd_set_error (bfd_error_bad_value); - return FALSE; - } + if (!decompress_contents (compressed_buffer, compressed_size, + uncompressed_buffer, uncompressed_size)) + { + bfd_set_error (bfd_error_bad_value); + free (uncompressed_buffer); + fail_compressed: + free (compressed_buffer); + return FALSE; + } - free (compressed_buffer); - if (p == NULL) - *ptr = uncompressed_buffer; + free (compressed_buffer); + sec->contents = uncompressed_buffer; + sec->compress_status = COMPRESS_SECTION_DONE; + /* Fall thru */ +#endif - sec->contents = uncompressed_buffer; - sec->compress_status = COMPRESS_SECTION_DONE; + case COMPRESS_SECTION_DONE: + if (p == NULL) + { + p = (bfd_byte *) bfd_malloc (sz); + if (p == NULL) + return FALSE; + *ptr = p; + } + memcpy (p, sec->contents, sz); + return TRUE; - return TRUE; -#endif + default: + abort (); + } } /* diff --git a/bfd/ecoff.c b/bfd/ecoff.c index 43494868d6..f85627d2f5 100644 --- a/bfd/ecoff.c +++ b/bfd/ecoff.c @@ -3600,7 +3600,7 @@ ecoff_link_check_archive_element (bfd *abfd, EXTR esym; bfd_boolean def; const char *name; - bfd *subsbfd; + bfd *oldbfd; struct bfd_link_hash_entry *h; (*swap_ext_in) (abfd, (void *) ext_ptr, &esym); @@ -3645,18 +3645,17 @@ ecoff_link_check_archive_element (bfd *abfd, continue; /* Include this element. */ - subsbfd = NULL; - if (! (*info->callbacks->add_archive_element) - (info, abfd, name, &subsbfd)) + oldbfd = abfd; + if (!(*info->callbacks + ->add_archive_element) (info, abfd, name, &abfd)) goto error_return; /* Potentially, the add_archive_element hook may have set a substitute BFD for us. */ - if (subsbfd + if (abfd != oldbfd && !reread_ext_syms_and_strs (&symhdr, &external_ext_size, &esize, - &external_ext, &ssext, subsbfd, backend)) + &external_ext, &ssext, abfd, backend)) goto error_return; - if (! ecoff_link_add_externals (subsbfd ? subsbfd : abfd, info, - external_ext, ssext)) + if (! ecoff_link_add_externals (abfd, info, external_ext, ssext)) goto error_return; *pneeded = TRUE; @@ -3733,7 +3732,6 @@ ecoff_link_add_archive_symbols (bfd *abfd, struct bfd_link_info *info) unsigned int file_offset; const char *name; bfd *element; - bfd *subsbfd; h = *pundef; @@ -3820,13 +3818,10 @@ ecoff_link_add_archive_symbols (bfd *abfd, struct bfd_link_info *info) /* Unlike the generic linker, we know that this element provides a definition for an undefined symbol and we know that we want to include it. We don't need to check anything. */ - subsbfd = NULL; - if (! (*info->callbacks->add_archive_element) - (info, element, name, &subsbfd)) + if (!(*info->callbacks + ->add_archive_element) (info, element, name, &element)) return FALSE; - /* Potentially, the add_archive_element hook may have set a - substitute BFD for us. */ - if (! ecoff_link_add_object_symbols (subsbfd ? subsbfd : element, info)) + if (! ecoff_link_add_object_symbols (element, info)) return FALSE; pundef = &(*pundef)->u.undef.next; diff --git a/bfd/elf-attrs.c b/bfd/elf-attrs.c index e1893d38d9..569e846cc5 100644 --- a/bfd/elf-attrs.c +++ b/bfd/elf-attrs.c @@ -613,7 +613,7 @@ _bfd_elf_merge_unknown_attribute_low (bfd *ibfd, bfd *obfd, int tag) /* Only pass on attributes that match in both inputs. */ if (in_attr[tag].i != out_attr[tag].i - || in_attr[tag].s != out_attr[tag].s + || (in_attr[tag].s == NULL) != (out_attr[tag].s == NULL) || (in_attr[tag].s != NULL && out_attr[tag].s != NULL && strcmp (in_attr[tag].s, out_attr[tag].s) != 0)) { @@ -673,7 +673,7 @@ _bfd_elf_merge_unknown_attribute_list (bfd *ibfd, bfd *obfd) /* Only pass on attributes that match in both inputs. */ if (in_list->attr.i != out_list->attr.i - || in_list->attr.s != out_list->attr.s + || (in_list->attr.s == NULL) != (out_list->attr.s == NULL) || (in_list->attr.s && out_list->attr.s && strcmp (in_list->attr.s, out_list->attr.s) != 0)) { diff --git a/bfd/elf-eh-frame.c b/bfd/elf-eh-frame.c index 8380ef8600..0a22138147 100644 --- a/bfd/elf-eh-frame.c +++ b/bfd/elf-eh-frame.c @@ -1572,10 +1572,31 @@ _bfd_elf_write_section_eh_frame (bfd *abfd, break; case DW_EH_PE_datarel: { - asection *got = bfd_get_section_by_name (abfd, ".got"); - - BFD_ASSERT (got != NULL); - address += got->vma; + switch (abfd->arch_info->arch) + { + case bfd_arch_ia64: + BFD_ASSERT (elf_gp (abfd) != 0); + address += elf_gp (abfd); + break; + default: + (*info->callbacks->einfo) + (_("%P: DW_EH_PE_datarel unspecified" + " for this architecture.\n")); + /* Fall thru */ + case bfd_arch_frv: + case bfd_arch_i386: + BFD_ASSERT (htab->hgot != NULL + && ((htab->hgot->root.type + == bfd_link_hash_defined) + || (htab->hgot->root.type + == bfd_link_hash_defweak))); + address + += (htab->hgot->root.u.def.value + + htab->hgot->root.u.def.section->output_offset + + (htab->hgot->root.u.def.section->output_section + ->vma)); + break; + } } break; case DW_EH_PE_pcrel: @@ -1596,6 +1617,11 @@ _bfd_elf_write_section_eh_frame (bfd *abfd, if (hdr_info) { + /* The address calculation may overflow, giving us a + value greater than 4G on a 32-bit target when + dwarf_vma is 64-bit. */ + if (sizeof (address) > 4 && ptr_size == 4) + address &= 0xffffffff; hdr_info->array[hdr_info->array_count].initial_loc = address; hdr_info->array[hdr_info->array_count++].fde = (sec->output_section->vma @@ -1,7 +1,7 @@ /* ELF executable support for BFD. Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, - 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 + 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -822,11 +822,7 @@ _bfd_elf_make_section_from_shdr (bfd *abfd, const struct elf_backend_data *bed; if (hdr->bfd_section != NULL) - { - BFD_ASSERT (strcmp (name, - bfd_get_section_name (abfd, hdr->bfd_section)) == 0); - return TRUE; - } + return TRUE; newsect = bfd_make_section_anyway (abfd, name); if (newsect == NULL) @@ -1016,6 +1012,7 @@ _bfd_elf_make_section_from_shdr (bfd *abfd, || (name[1] == 'z' && name[7] == '_'))) { enum { nothing, compress, decompress } action = nothing; + char *new_name; if (bfd_is_section_compressed (abfd, newsect)) { @@ -1030,6 +1027,7 @@ _bfd_elf_make_section_from_shdr (bfd *abfd, action = compress; } + new_name = NULL; switch (action) { case nothing: @@ -1042,6 +1040,17 @@ _bfd_elf_make_section_from_shdr (bfd *abfd, abfd, name); return FALSE; } + if (name[1] != 'z') + { + unsigned int len = strlen (name); + + new_name = bfd_alloc (abfd, len + 2); + if (new_name == NULL) + return FALSE; + new_name[0] = '.'; + new_name[1] = 'z'; + memcpy (new_name + 2, name + 1, len); + } break; case decompress: if (!bfd_init_section_decompress_status (abfd, newsect)) @@ -1051,8 +1060,20 @@ _bfd_elf_make_section_from_shdr (bfd *abfd, abfd, name); return FALSE; } + if (name[1] == 'z') + { + unsigned int len = strlen (name); + + new_name = bfd_alloc (abfd, len); + if (new_name == NULL) + return FALSE; + new_name[0] = '.'; + memcpy (new_name + 1, name + 2, len - 1); + } break; } + if (new_name != NULL) + bfd_rename_section (abfd, newsect, new_name); } return TRUE; @@ -4251,10 +4272,12 @@ print_segment_map (const struct elf_segment_map *m) (unsigned int) m->p_type); pt = buf; } + fflush (stdout); fprintf (stderr, "%s:", pt); for (j = 0; j < m->count; j++) fprintf (stderr, " %s", m->sections [j]->name); putc ('\n',stderr); + fflush (stderr); } static bfd_boolean diff --git a/bfd/elf32-bfin.c b/bfd/elf32-bfin.c index 237391b201..df7bd567f9 100644 --- a/bfd/elf32-bfin.c +++ b/bfd/elf32-bfin.c @@ -1,5 +1,5 @@ /* ADI Blackfin BFD support for 32-bit ELF. - Copyright 2005, 2006, 2007, 2008, 2009, 2010 + Copyright 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -104,7 +104,7 @@ bfin_pcrel24_reloc (bfd *abfd, /* if rightshift is 1 and the number odd, return error. */ if (howto->rightshift && (relocation & 0x01)) { - fprintf(stderr, "relocation should be even number\n"); + (*_bfd_error_handler) (_("relocation should be even number")); return bfd_reloc_overflow; } @@ -360,7 +360,7 @@ bfin_bfd_reloc (bfd *abfd, /* If rightshift is 1 and the number odd, return error. */ if (howto->rightshift && (relocation & 0x01)) { - fprintf(stderr, "relocation should be even number\n"); + (*_bfd_error_handler) (_("relocation should be even number")); return bfd_reloc_overflow; } @@ -5266,7 +5266,8 @@ bfin_finish_dynamic_symbol (bfd * output_bfd, && (info->symbolic || h->dynindx == -1 || h->forced_local) && h->def_regular) { - fprintf(stderr, "*** check this relocation %s\n", __FUNCTION__); + (*_bfd_error_handler) (_("*** check this relocation %s"), + __FUNCTION__); rela.r_info = ELF32_R_INFO (0, R_BFIN_PCREL24); rela.r_addend = bfd_get_signed_32 (output_bfd, (sgot->contents diff --git a/bfd/elf32-dlx.c b/bfd/elf32-dlx.c index 6b96ac9767..29b89104e9 100644 --- a/bfd/elf32-dlx.c +++ b/bfd/elf32-dlx.c @@ -1,5 +1,5 @@ /* DLX specific support for 32-bit ELF - Copyright 2002, 2003, 2004, 2005, 2006, 2007 + Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2011 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -139,9 +139,8 @@ elf32_dlx_relocate16 (bfd *abfd, /* Can not support a long jump to sections other then .text. */ if (strcmp (input_section->name, symbol->section->output_section->name) != 0) { - fprintf (stderr, - "BFD Link Error: branch (PC rel16) to section (%s) not supported\n", - symbol->section->output_section->name); + (*_bfd_error_handler) (_("BFD Link Error: branch (PC rel16) to section (%s) not supported"), + symbol->section->output_section->name); return bfd_reloc_undefined; } @@ -202,9 +201,8 @@ elf32_dlx_relocate26 (bfd *abfd, /* Can not support a long jump to sections other then .text */ if (strcmp (input_section->name, symbol->section->output_section->name) != 0) { - fprintf (stderr, - "BFD Link Error: jump (PC rel26) to section (%s) not supported\n", - symbol->section->output_section->name); + (*_bfd_error_handler) (_("BFD Link Error: jump (PC rel26) to section (%s) not supported"), + symbol->section->output_section->name); return bfd_reloc_undefined; } diff --git a/bfd/elf32-mep.c b/bfd/elf32-mep.c index a6afcb569f..b688d679ee 100644 --- a/bfd/elf32-mep.c +++ b/bfd/elf32-mep.c @@ -1,6 +1,6 @@ /* MeP-specific support for 32-bit ELF. - Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 - Free Software Foundation, Inc. + Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, + 2010, 2011 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -154,13 +154,14 @@ mep_reloc_type_lookup default: /* Pacify gcc -Wall. */ - fprintf (stderr, "mep: no reloc for code %d\n", code); + (*_bfd_error_handler) (_("mep: no reloc for code %d"), code); return NULL; } if (mep_elf_howto_table[type].type != type) { - fprintf (stderr, "MeP: howto %d has type %d\n", type, mep_elf_howto_table[type].type); + (*_bfd_error_handler) (_("MeP: howto %d has type %d"), + type, mep_elf_howto_table[type].type); abort (); } diff --git a/bfd/elf32-v850.c b/bfd/elf32-v850.c index 29b2311b18..9e6f77d22f 100644 --- a/bfd/elf32-v850.c +++ b/bfd/elf32-v850.c @@ -1,6 +1,6 @@ /* V850-specific support for 32-bit ELF Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, - 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. + 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -480,7 +480,7 @@ v850_elf_perform_lo16_relocation (bfd *abfd, unsigned long *insn, } else { - fprintf (stderr, _("FAILED to find previous HI16 reloc\n")); + (*_bfd_error_handler) (_("FAILED to find previous HI16 reloc")); return FALSE; } } diff --git a/bfd/elf64-hppa.c b/bfd/elf64-hppa.c index 11289b1391..d8213a01a8 100644 --- a/bfd/elf64-hppa.c +++ b/bfd/elf64-hppa.c @@ -411,13 +411,6 @@ get_reloc_section (bfd *abfd, if (srel_name == NULL) return FALSE; - BFD_ASSERT ((CONST_STRNEQ (srel_name, ".rela") - && strcmp (bfd_get_section_name (abfd, sec), - srel_name + 5) == 0) - || (CONST_STRNEQ (srel_name, ".rel") - && strcmp (bfd_get_section_name (abfd, sec), - srel_name + 4) == 0)); - dynobj = hppa_info->root.dynobj; if (!dynobj) hppa_info->root.dynobj = dynobj = abfd; diff --git a/bfd/elflink.c b/bfd/elflink.c index 590e3243cd..6136a94cfd 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -5011,7 +5011,6 @@ elf_link_add_archive_symbols (bfd *abfd, struct bfd_link_info *info) { struct elf_link_hash_entry *h; bfd *element; - bfd *subsbfd = NULL; struct bfd_link_hash_entry *undefs_tail; symindex mark; @@ -5074,12 +5073,10 @@ elf_link_add_archive_symbols (bfd *abfd, struct bfd_link_info *info) undefs_tail = info->hash->undefs_tail; - if (! (*info->callbacks->add_archive_element) - (info, element, symdef->name, &subsbfd)) + if (!(*info->callbacks + ->add_archive_element) (info, element, symdef->name, &element)) goto error_return; - /* Potentially, the add_archive_element hook may have set a - substitute BFD for us. */ - if (! bfd_link_add_symbols (subsbfd ? subsbfd : element, info)) + if (!bfd_link_add_symbols (element, info)) goto error_return; /* If there are any new undefined symbols, we need to make @@ -8643,6 +8640,7 @@ elf_link_output_extsym (struct elf_link_hash_entry *h, void *data) h->ref_regular ? NULL : h->root.u.undef.abfd, NULL, 0, finfo->info->unresolved_syms_in_shared_libs == RM_GENERATE_ERROR))) { + bfd_set_error (bfd_error_bad_value); eoinfo->failed = TRUE; return FALSE; } @@ -8659,16 +8657,21 @@ elf_link_output_extsym (struct elf_link_hash_entry *h, void *data) && !h->dynamic_weak && ! elf_link_check_versioned_symbol (finfo->info, bed, h)) { - (*_bfd_error_handler) - (_("%B: %s symbol `%s' in %B is referenced by DSO"), - finfo->output_bfd, - h->root.u.def.section == bfd_abs_section_ptr - ? finfo->output_bfd : h->root.u.def.section->owner, - ELF_ST_VISIBILITY (h->other) == STV_INTERNAL - ? "internal" - : ELF_ST_VISIBILITY (h->other) == STV_HIDDEN - ? "hidden" : "local", - h->root.root.string); + bfd *def_bfd; + const char *msg; + + if (ELF_ST_VISIBILITY (h->other) == STV_INTERNAL) + msg = _("%B: internal symbol `%s' in %B is referenced by DSO"); + else if (ELF_ST_VISIBILITY (h->other) == STV_HIDDEN) + msg = _("%B: hidden symbol `%s' in %B is referenced by DSO"); + else + msg = _("%B: local symbol `%s' in %B is referenced by DSO"); + def_bfd = finfo->output_bfd; + if (h->root.u.def.section != bfd_abs_section_ptr) + def_bfd = h->root.u.def.section->owner; + (*_bfd_error_handler) (msg, finfo->output_bfd, def_bfd, + h->root.root.string); + bfd_set_error (bfd_error_bad_value); eoinfo->failed = TRUE; return FALSE; } @@ -8753,6 +8756,7 @@ elf_link_output_extsym (struct elf_link_hash_entry *h, void *data) (*_bfd_error_handler) (_("%B: could not find output section %A for input section %A"), finfo->output_bfd, input_sec->output_section, input_sec); + bfd_set_error (bfd_error_nonrepresentable_section); eoinfo->failed = TRUE; return FALSE; } @@ -8870,14 +8874,16 @@ elf_link_output_extsym (struct elf_link_hash_entry *h, void *data) && h->root.type == bfd_link_hash_undefined && !h->def_regular) { - (*_bfd_error_handler) - (_("%B: %s symbol `%s' isn't defined"), - finfo->output_bfd, - ELF_ST_VISIBILITY (sym.st_other) == STV_PROTECTED - ? "protected" - : ELF_ST_VISIBILITY (sym.st_other) == STV_INTERNAL - ? "internal" : "hidden", - h->root.root.string); + const char *msg; + + if (ELF_ST_VISIBILITY (sym.st_other) == STV_PROTECTED) + msg = _("%B: protected symbol `%s' isn't defined"); + else if (ELF_ST_VISIBILITY (sym.st_other) == STV_INTERNAL) + msg = _("%B: internal symbol `%s' isn't defined"); + else + msg = _("%B: hidden symbol `%s' isn't defined"); + (*_bfd_error_handler) (msg, finfo->output_bfd, h->root.root.string); + bfd_set_error (bfd_error_bad_value); eoinfo->failed = TRUE; return FALSE; } diff --git a/bfd/elfxx-ia64.c b/bfd/elfxx-ia64.c index 0ef1a442d9..d42ad89212 100644 --- a/bfd/elfxx-ia64.c +++ b/bfd/elfxx-ia64.c @@ -2602,13 +2602,6 @@ get_reloc_section (bfd *abfd, if (srel_name == NULL) return NULL; - BFD_ASSERT ((CONST_STRNEQ (srel_name, ".rela") - && strcmp (bfd_get_section_name (abfd, sec), - srel_name+5) == 0) - || (CONST_STRNEQ (srel_name, ".rel") - && strcmp (bfd_get_section_name (abfd, sec), - srel_name+4) == 0)); - dynobj = ia64_info->root.dynobj; if (!dynobj) ia64_info->root.dynobj = dynobj = abfd; diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c index 4718dd4db6..2939af4915 100644 --- a/bfd/elfxx-mips.c +++ b/bfd/elfxx-mips.c @@ -12589,8 +12589,11 @@ _bfd_mips_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd) for (sec = ibfd->sections; sec != NULL; sec = sec->next) { /* Ignore synthetic sections and empty .text, .data and .bss sections - which are automatically generated by gas. */ - if (strcmp (sec->name, ".reginfo") + which are automatically generated by gas. Also ignore fake + (s)common sections, since merely defining a common symbol does + not affect compatibility. */ + if ((sec->flags & SEC_IS_COMMON) == 0 + && strcmp (sec->name, ".reginfo") && strcmp (sec->name, ".mdebug") && (sec->size != 0 || (strcmp (sec->name, ".text") diff --git a/bfd/hash.c b/bfd/hash.c index fc05923a5c..e2fa3a9138 100644 --- a/bfd/hash.c +++ b/bfd/hash.c @@ -1,6 +1,6 @@ /* hash.c -- hash table routines for BFD Copyright 1993, 1994, 1995, 1997, 1999, 2001, 2002, 2003, 2004, 2005, - 2006, 2007, 2009 Free Software Foundation, Inc. + 2006, 2007, 2009, 2010 Free Software Foundation, Inc. Written by Steve Chamberlain <sac@cygnus.com> This file is part of BFD, the Binary File Descriptor library. @@ -412,20 +412,13 @@ bfd_hash_table_free (struct bfd_hash_table *table) table->memory = NULL; } -/* Look up a string in a hash table. */ - -struct bfd_hash_entry * -bfd_hash_lookup (struct bfd_hash_table *table, - const char *string, - bfd_boolean create, - bfd_boolean copy) +static inline unsigned long +bfd_hash_hash (const char *string, unsigned int *lenp) { const unsigned char *s; unsigned long hash; - unsigned int c; - struct bfd_hash_entry *hashp; unsigned int len; - unsigned int _index; + unsigned int c; hash = 0; len = 0; @@ -438,7 +431,25 @@ bfd_hash_lookup (struct bfd_hash_table *table, len = (s - (const unsigned char *) string) - 1; hash += len + (len << 17); hash ^= hash >> 2; + if (lenp != NULL) + *lenp = len; + return hash; +} + +/* Look up a string in a hash table. */ +struct bfd_hash_entry * +bfd_hash_lookup (struct bfd_hash_table *table, + const char *string, + bfd_boolean create, + bfd_boolean copy) +{ + unsigned long hash; + struct bfd_hash_entry *hashp; + unsigned int len; + unsigned int _index; + + hash = bfd_hash_hash (string, &len); _index = hash % table->size; for (hashp = table->table[_index]; hashp != NULL; @@ -535,6 +546,31 @@ bfd_hash_insert (struct bfd_hash_table *table, return hashp; } +/* Rename an entry in a hash table. */ + +void +bfd_hash_rename (struct bfd_hash_table *table, + const char *string, + struct bfd_hash_entry *ent) +{ + unsigned int _index; + struct bfd_hash_entry **pph; + + _index = ent->hash % table->size; + for (pph = &table->table[_index]; *pph != NULL; pph = &(*pph)->next) + if (*pph == ent) + break; + if (*pph == NULL) + abort (); + + *pph = ent->next; + ent->string = string; + ent->hash = bfd_hash_hash (string, NULL); + _index = ent->hash % table->size; + ent->next = table->table[_index]; + table->table[_index] = ent; +} + /* Replace an entry in a hash table. */ void diff --git a/bfd/libbfd.c b/bfd/libbfd.c index a66d9c6f07..8b24378456 100644 --- a/bfd/libbfd.c +++ b/bfd/libbfd.c @@ -1,6 +1,6 @@ /* Assorted BFD support routines, only used internally. Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009 + 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. Written by Cygnus Support. @@ -1021,6 +1021,7 @@ warn_deprecated (const char *what, if (~(size_t) func & ~mask) { + fflush (stdout); /* Note: separate sentences in order to allow for translation into other languages. */ if (func) @@ -1028,6 +1029,7 @@ warn_deprecated (const char *what, what, file, line, func); else fprintf (stderr, _("Deprecated %s called\n"), what); + fflush (stderr); mask |= ~(size_t) func; } } diff --git a/bfd/linker.c b/bfd/linker.c index fc52b51f00..2b52ba9651 100644 --- a/bfd/linker.c +++ b/bfd/linker.c @@ -1223,20 +1223,18 @@ generic_link_check_archive_element (bfd *abfd, { bfd_size_type symcount; asymbol **symbols; - bfd *subsbfd = NULL; + bfd *oldbfd = abfd; /* This object file defines this symbol, so pull it in. */ - if (! (*info->callbacks->add_archive_element) - (info, abfd, bfd_asymbol_name (p), &subsbfd)) + if (!(*info->callbacks + ->add_archive_element) (info, abfd, bfd_asymbol_name (p), + &abfd)) return FALSE; /* Potentially, the add_archive_element hook may have set a substitute BFD for us. */ - if (subsbfd) - { - abfd = subsbfd; - if (!bfd_generic_link_read_symbols (abfd)) - return FALSE; - } + if (abfd != oldbfd + && !bfd_generic_link_read_symbols (abfd)) + return FALSE; symcount = _bfd_generic_link_get_symcount (abfd); symbols = _bfd_generic_link_get_symbols (abfd); if (! generic_link_add_symbol_list (abfd, info, symcount, @@ -1257,12 +1255,12 @@ generic_link_check_archive_element (bfd *abfd, symbfd = h->u.undef.abfd; if (symbfd == NULL) { - bfd *subsbfd = NULL; /* This symbol was created as undefined from outside BFD. We assume that we should link in the object file. This is for the -u option in the linker. */ - if (! (*info->callbacks->add_archive_element) - (info, abfd, bfd_asymbol_name (p), &subsbfd)) + if (!(*info->callbacks + ->add_archive_element) (info, abfd, bfd_asymbol_name (p), + &abfd)) return FALSE; /* Potentially, the add_archive_element hook may have set a substitute BFD for us. But no symbols are going to get diff --git a/bfd/mach-o.c b/bfd/mach-o.c index a02030e5dc..0c0d1ac1f1 100644 --- a/bfd/mach-o.c +++ b/bfd/mach-o.c @@ -1,6 +1,6 @@ /* Mach-O support for BFD. Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, - 2009, 2010 + 2009, 2010, 2011 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -378,8 +378,7 @@ bfd_mach_o_canonicalize_symtab (bfd *abfd, asymbol **alocation) if (bfd_mach_o_read_symtab_symbols (abfd) != 0) { - fprintf (stderr, - "bfd_mach_o_canonicalize_symtab: unable to load symbols\n"); + (*_bfd_error_handler) (_("bfd_mach_o_canonicalize_symtab: unable to load symbols")); return 0; } @@ -1251,9 +1250,8 @@ bfd_mach_o_write_contents (bfd *abfd) case BFD_MACH_O_LC_SUB_FRAMEWORK: break; default: - fprintf (stderr, - "unable to write unknown load command 0x%lx\n", - (unsigned long) cur->type); + (*_bfd_error_handler) (_("unable to write unknown load command 0x%lx"), + (unsigned long) cur->type); return FALSE; } } @@ -1653,8 +1651,8 @@ bfd_mach_o_read_symtab_symbol (bfd *abfd, if (bfd_seek (abfd, symoff, SEEK_SET) != 0 || bfd_bread ((void *) buf, symwidth, abfd) != symwidth) { - fprintf (stderr, "bfd_mach_o_read_symtab_symbol: unable to read %d bytes at %lu\n", - symwidth, (unsigned long) symoff); + (*_bfd_error_handler) (_("bfd_mach_o_read_symtab_symbol: unable to read %d bytes at %lu"), + symwidth, (unsigned long) symoff); return -1; } @@ -1670,8 +1668,9 @@ bfd_mach_o_read_symtab_symbol (bfd *abfd, if (stroff >= sym->strsize) { - fprintf (stderr, "bfd_mach_o_read_symtab_symbol: symbol name out of range (%lu >= %lu)\n", - (unsigned long) stroff, (unsigned long) sym->strsize); + (*_bfd_error_handler) (_("bfd_mach_o_read_symtab_symbol: symbol name out of range (%lu >= %lu)"), + (unsigned long) stroff, + (unsigned long) sym->strsize); return -1; } @@ -1754,23 +1753,23 @@ bfd_mach_o_read_symtab_symbol (bfd *abfd, /* Mach-O uses 0 to mean "no section"; not an error. */ if (section != 0) { - fprintf (stderr, "bfd_mach_o_read_symtab_symbol: " - "symbol \"%s\" specified invalid section %d (max %lu): setting to undefined\n", - s->symbol.name, section, mdata->nsects); + (*_bfd_error_handler) (_("bfd_mach_o_read_symtab_symbol: " + "symbol \"%s\" specified invalid section %d (max %lu): setting to undefined"), + s->symbol.name, section, mdata->nsects); } s->symbol.section = bfd_und_section_ptr; } break; case BFD_MACH_O_N_INDR: - fprintf (stderr, "bfd_mach_o_read_symtab_symbol: " - "symbol \"%s\" is unsupported 'indirect' reference: setting to undefined\n", - s->symbol.name); + (*_bfd_error_handler) (_("bfd_mach_o_read_symtab_symbol: " + "symbol \"%s\" is unsupported 'indirect' reference: setting to undefined"), + s->symbol.name); s->symbol.section = bfd_und_section_ptr; break; default: - fprintf (stderr, "bfd_mach_o_read_symtab_symbol: " - "symbol \"%s\" specified invalid type field 0x%x: setting to undefined\n", - s->symbol.name, symtype); + (*_bfd_error_handler) (_("bfd_mach_o_read_symtab_symbol: " + "symbol \"%s\" specified invalid type field 0x%x: setting to undefined"), + s->symbol.name, symtype); s->symbol.section = bfd_und_section_ptr; break; } @@ -1838,7 +1837,7 @@ bfd_mach_o_read_symtab_symbols (bfd *abfd) if (sym->symbols == NULL) { - fprintf (stderr, "bfd_mach_o_read_symtab_symbols: unable to allocate memory for symbols\n"); + (*_bfd_error_handler) (_("bfd_mach_o_read_symtab_symbols: unable to allocate memory for symbols")); return -1; } @@ -1872,8 +1871,8 @@ bfd_mach_o_read_dysymtab_symbol (bfd *abfd, if (bfd_seek (abfd, isymoff, SEEK_SET) != 0 || bfd_bread ((void *) buf, 4, abfd) != 4) { - fprintf (stderr, "bfd_mach_o_read_dysymtab_symbol: unable to read %lu bytes at %lu\n", - (unsigned long) 4, isymoff); + (*_bfd_error_handler) (_("bfd_mach_o_read_dysymtab_symbol: unable to read %lu bytes at %lu"), + (unsigned long) 4, isymoff); return -1; } sym_index = bfd_h_get_32 (abfd, buf); @@ -2554,8 +2553,8 @@ bfd_mach_o_read_command (bfd *abfd, bfd_mach_o_load_command *command) return -1; break; default: - fprintf (stderr, "unable to read unknown load command 0x%lx\n", - (unsigned long) command->type); + (*_bfd_error_handler) (_("unable to read unknown load command 0x%lx"), + (unsigned long) command->type); break; } @@ -2734,8 +2733,8 @@ bfd_mach_o_scan (bfd *abfd, &cputype, &cpusubtype); if (cputype == bfd_arch_unknown) { - fprintf (stderr, "bfd_mach_o_scan: unknown architecture 0x%lx/0x%lx\n", - header->cputype, header->cpusubtype); + (*_bfd_error_handler) (_("bfd_mach_o_scan: unknown architecture 0x%lx/0x%lx"), + header->cputype, header->cpusubtype); return -1; } @@ -2830,8 +2829,8 @@ bfd_mach_o_header_p (bfd *abfd, if (! (header.byteorder == BFD_ENDIAN_BIG || header.byteorder == BFD_ENDIAN_LITTLE)) { - fprintf (stderr, "unknown header byte-order value 0x%lx\n", - (unsigned long) header.byteorder); + (*_bfd_error_handler) (_("unknown header byte-order value 0x%lx"), + (unsigned long) header.byteorder); goto wrong; } diff --git a/bfd/pdp11.c b/bfd/pdp11.c index 5f4d28c627..93ea461dd3 100644 --- a/bfd/pdp11.c +++ b/bfd/pdp11.c @@ -2601,8 +2601,8 @@ aout_link_check_ar_symbols (bfd *abfd, but not if it is defined in the .text section. That seems a bit crazy to me, and I haven't implemented it. However, it might be correct. */ - if (! (*info->callbacks->add_archive_element) - (info, abfd, name, subsbfd)) + if (!(*info->callbacks + ->add_archive_element) (info, abfd, name, subsbfd)) return FALSE; *pneeded = TRUE; return TRUE; @@ -2629,8 +2629,8 @@ aout_link_check_ar_symbols (bfd *abfd, outside BFD. We assume that we should link in the object file. This is done for the -u option in the linker. */ - if (! (*info->callbacks->add_archive_element) - (info, abfd, name, subsbfd)) + if (!(*info->callbacks + ->add_archive_element) (info, abfd, name, subsbfd)) return FALSE; *pneeded = TRUE; return TRUE; @@ -2682,27 +2682,36 @@ aout_link_check_archive_element (bfd *abfd, struct bfd_link_info *info, bfd_boolean *pneeded) { - bfd *subsbfd = NULL; + bfd *oldbfd; + bfd_boolean needed; - if (! aout_get_external_symbols (abfd)) + if (!aout_get_external_symbols (abfd)) return FALSE; - if (! aout_link_check_ar_symbols (abfd, info, pneeded, &subsbfd)) + oldbfd = abfd; + if (!aout_link_check_ar_symbols (abfd, info, pneeded, &abfd)) return FALSE; - if (*pneeded) + needed = *pneeded; + if (needed) { /* Potentially, the add_archive_element hook may have set a substitute BFD for us. */ - if (subsbfd && ! aout_get_external_symbols (subsbfd)) - return FALSE; - if (! aout_link_add_symbols (subsbfd ? subsbfd : abfd, info)) + if (abfd != oldbfd) + { + if (!info->keep_memory + && !aout_link_free_symbols (oldbfd)) + return FALSE; + if (!aout_get_external_symbols (abfd)) + return FALSE; + } + if (!aout_link_add_symbols (abfd, info)) return FALSE; } - if (! info->keep_memory || ! *pneeded) + if (!info->keep_memory || !needed) { - if (! aout_link_free_symbols (abfd)) + if (!aout_link_free_symbols (abfd)) return FALSE; } @@ -1,6 +1,6 @@ /* PEF support for BFD. - Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 - Free Software Foundation, Inc. + Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, + 2009, 2011 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -516,8 +516,8 @@ bfd_pef_scan (abfd, header, mdata) bfd_pef_convert_architecture (header->architecture, &cputype, &cpusubtype); if (cputype == bfd_arch_unknown) { - fprintf (stderr, "bfd_pef_scan: unknown architecture 0x%lx\n", - header->architecture); + (*_bfd_error_handler) (_("bfd_pef_scan: unknown architecture 0x%lx"), + header->architecture); return -1; } bfd_set_arch_mach (abfd, cputype, cpusubtype); diff --git a/bfd/plugin.c b/bfd/plugin.c index a46bf905c9..61cd687336 100644 --- a/bfd/plugin.c +++ b/bfd/plugin.c @@ -78,6 +78,7 @@ message (int level ATTRIBUTE_UNUSED, va_start (args, format); printf ("bfd plugin: "); vprintf (format, args); + putchar ('\n'); va_end (args); return LDPS_OK; } diff --git a/bfd/po/SRC-POTFILES.in b/bfd/po/SRC-POTFILES.in index 729b704218..e036a2ff44 100644 --- a/bfd/po/SRC-POTFILES.in +++ b/bfd/po/SRC-POTFILES.in @@ -319,6 +319,7 @@ ppcboot.c reloc.c reloc16.c riscix.c +rs6000-core.c sco5-core.c section.c simple.c diff --git a/bfd/po/bfd.pot b/bfd/po/bfd.pot index f5856a81e6..53cfa1367d 100644 --- a/bfd/po/bfd.pot +++ b/bfd/po/bfd.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: bug-binutils@gnu.org\n" -"POT-Creation-Date: 2010-11-05 11:31+0100\n" +"POT-Creation-Date: 2011-02-01 22:23+1030\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -48,24 +48,24 @@ msgstr "" msgid "*unknown*" msgstr "" -#: aoutx.h:4007 aoutx.h:4333 +#: aoutx.h:4016 aoutx.h:4342 msgid "%P: %B: unexpected relocation type\n" msgstr "" -#: aoutx.h:5364 +#: aoutx.h:5373 #, c-format msgid "%s: relocatable link from %s to %s not supported" msgstr "" -#: archive.c:2125 +#: archive.c:2120 msgid "Warning: writing archive was slow: rewriting timestamp\n" msgstr "" -#: archive.c:2416 +#: archive.c:2411 msgid "Reading archive file mod timestamp" msgstr "" -#: archive.c:2440 +#: archive.c:2435 msgid "Writing updated armap timestamp" msgstr "" @@ -154,22 +154,22 @@ msgstr "" msgid "#<Invalid error code>" msgstr "" -#: bfd.c:939 +#: bfd.c:942 #, c-format msgid "BFD %s assertion fail %s:%d" msgstr "" -#: bfd.c:951 +#: bfd.c:954 #, c-format msgid "BFD %s internal error, aborting at %s line %d in %s\n" msgstr "" -#: bfd.c:955 +#: bfd.c:958 #, c-format msgid "BFD %s internal error, aborting at %s line %d\n" msgstr "" -#: bfd.c:957 +#: bfd.c:960 msgid "Please report this bug.\n" msgstr "" @@ -225,7 +225,7 @@ msgid "%B: unsupported relocation: ALPHA_R_GPRELLOW" msgstr "" #: coff-alpha.c:1575 elf32-m32r.c:2493 elf64-alpha.c:3991 elf64-alpha.c:4140 -#: elf32-ia64.c:4582 elf64-ia64.c:4582 +#: elf32-ia64.c:4575 elf64-ia64.c:4575 msgid "%B: unknown relocation type %d" msgstr "" @@ -254,7 +254,7 @@ msgid "" " consider relinking with --support-old-code enabled" msgstr "" -#: coff-arm.c:1754 coff-tic80.c:695 cofflink.c:3043 +#: coff-arm.c:1754 coff-tic80.c:695 cofflink.c:3052 msgid "%B: bad reloc address 0x%lx in section `%A'" msgstr "" @@ -267,14 +267,14 @@ msgstr "" msgid "error: %B is compiled for APCS-%d, whereas %B is compiled for APCS-%d" msgstr "" -#: coff-arm.c:2226 elf32-arm.c:14105 +#: coff-arm.c:2226 elf32-arm.c:14098 #, c-format msgid "" "error: %B passes floats in float registers, whereas %B passes them in " "integer registers" msgstr "" -#: coff-arm.c:2229 elf32-arm.c:14109 +#: coff-arm.c:2229 elf32-arm.c:14102 #, c-format msgid "" "error: %B passes floats in integer registers, whereas %B passes them in " @@ -295,12 +295,12 @@ msgid "" "position independent" msgstr "" -#: coff-arm.c:2274 elf32-arm.c:14174 +#: coff-arm.c:2274 elf32-arm.c:14167 #, c-format msgid "Warning: %B supports interworking, whereas %B does not" msgstr "" -#: coff-arm.c:2277 elf32-arm.c:14180 +#: coff-arm.c:2277 elf32-arm.c:14173 #, c-format msgid "Warning: %B does not support interworking, whereas %B does" msgstr "" @@ -310,7 +310,7 @@ msgstr "" msgid "private flags = %x:" msgstr "" -#: coff-arm.c:2309 elf32-arm.c:10492 +#: coff-arm.c:2309 elf32-arm.c:10485 #, c-format msgid " [floats passed in float registers]" msgstr "" @@ -320,7 +320,7 @@ msgstr "" msgid " [floats passed in integer registers]" msgstr "" -#: coff-arm.c:2314 elf32-arm.c:10495 +#: coff-arm.c:2314 elf32-arm.c:10488 #, c-format msgid " [position independent]" msgstr "" @@ -364,7 +364,7 @@ msgstr "" #: coff-i860.c:147 #, c-format -msgid "Relocation `%s' not yet implemented\n" +msgid "relocation `%s' not yet implemented" msgstr "" #: coff-i860.c:605 coff-tic54x.c:398 coffcode.h:5147 @@ -375,7 +375,7 @@ msgstr "" msgid "uncertain calling convention for non-COFF symbol" msgstr "" -#: coff-m68k.c:506 elf32-bfin.c:5678 elf32-cr16.c:2897 elf32-m68k.c:4672 +#: coff-m68k.c:506 elf32-bfin.c:5679 elf32-cr16.c:2897 elf32-m68k.c:4672 msgid "unsupported reloc type" msgstr "" @@ -402,6 +402,11 @@ msgstr "" msgid "%B: symbol `%s' has unrecognized smclas %d" msgstr "" +#: coff-sh.c:521 +#, c-format +msgid "SH Error: unknown reloc type %d" +msgstr "" + #: coff-tic4x.c:195 coff-tic54x.c:299 coff-tic80.c:458 #, c-format msgid "Unrecognized reloc type 0x%x" @@ -478,20 +483,20 @@ msgstr "" msgid "%B: bad string table size %lu" msgstr "" -#: cofflink.c:524 elflink.c:4339 +#: cofflink.c:533 elflink.c:4339 msgid "Warning: type of symbol `%s' changed from %d to %d in %B" msgstr "" -#: cofflink.c:2321 +#: cofflink.c:2330 msgid "%B: relocs in section `%A', but it has no contents" msgstr "" -#: cofflink.c:2652 coffswap.h:826 +#: cofflink.c:2661 coffswap.h:826 #, c-format msgid "%s: %s: reloc overflow: 0x%lx > 0xffff" msgstr "" -#: cofflink.c:2661 coffswap.h:812 +#: cofflink.c:2670 coffswap.h:812 #, c-format msgid "%s: warning: %s: line number overflow: 0x%lx > 0xffff" msgstr "" @@ -641,6 +646,10 @@ msgid "" "%P: fde encoding in %B(%A) prevents .eh_frame_hdr table being created.\n" msgstr "" +#: elf-eh-frame.c:1583 +msgid "%P: DW_EH_PE_datarel unspecified for this architecture.\n" +msgstr "" + #: elf-ifunc.c:179 msgid "" "%F%P: dynamic STT_GNU_IFUNC symbol `%s' with pointer equality in `%B' can " @@ -652,7 +661,7 @@ msgstr "" #: elf32-cr16.c:1482 elf32-cr16c.c:780 elf32-cris.c:2077 elf32-crx.c:922 #: elf32-d10v.c:509 elf32-fr30.c:609 elf32-frv.c:4111 elf32-h8300.c:509 #: elf32-i860.c:1211 elf32-ip2k.c:1468 elf32-iq2000.c:684 elf32-lm32.c:1168 -#: elf32-m32c.c:553 elf32-m32r.c:3111 elf32-m68hc1x.c:1138 elf32-mep.c:534 +#: elf32-m32c.c:553 elf32-m32r.c:3111 elf32-m68hc1x.c:1138 elf32-mep.c:535 #: elf32-microblaze.c:1231 elf32-moxie.c:282 elf32-msp430.c:486 elf32-mt.c:395 #: elf32-openrisc.c:404 elf32-score.c:2731 elf32-score7.c:2540 #: elf32-spu.c:5042 elf32-v850.c:2143 elf32-xstormy16.c:941 elf64-mmix.c:1522 @@ -663,7 +672,7 @@ msgstr "" #: elf32-cr16.c:1486 elf32-cr16c.c:784 elf32-cris.c:2081 elf32-crx.c:926 #: elf32-d10v.c:513 elf32-fr30.c:613 elf32-frv.c:4115 elf32-h8300.c:513 #: elf32-i860.c:1215 elf32-iq2000.c:688 elf32-lm32.c:1172 elf32-m32c.c:557 -#: elf32-m32r.c:3115 elf32-m68hc1x.c:1142 elf32-mep.c:538 +#: elf32-m32r.c:3115 elf32-m68hc1x.c:1142 elf32-mep.c:539 #: elf32-microblaze.c:1235 elf32-moxie.c:286 elf32-msp430.c:490 #: elf32-openrisc.c:408 elf32-score.c:2735 elf32-score7.c:2544 #: elf32-spu.c:5046 elf32-v850.c:2147 elf32-xstormy16.c:945 elf64-mmix.c:1526 @@ -682,7 +691,7 @@ msgstr "" #: elf32-cr16.c:1494 elf32-cr16c.c:792 elf32-cris.c:2089 elf32-crx.c:934 #: elf32-d10v.c:521 elf32-fr30.c:621 elf32-frv.c:4123 elf32-h8300.c:521 #: elf32-i860.c:1223 elf32-ip2k.c:1483 elf32-iq2000.c:696 elf32-lm32.c:1180 -#: elf32-m32c.c:565 elf32-m32r.c:3123 elf32-m68hc1x.c:1150 elf32-mep.c:546 +#: elf32-m32c.c:565 elf32-m32r.c:3123 elf32-m68hc1x.c:1150 elf32-mep.c:547 #: elf32-microblaze.c:1243 elf32-moxie.c:294 elf32-msp430.c:498 elf32-mt.c:403 #: elf32-openrisc.c:416 elf32-score.c:2748 elf32-score7.c:2552 #: elf32-spu.c:5054 elf32-v850.c:2167 elf32-xstormy16.c:953 elf64-mmix.c:1534 @@ -690,8 +699,8 @@ msgid "internal error: unknown error" msgstr "" #: elf-m10300.c:1504 elf32-arm.c:9098 elf32-i386.c:4081 elf32-m32r.c:2604 -#: elf32-m68k.c:4156 elf32-ppc.c:8089 elf32-s390.c:3010 elf32-sh.c:4223 -#: elf32-xtensa.c:3067 elf64-ppc.c:13115 elf64-s390.c:2985 elf64-sh64.c:1636 +#: elf32-m68k.c:4156 elf32-ppc.c:8090 elf32-s390.c:3010 elf32-sh.c:4223 +#: elf32-xtensa.c:3067 elf64-ppc.c:13138 elf64-s390.c:2985 elf64-sh64.c:1636 #: elf64-x86-64.c:3719 elfxx-sparc.c:3806 msgid "%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'" msgstr "" @@ -706,9 +715,9 @@ msgstr "" msgid "internal error: suspicious relocation type used in shared library" msgstr "" -#: elf-m10300.c:4372 elf32-arm.c:11392 elf32-cr16.c:2451 elf32-cris.c:3044 +#: elf-m10300.c:4372 elf32-arm.c:11385 elf32-cr16.c:2451 elf32-cris.c:3044 #: elf32-hppa.c:1894 elf32-i370.c:503 elf32-i386.c:2036 elf32-lm32.c:1868 -#: elf32-m32r.c:1927 elf32-m68k.c:3252 elf32-ppc.c:4994 elf32-s390.c:1652 +#: elf32-m32r.c:1927 elf32-m68k.c:3252 elf32-ppc.c:4995 elf32-s390.c:1652 #: elf32-sh.c:2931 elf32-vax.c:1040 elf64-ppc.c:6483 elf64-s390.c:1635 #: elf64-sh64.c:3377 elf64-x86-64.c:1871 elfxx-sparc.c:2104 #, c-format @@ -735,7 +744,7 @@ msgstr "" msgid "%B: no group info for section %A" msgstr "" -#: elf.c:737 elf.c:3090 elflink.c:10062 +#: elf.c:737 elf.c:3111 elflink.c:10068 msgid "%B: warning: sh_link not set for section `%A'" msgstr "" @@ -747,118 +756,118 @@ msgstr "" msgid "%B: unknown [%d] section `%s' in group [%s]" msgstr "" -#: elf.c:1041 +#: elf.c:1039 msgid "%B: unable to initialize commpress status for section %s" msgstr "" -#: elf.c:1050 +#: elf.c:1059 msgid "%B: unable to initialize decommpress status for section %s" msgstr "" -#: elf.c:1158 +#: elf.c:1179 #, c-format msgid "" "\n" "Program Header:\n" msgstr "" -#: elf.c:1200 +#: elf.c:1221 #, c-format msgid "" "\n" "Dynamic Section:\n" msgstr "" -#: elf.c:1336 +#: elf.c:1357 #, c-format msgid "" "\n" "Version definitions:\n" msgstr "" -#: elf.c:1361 +#: elf.c:1382 #, c-format msgid "" "\n" "Version References:\n" msgstr "" -#: elf.c:1366 +#: elf.c:1387 #, c-format msgid " required from %s:\n" msgstr "" -#: elf.c:1773 +#: elf.c:1794 msgid "%B: invalid link %lu for reloc section %s (index %u)" msgstr "" -#: elf.c:1943 +#: elf.c:1964 msgid "" "%B: don't know how to handle allocated, application specific section `%s' [0x" "%8x]" msgstr "" -#: elf.c:1955 +#: elf.c:1976 msgid "%B: don't know how to handle processor specific section `%s' [0x%8x]" msgstr "" -#: elf.c:1966 +#: elf.c:1987 msgid "%B: don't know how to handle OS specific section `%s' [0x%8x]" msgstr "" -#: elf.c:1976 +#: elf.c:1997 msgid "%B: don't know how to handle section `%s' [0x%8x]" msgstr "" -#: elf.c:2603 +#: elf.c:2624 #, c-format msgid "warning: section `%A' type changed to PROGBITS" msgstr "" -#: elf.c:3047 +#: elf.c:3068 msgid "%B: sh_link of section `%A' points to discarded section `%A' of `%B'" msgstr "" -#: elf.c:3070 +#: elf.c:3091 msgid "%B: sh_link of section `%A' points to removed section `%A' of `%B'" msgstr "" -#: elf.c:4480 +#: elf.c:4503 msgid "" "%B: The first section in the PT_DYNAMIC segment is not the .dynamic section" msgstr "" -#: elf.c:4507 +#: elf.c:4530 msgid "%B: Not enough room for program headers, try linking with -N" msgstr "" -#: elf.c:4594 +#: elf.c:4617 msgid "%B: section %A lma %#lx adjusted to %#lx" msgstr "" -#: elf.c:4713 +#: elf.c:4736 msgid "%B: section `%A' can't be allocated in segment %d" msgstr "" -#: elf.c:4761 +#: elf.c:4784 msgid "%B: warning: allocated section `%s' not in segment" msgstr "" -#: elf.c:5257 +#: elf.c:5280 msgid "%B: symbol `%s' required but not present" msgstr "" -#: elf.c:5595 +#: elf.c:5618 msgid "%B: warning: Empty loadable segment detected, is this intentional ?\n" msgstr "" -#: elf.c:6622 +#: elf.c:6645 #, c-format msgid "" "Unable to find equivalent output section for symbol '%s' from section '%s'" msgstr "" -#: elf.c:7611 +#: elf.c:7634 msgid "%B: unsupported relocation type %s" msgstr "" @@ -941,11 +950,11 @@ msgstr "" msgid "%B(%A+0x%lx): %s relocation against SEC_MERGE section" msgstr "" -#: elf32-arm.c:9074 elf32-m68k.c:4191 elf32-xtensa.c:2805 elf64-ppc.c:11689 +#: elf32-arm.c:9074 elf32-m68k.c:4191 elf32-xtensa.c:2805 elf64-ppc.c:11712 msgid "%B(%A+0x%lx): %s used with TLS symbol %s" msgstr "" -#: elf32-arm.c:9075 elf32-m68k.c:4192 elf32-xtensa.c:2806 elf64-ppc.c:11690 +#: elf32-arm.c:9075 elf32-m68k.c:4192 elf32-xtensa.c:2806 elf64-ppc.c:11713 msgid "%B(%A+0x%lx): %s used with non-TLS symbol %s" msgstr "" @@ -983,254 +992,254 @@ msgstr "" msgid "error: %B: Conflicting CPU architectures %d/%d" msgstr "" -#: elf32-arm.c:9942 +#: elf32-arm.c:9939 msgid "" "Error: %B has both the current and legacy Tag_MPextension_use attributes" msgstr "" -#: elf32-arm.c:9967 +#: elf32-arm.c:9964 msgid "error: %B uses VFP register arguments, %B does not" msgstr "" -#: elf32-arm.c:10112 +#: elf32-arm.c:10109 msgid "error: %B: unable to merge virtualization attributes with %B" msgstr "" -#: elf32-arm.c:10138 +#: elf32-arm.c:10135 msgid "error: %B: Conflicting architecture profiles %c/%c" msgstr "" -#: elf32-arm.c:10239 +#: elf32-arm.c:10236 msgid "Warning: %B: Conflicting platform configuration" msgstr "" -#: elf32-arm.c:10248 +#: elf32-arm.c:10245 msgid "error: %B: Conflicting use of R9" msgstr "" -#: elf32-arm.c:10260 +#: elf32-arm.c:10257 msgid "error: %B: SB relative addressing conflicts with use of R9" msgstr "" -#: elf32-arm.c:10273 +#: elf32-arm.c:10270 msgid "" "warning: %B uses %u-byte wchar_t yet the output is to use %u-byte wchar_t; " "use of wchar_t values across objects may fail" msgstr "" -#: elf32-arm.c:10304 +#: elf32-arm.c:10301 msgid "" "warning: %B uses %s enums yet the output is to use %s enums; use of enum " "values across objects may fail" msgstr "" -#: elf32-arm.c:10316 +#: elf32-arm.c:10313 msgid "error: %B uses iWMMXt register arguments, %B does not" msgstr "" -#: elf32-arm.c:10333 +#: elf32-arm.c:10330 msgid "error: fp16 format mismatch between %B and %B" msgstr "" -#: elf32-arm.c:10357 +#: elf32-arm.c:10354 msgid "DIV usage mismatch between %B and %B" msgstr "" -#: elf32-arm.c:10376 +#: elf32-arm.c:10373 msgid "%B has has both the current and legacy Tag_MPextension_use attributes" msgstr "" #. Ignore init flag - it may not be set, despite the flags field #. containing valid data. #. Ignore init flag - it may not be set, despite the flags field containing valid data. -#: elf32-arm.c:10468 elf32-bfin.c:5065 elf32-cris.c:4162 elf32-m68hc1x.c:1282 +#: elf32-arm.c:10461 elf32-bfin.c:5065 elf32-cris.c:4162 elf32-m68hc1x.c:1282 #: elf32-m68k.c:1235 elf32-score.c:3996 elf32-score7.c:3803 elf32-vax.c:528 -#: elfxx-mips.c:12842 +#: elfxx-mips.c:12845 #, c-format msgid "private flags = %lx:" msgstr "" -#: elf32-arm.c:10477 +#: elf32-arm.c:10470 #, c-format msgid " [interworking enabled]" msgstr "" -#: elf32-arm.c:10485 +#: elf32-arm.c:10478 #, c-format msgid " [VFP float format]" msgstr "" -#: elf32-arm.c:10487 +#: elf32-arm.c:10480 #, c-format msgid " [Maverick float format]" msgstr "" -#: elf32-arm.c:10489 +#: elf32-arm.c:10482 #, c-format msgid " [FPA float format]" msgstr "" -#: elf32-arm.c:10498 +#: elf32-arm.c:10491 #, c-format msgid " [new ABI]" msgstr "" -#: elf32-arm.c:10501 +#: elf32-arm.c:10494 #, c-format msgid " [old ABI]" msgstr "" -#: elf32-arm.c:10504 +#: elf32-arm.c:10497 #, c-format msgid " [software FP]" msgstr "" -#: elf32-arm.c:10513 +#: elf32-arm.c:10506 #, c-format msgid " [Version1 EABI]" msgstr "" -#: elf32-arm.c:10516 elf32-arm.c:10527 +#: elf32-arm.c:10509 elf32-arm.c:10520 #, c-format msgid " [sorted symbol table]" msgstr "" -#: elf32-arm.c:10518 elf32-arm.c:10529 +#: elf32-arm.c:10511 elf32-arm.c:10522 #, c-format msgid " [unsorted symbol table]" msgstr "" -#: elf32-arm.c:10524 +#: elf32-arm.c:10517 #, c-format msgid " [Version2 EABI]" msgstr "" -#: elf32-arm.c:10532 +#: elf32-arm.c:10525 #, c-format msgid " [dynamic symbols use segment index]" msgstr "" -#: elf32-arm.c:10535 +#: elf32-arm.c:10528 #, c-format msgid " [mapping symbols precede others]" msgstr "" -#: elf32-arm.c:10542 +#: elf32-arm.c:10535 #, c-format msgid " [Version3 EABI]" msgstr "" -#: elf32-arm.c:10546 +#: elf32-arm.c:10539 #, c-format msgid " [Version4 EABI]" msgstr "" -#: elf32-arm.c:10550 +#: elf32-arm.c:10543 #, c-format msgid " [Version5 EABI]" msgstr "" -#: elf32-arm.c:10553 +#: elf32-arm.c:10546 #, c-format msgid " [BE8]" msgstr "" -#: elf32-arm.c:10556 +#: elf32-arm.c:10549 #, c-format msgid " [LE8]" msgstr "" -#: elf32-arm.c:10562 +#: elf32-arm.c:10555 #, c-format msgid " <EABI version unrecognised>" msgstr "" -#: elf32-arm.c:10569 +#: elf32-arm.c:10562 #, c-format msgid " [relocatable executable]" msgstr "" -#: elf32-arm.c:10572 +#: elf32-arm.c:10565 #, c-format msgid " [has entry point]" msgstr "" -#: elf32-arm.c:10577 +#: elf32-arm.c:10570 #, c-format msgid "<Unrecognised flag bits set>" msgstr "" -#: elf32-arm.c:10824 elf32-i386.c:1322 elf32-s390.c:1000 elf32-xtensa.c:1009 +#: elf32-arm.c:10817 elf32-i386.c:1322 elf32-s390.c:1000 elf32-xtensa.c:1009 #: elf64-s390.c:960 elf64-x86-64.c:1105 elfxx-sparc.c:1370 msgid "%B: bad symbol index: %d" msgstr "" -#: elf32-arm.c:10946 elf64-x86-64.c:1265 elf64-x86-64.c:1434 elfxx-mips.c:7942 +#: elf32-arm.c:10939 elf64-x86-64.c:1265 elf64-x86-64.c:1434 elfxx-mips.c:7942 msgid "" "%B: relocation %s against `%s' can not be used when making a shared object; " "recompile with -fPIC" msgstr "" -#: elf32-arm.c:11948 +#: elf32-arm.c:11941 #, c-format msgid "Errors encountered processing file %s" msgstr "" -#: elf32-arm.c:13334 +#: elf32-arm.c:13327 msgid "%B: error: Cortex-A8 erratum stub is allocated in unsafe location" msgstr "" #. There's not much we can do apart from complain if this #. happens. -#: elf32-arm.c:13361 +#: elf32-arm.c:13354 msgid "%B: error: Cortex-A8 erratum stub out of range (input file too large)" msgstr "" -#: elf32-arm.c:13455 elf32-arm.c:13477 +#: elf32-arm.c:13448 elf32-arm.c:13470 msgid "%B: error: VFP11 veneer out of range" msgstr "" -#: elf32-arm.c:14002 +#: elf32-arm.c:13995 msgid "error: %B is already in final BE8 format" msgstr "" -#: elf32-arm.c:14078 +#: elf32-arm.c:14071 msgid "" "error: Source object %B has EABI version %d, but target %B has EABI version %" "d" msgstr "" -#: elf32-arm.c:14094 +#: elf32-arm.c:14087 msgid "error: %B is compiled for APCS-%d, whereas target %B uses APCS-%d" msgstr "" -#: elf32-arm.c:14119 +#: elf32-arm.c:14112 msgid "error: %B uses VFP instructions, whereas %B does not" msgstr "" -#: elf32-arm.c:14123 +#: elf32-arm.c:14116 msgid "error: %B uses FPA instructions, whereas %B does not" msgstr "" -#: elf32-arm.c:14133 +#: elf32-arm.c:14126 msgid "error: %B uses Maverick instructions, whereas %B does not" msgstr "" -#: elf32-arm.c:14137 +#: elf32-arm.c:14130 msgid "error: %B does not use Maverick instructions, whereas %B does" msgstr "" -#: elf32-arm.c:14156 +#: elf32-arm.c:14149 msgid "error: %B uses software FP, whereas %B uses hardware FP" msgstr "" -#: elf32-arm.c:14160 +#: elf32-arm.c:14153 msgid "error: %B uses hardware FP, whereas %B uses software FP" msgstr "" #: elf32-avr.c:1271 elf32-bfin.c:3201 elf32-cris.c:2085 elf32-fr30.c:617 #: elf32-frv.c:4119 elf32-i860.c:1219 elf32-ip2k.c:1479 elf32-iq2000.c:692 -#: elf32-m32c.c:561 elf32-mep.c:542 elf32-moxie.c:290 elf32-msp430.c:494 +#: elf32-m32c.c:561 elf32-mep.c:543 elf32-moxie.c:290 elf32-msp430.c:494 #: elf32-mt.c:399 elf32-openrisc.c:412 elf32-v850.c:2151 elf32-xstormy16.c:949 #: elf64-mmix.c:1530 msgid "internal error: dangerous relocation" @@ -1240,6 +1249,10 @@ msgstr "" msgid "%B: cannot create stub entry %s" msgstr "" +#: elf32-bfin.c:107 elf32-bfin.c:363 +msgid "relocation should be even number" +msgstr "" + #: elf32-bfin.c:1575 msgid "%B(%A+0x%lx): unresolvable relocation against symbol `%s'" msgstr "" @@ -1296,6 +1309,11 @@ msgstr "" msgid "%s: cannot link fdpic object file into non-fdpic executable" msgstr "" +#: elf32-bfin.c:5269 +#, c-format +msgid "*** check this relocation %s" +msgstr "" + #: elf32-cris.c:1172 msgid "%B, section %A: unresolvable relocation %s against symbol `%s'" msgstr "" @@ -1414,6 +1432,16 @@ msgstr "" msgid "%B contains non-CRIS-v32 code, incompatible with previous objects" msgstr "" +#: elf32-dlx.c:142 +#, c-format +msgid "BFD Link Error: branch (PC rel16) to section (%s) not supported" +msgstr "" + +#: elf32-dlx.c:204 +#, c-format +msgid "BFD Link Error: jump (PC rel26) to section (%s) not supported" +msgstr "" + #: elf32-frv.c:1509 elf32-frv.c:1658 msgid "relocation requires zero addend" msgstr "" @@ -1709,7 +1737,7 @@ msgstr "" msgid "%B: linking files compiled for HCS12 with others compiled for HC12" msgstr "" -#: elf32-m68hc1x.c:1257 elf32-ppc.c:4232 elf64-sparc.c:703 elfxx-mips.c:12704 +#: elf32-m68hc1x.c:1257 elf32-ppc.c:4233 elf64-sparc.c:703 elfxx-mips.c:12707 msgid "%B: uses different e_flags (0x%lx) fields than previous modules (0x%lx)" msgstr "" @@ -1782,15 +1810,26 @@ msgstr "" msgid "%B: Unknown relocation type %d\n" msgstr "" -#: elf32-mep.c:647 +#. Pacify gcc -Wall. +#: elf32-mep.c:157 +#, c-format +msgid "mep: no reloc for code %d" +msgstr "" + +#: elf32-mep.c:163 +#, c-format +msgid "MeP: howto %d has type %d" +msgstr "" + +#: elf32-mep.c:648 msgid "%B and %B are for different cores" msgstr "" -#: elf32-mep.c:664 +#: elf32-mep.c:665 msgid "%B and %B are for different configurations" msgstr "" -#: elf32-mep.c:701 +#: elf32-mep.c:702 #, c-format msgid "private flags = 0x%lx" msgstr "" @@ -1809,7 +1848,7 @@ msgstr "" msgid "%B: probably compiled without -fPIC?" msgstr "" -#: elf32-microblaze.c:2074 elflink.c:12601 +#: elf32-microblaze.c:2074 elflink.c:12607 msgid "%B: bad relocation section name `%s'" msgstr "" @@ -1851,91 +1890,91 @@ msgstr "" msgid "failed to install new APUinfo section." msgstr "" -#: elf32-ppc.c:3358 +#: elf32-ppc.c:3359 msgid "%B: relocation %s cannot be used when making a shared object" msgstr "" #. It does not make sense to have a procedure linkage #. table entry for a local symbol. -#: elf32-ppc.c:3702 +#: elf32-ppc.c:3703 msgid "%B(%A+0x%lx): %s reloc against local symbol" msgstr "" -#: elf32-ppc.c:4044 elf32-ppc.c:4059 elfxx-mips.c:12411 elfxx-mips.c:12437 +#: elf32-ppc.c:4045 elf32-ppc.c:4060 elfxx-mips.c:12411 elfxx-mips.c:12437 #: elfxx-mips.c:12459 elfxx-mips.c:12485 msgid "Warning: %B uses hard float, %B uses soft float" msgstr "" -#: elf32-ppc.c:4047 elf32-ppc.c:4051 +#: elf32-ppc.c:4048 elf32-ppc.c:4052 msgid "" "Warning: %B uses double-precision hard float, %B uses single-precision hard " "float" msgstr "" -#: elf32-ppc.c:4055 +#: elf32-ppc.c:4056 msgid "Warning: %B uses soft float, %B uses single-precision hard float" msgstr "" -#: elf32-ppc.c:4062 elf32-ppc.c:4066 elfxx-mips.c:12391 elfxx-mips.c:12395 +#: elf32-ppc.c:4063 elf32-ppc.c:4067 elfxx-mips.c:12391 elfxx-mips.c:12395 msgid "Warning: %B uses unknown floating point ABI %d" msgstr "" -#: elf32-ppc.c:4108 elf32-ppc.c:4112 +#: elf32-ppc.c:4109 elf32-ppc.c:4113 msgid "Warning: %B uses unknown vector ABI %d" msgstr "" -#: elf32-ppc.c:4116 +#: elf32-ppc.c:4117 msgid "Warning: %B uses vector ABI \"%s\", %B uses \"%s\"" msgstr "" -#: elf32-ppc.c:4133 elf32-ppc.c:4136 +#: elf32-ppc.c:4134 elf32-ppc.c:4137 msgid "Warning: %B uses r3/r4 for small structure returns, %B uses memory" msgstr "" -#: elf32-ppc.c:4139 elf32-ppc.c:4143 +#: elf32-ppc.c:4140 elf32-ppc.c:4144 msgid "Warning: %B uses unknown small structure return convention %d" msgstr "" -#: elf32-ppc.c:4197 +#: elf32-ppc.c:4198 msgid "" "%B: compiled with -mrelocatable and linked with modules compiled normally" msgstr "" -#: elf32-ppc.c:4205 +#: elf32-ppc.c:4206 msgid "" "%B: compiled normally and linked with modules compiled with -mrelocatable" msgstr "" -#: elf32-ppc.c:4293 +#: elf32-ppc.c:4294 msgid "Using bss-plt due to %B" msgstr "" -#: elf32-ppc.c:7192 elf64-ppc.c:12307 +#: elf32-ppc.c:7193 elf64-ppc.c:12330 msgid "%B: unknown relocation type %d for symbol %s" msgstr "" -#: elf32-ppc.c:7453 +#: elf32-ppc.c:7454 msgid "%B(%A+0x%lx): non-zero addend on %s reloc against `%s'" msgstr "" -#: elf32-ppc.c:7651 elf64-ppc.c:12812 +#: elf32-ppc.c:7652 elf64-ppc.c:12835 msgid "%B(%A+0x%lx): relocation %s for indirect function %s unsupported" msgstr "" -#: elf32-ppc.c:7881 elf32-ppc.c:7911 elf32-ppc.c:7958 +#: elf32-ppc.c:7882 elf32-ppc.c:7912 elf32-ppc.c:7959 msgid "" "%B: the target (%s) of a %s relocation is in the wrong output section (%s)" msgstr "" -#: elf32-ppc.c:8030 +#: elf32-ppc.c:8031 msgid "%B: relocation %s is not yet supported for symbol %s." msgstr "" -#: elf32-ppc.c:8138 elf64-ppc.c:13162 +#: elf32-ppc.c:8139 elf64-ppc.c:13185 msgid "%B(%A+0x%lx): %s reloc against `%s': error %d" msgstr "" -#: elf32-ppc.c:8629 +#: elf32-ppc.c:8630 #, c-format msgid "%s not defined in linker created %s" msgstr "" @@ -2212,7 +2251,7 @@ msgstr "" msgid "overlay stub relocation overflow" msgstr "" -#: elf32-spu.c:1960 elf64-ppc.c:11327 +#: elf32-spu.c:1960 elf64-ppc.c:11350 msgid "stubs don't match calculated size" msgstr "" @@ -2378,8 +2417,7 @@ msgid "" msgstr "" #: elf32-v850.c:483 -#, c-format -msgid "FAILED to find previous HI16 reloc\n" +msgid "FAILED to find previous HI16 reloc" msgstr "" #: elf32-v850.c:2155 @@ -2466,7 +2504,7 @@ msgstr "" msgid "%s: warning: %s relocation to 0x%x from %s section" msgstr "" -#: elf32-xstormy16.c:451 elf32-ia64.c:2861 elf64-ia64.c:2861 +#: elf32-xstormy16.c:451 elf32-ia64.c:2854 elf64-ia64.c:2854 msgid "non-zero addend in @fptr reloc" msgstr "" @@ -2565,12 +2603,12 @@ msgstr "" msgid "%B: tp-relative relocation against dynamic symbol %s" msgstr "" -#: elf64-hppa.c:2101 +#: elf64-hppa.c:2094 #, c-format msgid "stub entry for %s cannot load .plt, dp offset = %ld" msgstr "" -#: elf64-hppa.c:3299 +#: elf64-hppa.c:3292 msgid "%B(%A+0x%lx): cannot reach %s" msgstr "" @@ -2689,11 +2727,11 @@ msgstr "" msgid "can't build branch stub `%s'" msgstr "" -#: elf64-ppc.c:10684 +#: elf64-ppc.c:10707 msgid "%B section %A exceeds stub group size" msgstr "" -#: elf64-ppc.c:11339 +#: elf64-ppc.c:11362 #, c-format msgid "" "linker stubs in %u group%s\n" @@ -2704,24 +2742,24 @@ msgid "" " plt call %lu" msgstr "" -#: elf64-ppc.c:12190 +#: elf64-ppc.c:12213 msgid "" "%B(%A+0x%lx): automatic multiple TOCs not supported using your crt files; " "recompile with -mminimal-toc or upgrade gcc" msgstr "" -#: elf64-ppc.c:12198 +#: elf64-ppc.c:12221 msgid "" "%B(%A+0x%lx): sibling call optimization to `%s' does not allow automatic " "multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, " "or make `%s' extern" msgstr "" -#: elf64-ppc.c:12919 +#: elf64-ppc.c:12942 msgid "%B: relocation %s is not supported for symbol %s." msgstr "" -#: elf64-ppc.c:13096 +#: elf64-ppc.c:13119 msgid "%B: error: relocation %s not a multiple of %d" msgstr "" @@ -2881,116 +2919,132 @@ msgid "" "note: '%s' is defined in DSO %B so try adding it to the linker command line" msgstr "" -#: elflink.c:5779 +#: elflink.c:5776 #, c-format msgid "%s: undefined version: %s" msgstr "" -#: elflink.c:5847 +#: elflink.c:5844 msgid "%B: .preinit_array section is not allowed in DSO" msgstr "" -#: elflink.c:7598 +#: elflink.c:7595 #, c-format msgid "undefined %s reference in complex symbol: %s" msgstr "" -#: elflink.c:7752 +#: elflink.c:7749 #, c-format msgid "unknown operator '%c' in complex symbol" msgstr "" -#: elflink.c:8091 elflink.c:8108 elflink.c:8145 elflink.c:8162 +#: elflink.c:8088 elflink.c:8105 elflink.c:8142 elflink.c:8159 msgid "%B: Unable to sort relocs - they are in more than one size" msgstr "" -#: elflink.c:8122 elflink.c:8176 +#: elflink.c:8119 elflink.c:8173 msgid "%B: Unable to sort relocs - they are of an unknown size" msgstr "" -#: elflink.c:8227 +#: elflink.c:8224 msgid "Not enough memory to sort relocations" msgstr "" -#: elflink.c:8420 +#: elflink.c:8417 msgid "%B: Too many sections: %d (>= %d)" msgstr "" -#: elflink.c:8663 -msgid "%B: %s symbol `%s' in %B is referenced by DSO" +#: elflink.c:8664 +msgid "%B: internal symbol `%s' in %B is referenced by DSO" +msgstr "" + +#: elflink.c:8666 +msgid "%B: hidden symbol `%s' in %B is referenced by DSO" +msgstr "" + +#: elflink.c:8668 +msgid "%B: local symbol `%s' in %B is referenced by DSO" msgstr "" -#: elflink.c:8754 +#: elflink.c:8757 msgid "%B: could not find output section %A for input section %A" msgstr "" -#: elflink.c:8874 -msgid "%B: %s symbol `%s' isn't defined" +#: elflink.c:8880 +msgid "%B: protected symbol `%s' isn't defined" msgstr "" -#: elflink.c:9428 +#: elflink.c:8882 +msgid "%B: internal symbol `%s' isn't defined" +msgstr "" + +#: elflink.c:8884 +msgid "%B: hidden symbol `%s' isn't defined" +msgstr "" + +#: elflink.c:9434 msgid "" "error: %B contains a reloc (0x%s) for section %A that references a non-" "existent global symbol" msgstr "" -#: elflink.c:9494 +#: elflink.c:9500 msgid "" "%X`%s' referenced in section `%A' of %B: defined in discarded section `%A' " "of %B\n" msgstr "" -#: elflink.c:10141 +#: elflink.c:10147 msgid "%A has both ordered [`%A' in %B] and unordered [`%A' in %B] sections" msgstr "" -#: elflink.c:10146 +#: elflink.c:10152 #, c-format msgid "%A has both ordered and unordered sections" msgstr "" -#: elflink.c:10992 elflink.c:11036 +#: elflink.c:10998 elflink.c:11042 msgid "%B: could not find output section %s" msgstr "" -#: elflink.c:10997 +#: elflink.c:11003 #, c-format msgid "warning: %s section has zero size" msgstr "" -#: elflink.c:11102 +#: elflink.c:11108 msgid "%P: warning: creating a DT_TEXTREL in a shared object.\n" msgstr "" -#: elflink.c:11289 +#: elflink.c:11295 msgid "%P%X: can not read symbols: %E\n" msgstr "" -#: elflink.c:11638 +#: elflink.c:11644 msgid "Removing unused section '%s' in file '%B'" msgstr "" -#: elflink.c:11850 +#: elflink.c:11856 msgid "Warning: gc-sections option ignored" msgstr "" -#: elflink.c:12399 +#: elflink.c:12405 msgid "%B: ignoring duplicate section `%A'" msgstr "" -#: elflink.c:12406 elflink.c:12413 +#: elflink.c:12412 elflink.c:12419 msgid "%B: duplicate section `%A' has different size" msgstr "" -#: elflink.c:12421 elflink.c:12426 +#: elflink.c:12427 elflink.c:12432 msgid "%B: warning: could not read contents of section `%A'" msgstr "" -#: elflink.c:12430 +#: elflink.c:12436 msgid "%B: warning: duplicate section `%A' has different contents" msgstr "" -#: elflink.c:12531 linker.c:3138 +#: elflink.c:12537 linker.c:3136 msgid "%F%P: already_linked_table: %E\n" msgstr "" @@ -3065,68 +3119,68 @@ msgstr "" msgid "%B: ABI is incompatible with that of the selected emulation" msgstr "" -#: elfxx-mips.c:12613 +#: elfxx-mips.c:12616 msgid "%B: warning: linking abicalls files with non-abicalls files" msgstr "" -#: elfxx-mips.c:12630 +#: elfxx-mips.c:12633 msgid "%B: linking 32-bit code with 64-bit code" msgstr "" -#: elfxx-mips.c:12658 +#: elfxx-mips.c:12661 msgid "%B: linking %s module with previous %s modules" msgstr "" -#: elfxx-mips.c:12681 +#: elfxx-mips.c:12684 msgid "%B: ABI mismatch: linking %s module with previous %s modules" msgstr "" -#: elfxx-mips.c:12845 +#: elfxx-mips.c:12848 #, c-format msgid " [abi=O32]" msgstr "" -#: elfxx-mips.c:12847 +#: elfxx-mips.c:12850 #, c-format msgid " [abi=O64]" msgstr "" -#: elfxx-mips.c:12849 +#: elfxx-mips.c:12852 #, c-format msgid " [abi=EABI32]" msgstr "" -#: elfxx-mips.c:12851 +#: elfxx-mips.c:12854 #, c-format msgid " [abi=EABI64]" msgstr "" -#: elfxx-mips.c:12853 +#: elfxx-mips.c:12856 #, c-format msgid " [abi unknown]" msgstr "" -#: elfxx-mips.c:12855 +#: elfxx-mips.c:12858 #, c-format msgid " [abi=N32]" msgstr "" -#: elfxx-mips.c:12857 +#: elfxx-mips.c:12860 #, c-format msgid " [abi=64]" msgstr "" -#: elfxx-mips.c:12859 +#: elfxx-mips.c:12862 #, c-format msgid " [no abi set]" msgstr "" -#: elfxx-mips.c:12880 +#: elfxx-mips.c:12883 #, c-format msgid " [unknown ISA]" msgstr "" -#: elfxx-mips.c:12891 +#: elfxx-mips.c:12894 #, c-format msgid " [not 32bitmode]" msgstr "" @@ -3223,86 +3277,150 @@ msgstr "" msgid "%B: unable to get decompressed section %A" msgstr "" -#: libbfd.c:1027 +#: libbfd.c:1028 #, c-format msgid "Deprecated %s called at %s line %d in %s\n" msgstr "" -#: libbfd.c:1030 +#: libbfd.c:1031 #, c-format msgid "Deprecated %s called\n" msgstr "" -#: linker.c:1911 +#: linker.c:1909 msgid "%B: indirect symbol `%s' to `%s' is a loop" msgstr "" -#: linker.c:2778 +#: linker.c:2776 #, c-format msgid "Attempt to do relocatable link with %s input and %s output" msgstr "" -#: linker.c:3105 +#: linker.c:3103 msgid "%B: warning: ignoring duplicate section `%A'\n" msgstr "" -#: linker.c:3119 +#: linker.c:3117 msgid "%B: warning: duplicate section `%A' has different size\n" msgstr "" -#: mach-o.c:3403 +#: mach-o.c:381 +msgid "bfd_mach_o_canonicalize_symtab: unable to load symbols" +msgstr "" + +#: mach-o.c:1253 +#, c-format +msgid "unable to write unknown load command 0x%lx" +msgstr "" + +#: mach-o.c:1654 +#, c-format +msgid "bfd_mach_o_read_symtab_symbol: unable to read %d bytes at %lu" +msgstr "" + +#: mach-o.c:1671 +#, c-format +msgid "bfd_mach_o_read_symtab_symbol: symbol name out of range (%lu >= %lu)" +msgstr "" + +#: mach-o.c:1756 +#, c-format +msgid "" +"bfd_mach_o_read_symtab_symbol: symbol \"%s\" specified invalid section %d " +"(max %lu): setting to undefined" +msgstr "" + +#: mach-o.c:1764 +#, c-format +msgid "" +"bfd_mach_o_read_symtab_symbol: symbol \"%s\" is unsupported 'indirect' " +"reference: setting to undefined" +msgstr "" + +#: mach-o.c:1770 +#, c-format +msgid "" +"bfd_mach_o_read_symtab_symbol: symbol \"%s\" specified invalid type field 0x%" +"x: setting to undefined" +msgstr "" + +#: mach-o.c:1840 +msgid "bfd_mach_o_read_symtab_symbols: unable to allocate memory for symbols" +msgstr "" + +#: mach-o.c:1874 +#, c-format +msgid "bfd_mach_o_read_dysymtab_symbol: unable to read %lu bytes at %lu" +msgstr "" + +#: mach-o.c:2556 +#, c-format +msgid "unable to read unknown load command 0x%lx" +msgstr "" + +#: mach-o.c:2736 +#, c-format +msgid "bfd_mach_o_scan: unknown architecture 0x%lx/0x%lx" +msgstr "" + +#: mach-o.c:2832 +#, c-format +msgid "unknown header byte-order value 0x%lx" +msgstr "" + +#: mach-o.c:3402 msgid "Mach-O header:\n" msgstr "" -#: mach-o.c:3404 +#: mach-o.c:3403 #, c-format msgid " magic : %08lx\n" msgstr "" -#: mach-o.c:3405 +#: mach-o.c:3404 #, c-format msgid " cputype : %08lx (%s)\n" msgstr "" -#: mach-o.c:3407 +#: mach-o.c:3406 #, c-format msgid " cpusubtype: %08lx\n" msgstr "" -#: mach-o.c:3408 +#: mach-o.c:3407 #, c-format msgid " filetype : %08lx (%s)\n" msgstr "" -#: mach-o.c:3411 +#: mach-o.c:3410 #, c-format msgid " ncmds : %08lx (%lu)\n" msgstr "" -#: mach-o.c:3412 +#: mach-o.c:3411 #, c-format msgid " sizeofcmds: %08lx\n" msgstr "" -#: mach-o.c:3413 +#: mach-o.c:3412 #, c-format msgid " flags : %08lx (" msgstr "" -#: mach-o.c:3415 vms-alpha.c:7652 +#: mach-o.c:3414 vms-alpha.c:7652 msgid ")\n" msgstr "" -#: mach-o.c:3416 +#: mach-o.c:3415 #, c-format msgid " reserved : %08x\n" msgstr "" -#: mach-o.c:3426 +#: mach-o.c:3425 msgid "Segments and Sections:\n" msgstr "" -#: mach-o.c:3427 +#: mach-o.c:3426 msgid " #: Segment name Section name Address\n" msgstr "" @@ -3483,6 +3601,11 @@ msgstr "" msgid "%B: bad pair/reflo after refhi\n" msgstr "" +#: pef.c:519 +#, c-format +msgid "bfd_pef_scan: unknown architecture 0x%lx" +msgstr "" + #: pei-x86_64.c:444 #, c-format msgid "warning: .pdata section size (%ld) is not a multiple of %d\n" @@ -3581,6 +3704,11 @@ msgstr "" msgid "Partition[%d] length = 0x%.8lx (%ld)\n" msgstr "" +#: rs6000-core.c:448 +#, c-format +msgid "%s: warning core file truncated" +msgstr "" + #: som.c:5471 #, c-format msgid "" @@ -5483,11 +5611,11 @@ msgstr "" #. FIXME: we do not yet support relocatable link. It is not obvious #. how to do it for debug infos. -#: vms-alpha.c:8676 +#: vms-alpha.c:8671 msgid "%P: relocatable link is not supported\n" msgstr "" -#: vms-alpha.c:8746 +#: vms-alpha.c:8741 msgid "%P: multiple entry points: in modules %B and %B\n" msgstr "" @@ -5546,33 +5674,33 @@ msgstr "" msgid "%B: reloc %s:%d not in csect" msgstr "" -#: xcofflink.c:3186 +#: xcofflink.c:3194 #, c-format msgid "%s: no such symbol" msgstr "" -#: xcofflink.c:3291 +#: xcofflink.c:3299 #, c-format msgid "warning: attempt to export undefined symbol `%s'" msgstr "" -#: xcofflink.c:3673 +#: xcofflink.c:3681 msgid "error: undefined symbol __rtinit" msgstr "" -#: xcofflink.c:4052 +#: xcofflink.c:4060 msgid "%B: loader reloc in unrecognized section `%s'" msgstr "" -#: xcofflink.c:4063 +#: xcofflink.c:4071 msgid "%B: `%s' in loader reloc but not loader sym" msgstr "" -#: xcofflink.c:4079 +#: xcofflink.c:4087 msgid "%B: loader reloc in read-only section %A" msgstr "" -#: xcofflink.c:5097 +#: xcofflink.c:5105 #, c-format msgid "TOC overflow: 0x%lx > 0x10000; try -mminimal-toc when compiling" msgstr "" @@ -5583,77 +5711,77 @@ msgid "" "branch." msgstr "" -#: elf32-ia64.c:2809 elf64-ia64.c:2809 +#: elf32-ia64.c:2802 elf64-ia64.c:2802 msgid "@pltoff reloc against local symbol" msgstr "" -#: elf32-ia64.c:4430 elf64-ia64.c:4430 +#: elf32-ia64.c:4423 elf64-ia64.c:4423 #, c-format msgid "%s: short data segment overflowed (0x%lx >= 0x400000)" msgstr "" -#: elf32-ia64.c:4441 elf64-ia64.c:4441 +#: elf32-ia64.c:4434 elf64-ia64.c:4434 #, c-format msgid "%s: __gp does not cover short data segment" msgstr "" -#: elf32-ia64.c:4708 elf64-ia64.c:4708 +#: elf32-ia64.c:4701 elf64-ia64.c:4701 msgid "%B: non-pic code with imm relocation against dynamic symbol `%s'" msgstr "" -#: elf32-ia64.c:4775 elf64-ia64.c:4775 +#: elf32-ia64.c:4768 elf64-ia64.c:4768 msgid "%B: @gprel relocation against dynamic symbol %s" msgstr "" -#: elf32-ia64.c:4838 elf64-ia64.c:4838 +#: elf32-ia64.c:4831 elf64-ia64.c:4831 msgid "%B: linking non-pic code in a position independent executable" msgstr "" -#: elf32-ia64.c:4975 elf64-ia64.c:4975 +#: elf32-ia64.c:4968 elf64-ia64.c:4968 msgid "%B: @internal branch to dynamic symbol %s" msgstr "" -#: elf32-ia64.c:4977 elf64-ia64.c:4977 +#: elf32-ia64.c:4970 elf64-ia64.c:4970 msgid "%B: speculation fixup to dynamic symbol %s" msgstr "" -#: elf32-ia64.c:4979 elf64-ia64.c:4979 +#: elf32-ia64.c:4972 elf64-ia64.c:4972 msgid "%B: @pcrel relocation against dynamic symbol %s" msgstr "" -#: elf32-ia64.c:5176 elf64-ia64.c:5176 +#: elf32-ia64.c:5169 elf64-ia64.c:5169 msgid "unsupported reloc" msgstr "" -#: elf32-ia64.c:5214 elf64-ia64.c:5214 +#: elf32-ia64.c:5207 elf64-ia64.c:5207 msgid "" "%B: missing TLS section for relocation %s against `%s' at 0x%lx in section `%" "A'." msgstr "" -#: elf32-ia64.c:5229 elf64-ia64.c:5229 +#: elf32-ia64.c:5222 elf64-ia64.c:5222 msgid "" "%B: Can't relax br (%s) to `%s' at 0x%lx in section `%A' with size 0x%lx (> " "0x1000000)." msgstr "" -#: elf32-ia64.c:5491 elf64-ia64.c:5491 +#: elf32-ia64.c:5484 elf64-ia64.c:5484 msgid "%B: linking trap-on-NULL-dereference with non-trapping files" msgstr "" -#: elf32-ia64.c:5500 elf64-ia64.c:5500 +#: elf32-ia64.c:5493 elf64-ia64.c:5493 msgid "%B: linking big-endian files with little-endian files" msgstr "" -#: elf32-ia64.c:5509 elf64-ia64.c:5509 +#: elf32-ia64.c:5502 elf64-ia64.c:5502 msgid "%B: linking 64-bit files with 32-bit files" msgstr "" -#: elf32-ia64.c:5518 elf64-ia64.c:5518 +#: elf32-ia64.c:5511 elf64-ia64.c:5511 msgid "%B: linking constant-gp files with non-constant-gp files" msgstr "" -#: elf32-ia64.c:5528 elf64-ia64.c:5528 +#: elf32-ia64.c:5521 elf64-ia64.c:5521 msgid "%B: linking auto-pic files with non-auto-pic files" msgstr "" diff --git a/bfd/section.c b/bfd/section.c index 51c2196bc4..bff8adfb07 100644 --- a/bfd/section.c +++ b/bfd/section.c @@ -1215,6 +1215,29 @@ bfd_set_section_flags (bfd *abfd ATTRIBUTE_UNUSED, /* FUNCTION + bfd_rename_section + +SYNOPSIS + void bfd_rename_section + (bfd *abfd, asection *sec, const char *newname); + +DESCRIPTION + Rename section @var{sec} in @var{abfd} to @var{newname}. +*/ + +void +bfd_rename_section (bfd *abfd, sec_ptr sec, const char *newname) +{ + struct section_hash_entry *sh; + + sh = (struct section_hash_entry *) + ((char *) sec - offsetof (struct section_hash_entry, section)); + sh->section.name = newname; + bfd_hash_rename (&abfd->section_htab, newname, &sh->root); +} + +/* +FUNCTION bfd_map_over_sections SYNOPSIS @@ -1,6 +1,6 @@ /* bfd back-end for HP PA-RISC SOM objects. Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 + 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. Contributed by the Center for Software Science at the @@ -5774,7 +5774,6 @@ som_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *info ATTRIBUTE_UNUSED) { (*_bfd_error_handler) (_("som_sizeof_headers unimplemented")); - fflush (stderr); abort (); return 0; } diff --git a/bfd/vms-alpha.c b/bfd/vms-alpha.c index ba195f9e71..309c3a241b 100644 --- a/bfd/vms-alpha.c +++ b/bfd/vms-alpha.c @@ -8220,7 +8220,6 @@ alpha_vms_link_add_archive_symbols (bfd *abfd, struct bfd_link_info *info) symindex symidx; bfd *element; bfd *orig_element; - bfd *subsbfd; h = *pundef; next_pundef = &(*pundef)->u.undef.next; @@ -8278,14 +8277,10 @@ alpha_vms_link_add_archive_symbols (bfd *abfd, struct bfd_link_info *info) /* Unlike the generic linker, we know that this element provides a definition for an undefined symbol and we know that we want to include it. We don't need to check anything. */ - subsbfd = NULL; - if (! (*info->callbacks->add_archive_element) - (info, element, h->root.string, &subsbfd)) + if (!(*info->callbacks + ->add_archive_element) (info, element, h->root.string, &element)) return FALSE; - /* Potentially, the add_archive_element hook may have set a - substitute BFD for us. */ - if (! alpha_vms_link_add_object_symbols (subsbfd ? subsbfd : element, - info)) + if (!alpha_vms_link_add_object_symbols (element, info)) return FALSE; orig_element->archive_pass = pass; diff --git a/bfd/xcofflink.c b/bfd/xcofflink.c index c055b260d6..d3e9043dc3 100644 --- a/bfd/xcofflink.c +++ b/bfd/xcofflink.c @@ -2292,8 +2292,8 @@ xcoff_link_check_dynamic_ar_symbols (bfd *abfd, && (((struct xcoff_link_hash_entry *) h)->flags & XCOFF_DEF_DYNAMIC) == 0) { - if (! (*info->callbacks->add_archive_element) - (info, abfd, name, subsbfd)) + if (!(*info->callbacks + ->add_archive_element) (info, abfd, name, subsbfd)) return FALSE; *pneeded = TRUE; return TRUE; @@ -2364,8 +2364,8 @@ xcoff_link_check_ar_symbols (bfd *abfd, || (((struct xcoff_link_hash_entry *) h)->flags & XCOFF_DEF_DYNAMIC) == 0)) { - if (! (*info->callbacks->add_archive_element) - (info, abfd, name, subsbfd)) + if (!(*info->callbacks + ->add_archive_element) (info, abfd, name, subsbfd)) return FALSE; *pneeded = TRUE; return TRUE; @@ -2390,22 +2390,30 @@ xcoff_link_check_archive_element (bfd *abfd, bfd_boolean *pneeded) { bfd_boolean keep_syms_p; - bfd *subsbfd = NULL; + bfd *oldbfd; keep_syms_p = (obj_coff_external_syms (abfd) != NULL); - if (! _bfd_coff_get_external_symbols (abfd)) + if (!_bfd_coff_get_external_symbols (abfd)) return FALSE; - if (! xcoff_link_check_ar_symbols (abfd, info, pneeded, &subsbfd)) + oldbfd = abfd; + if (!xcoff_link_check_ar_symbols (abfd, info, pneeded, &abfd)) return FALSE; if (*pneeded) { /* Potentially, the add_archive_element hook may have set a substitute BFD for us. */ - if (subsbfd && !_bfd_coff_get_external_symbols (subsbfd)) - return FALSE; - if (! xcoff_link_add_symbols (subsbfd ? subsbfd : abfd, info)) + if (abfd != oldbfd) + { + if (!keep_syms_p + && !_bfd_coff_free_symbols (oldbfd)) + return FALSE; + keep_syms_p = (obj_coff_external_syms (abfd) != NULL); + if (!_bfd_coff_get_external_symbols (abfd)) + return FALSE; + } + if (!xcoff_link_add_symbols (abfd, info)) return FALSE; if (info->keep_memory) keep_syms_p = TRUE; @@ -2413,7 +2421,7 @@ xcoff_link_check_archive_element (bfd *abfd, if (!keep_syms_p) { - if (! _bfd_coff_free_symbols (abfd)) + if (!_bfd_coff_free_symbols (abfd)) return FALSE; } |