--- binutils-2.17.50.0.6/bfd/elflink.c.orig 2007-01-22 18:59:09 +0000 +++ binutils-2.17.50.0.6/bfd/elflink.c 2007-01-22 19:01:25 +0000 @@ -6939,24 +6939,26 @@ elf_link_output_extsym (struct elf_link_ { (*_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); +#ifdef ENABLE_STRICT_SYMBOL_CHECKING eoinfo->failed = TRUE; return FALSE; +#endif /* ENABLE_STRICT_SYMBOL_CHECKING */ } /* We don't want to output symbols that have never been mentioned by a regular file, or that we have been told to strip. However, if h->indx is set to -2, the symbol is used by a reloc and we must output it. */ if (h->indx == -2) strip = FALSE; else if ((h->def_dynamic || h->ref_dynamic || h->root.type == bfd_link_hash_new) @@ -7117,24 +7119,26 @@ elf_link_output_extsym (struct elf_link_ && 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); +#ifdef ENABLE_STRICT_SYMBOL_CHECKING eoinfo->failed = TRUE; return FALSE; +#endif /* ENABLE_STRICT_SYMBOL_CHECKING */ } /* If this symbol should be put in the .dynsym section, then put it there now. We already know the symbol index. We also fill in the entry in the .hash section. */ if (h->dynindx != -1 && elf_hash_table (finfo->info)->dynamic_sections_created) { bfd_byte *esym; sym.st_name = h->dynstr_index;