Subject: Re: The mysterious NEEDED crtend.so
To: Ryo HAYASAKA <ryoh@jaist.ac.jp>
From: Jason R Thorpe <thorpej@wasabisystems.com>
List: tech-toolchain
Date: 10/31/2002 15:18:35
On Fri, Nov 01, 2002 at 07:01:09AM +0900, Ryo HAYASAKA wrote:

 > So, If I change all of basename(...) into xstrdup(basename(...)) in
 > elf32.em, the problem is not seen.
 > 
 > How to fix this?

Ah, I see.  Actually, this is the problem line (at line 353):

  bfd_elf_set_dt_needed_soname (abfd, soname);

It is obviously a bug.  There is another use of basename in that file
which uses xstrdup() before recording the result.

I will check in a fix, and also fix it in the master FSF Binutils sources.

Thanks for finding the problem!

-- 
        -- Jason R. Thorpe <thorpej@wasabisystems.com>