diff options
author | Ian Lance Taylor <ian@airs.com> | 1998-12-02 05:59:07 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1998-12-02 05:59:07 +0000 |
commit | 3ac83be0c79829d59dbf4cd4c2bcd39048949524 (patch) | |
tree | a9e85b4c25cc67cbc9606ec4c06af576e29688ca /bfd | |
parent | 156eb5bc469465c2a228a5b5fbf65368beda1f37 (diff) | |
download | fsf-binutils-gdb-3ac83be0c79829d59dbf4cd4c2bcd39048949524.zip fsf-binutils-gdb-3ac83be0c79829d59dbf4cd4c2bcd39048949524.tar.gz fsf-binutils-gdb-3ac83be0c79829d59dbf4cd4c2bcd39048949524.tar.bz2 |
* elflink.h (elf_adjust_dynamic_symbol): Warn on an attempt to
link against a dynamic symbol with no type or size.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/elflink.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/bfd/elflink.h b/bfd/elflink.h index 40f45a0..841a8e7 100644 --- a/bfd/elflink.h +++ b/bfd/elflink.h @@ -3119,6 +3119,18 @@ elf_adjust_dynamic_symbol (h, data) } } + /* If a symbol has no type and no size and does not require a PLT + entry, then we are probably about to do the wrong thing here: we + are probably going to create a COPY reloc for an empty object. + This case can arise when a shared object is built with assembly + code, and the assembly code fails to set the symbol type. */ + if (h->size == 0 + && h->type == STT_NOTYPE + && (h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) == 0) + (*_bfd_error_handler) + (_("warning: type and size of dynamic symbol `%s' are not defined"), + h->root.root.string); + dynobj = elf_hash_table (eif->info)->dynobj; bed = get_elf_backend_data (dynobj); if (! (*bed->elf_backend_adjust_dynamic_symbol) (eif->info, h)) |