From: Alan Modra Date: Wed, 16 Oct 2002 00:57:39 +0000 (+0000) Subject: * elflink.h (elf_link_add_object_symbols): Error out on dynamic objects X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=4723c4263aa3f1ada9279ad30fd75958429f3f8e;p=pf3gnuchains%2Fpf3gnuchains3x.git * elflink.h (elf_link_add_object_symbols): Error out on dynamic objects loaded with --just-symbols. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 7f9625b864..f04a7478ac 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,8 @@ 2002-10-16 Alan Modra + * elflink.h (elf_link_add_object_symbols): Error out on dynamic objects + loaded with --just-symbols. + * elf32-i386qnx.c (TARGET_LITTLE_NAME): Define. * elf32-ppcqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define. * elf32-shqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define. diff --git a/bfd/elflink.h b/bfd/elflink.h index 23ea241fbd..5e2acbd492 100644 --- a/bfd/elflink.h +++ b/bfd/elflink.h @@ -1299,6 +1299,13 @@ elf_link_add_object_symbols (abfd, info) bfd_size_type oldsize; bfd_size_type strindex; + /* ld --just-symbols and dynamic objects don't mix very well. + Test for --just-symbols by looking at info set up by + _bfd_elf_link_just_syms. */ + if ((s = abfd->sections) != NULL + && elf_section_data (s)->sec_info_type == ELF_INFO_TYPE_JUST_SYMS) + goto error_return; + /* Find the name to use in a DT_NEEDED entry that refers to this object. If the object has a DT_SONAME entry, we use it. Otherwise, if the generic linker stuck something in