This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: ld/1263: ld reports: libgdbmciv.so: could not read symbols: File format not recognized


On Wed, Sep 07, 2005 at 01:14:34PM +0930, Alan Modra wrote:
> On Tue, Sep 06, 2005 at 07:41:21PM -0700, H. J. Lu wrote:
> > 	PR ld/1263
> > 	* emultempl/elf32.em (gld${EMULATION_NAME}_load_symbols): Check
> > 	--just-symbols on DSO.
> 
> OK, thanks.
> 

Since linker shouldn't allows it, this patch uses BFD_ASSERT to check
it in bfd.


H.J.
----
2005-09-07  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/1263
	* elflink.c (elf_link_add_object_symbols): Use BFD_ASSERT to
	check --just-symbols on DSO.

--- bfd/elflink.c.just	2005-08-17 07:59:07.000000000 -0700
+++ bfd/elflink.c	2005-09-07 07:48:51.000000000 -0700
@@ -3289,11 +3289,9 @@ elf_link_add_object_symbols (bfd *abfd, 
       int ret;
 
       /* 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
-	  && s->sec_info_type == ELF_INFO_TYPE_JUST_SYMS)
-	goto error_return;
+	 ld shouldn't allow it.  */
+      BFD_ASSERT ((s = abfd->sections) == NULL
+		  || s->sec_info_type != ELF_INFO_TYPE_JUST_SYMS);
 
       /* If this dynamic lib was specified on the command line with
 	 --as-needed in effect, then we don't want to add a DT_NEEDED


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]