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 07:53:15AM -0700, H. J. Lu wrote:
>        /* 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);

I prefer a bigger hammer.  Change the goto to an abort instead.  A BFD
assertion failure doesn't kill the linker, and we know that if we
continue past this point other things are going to fail spectacularly.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


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