On Wed, Jan 03, 2007 at 10:18:36AM -0800, Seongbae Park wrote:
> >In fact, by default, gcc for the i386 targets will call _mcount.  gcc
> >for i386 GNU/Linux targets was changed to call mcount instead of
> >_mcount with this patch:
> >
> >Thu Mar 30 06:20:36 1995  H.J. Lu   ([EMAIL PROTECTED])
> >
> >        * configure (i[345]86-*-linux*): Set xmake_file=x-linux,
> >        tm_file=i386/linux.h, and don't set extra_parts.
> >        (i[345]86-*-linux*aout*): New configuration.
> >        (i[345]86-*-linuxelf): Deleted.
> >        * config/linux{,-aout}.h, config/x-linux, config/xm-linux.h: New 
> >        files.
> >        * config/i386/linux-aout.h: New file.
> >        * config/i386/linux.h: Extensive modifications to use ELF format
> >        as default.
> >        (LIB_SPEC): Don't use libc_p.a for -p. don't use libg.a
> >        unless for -ggdb.
> >        (LINUX_DEFAULT_ELF): Defined.
> >        * config/i386/linuxelf.h,config/i386/x-linux: Files deleted.
> >        * config/i386/xm-linux.h: Just include xm-i386.h and xm-linux.h.
> >
> >I believe that was during the time H.J. was maintaining a separate
> >branch of glibc for GNU/Linux systems.  Presumably his version
> >provided mcount but not _mcount.  I haven't tried to investigate
> >further.
> >
> >In any case clearly gcc for i386 GNU/Linux systems today should call
> >_mcount rather than mcount.  I will make that change.
> 
> I remember someone wanting to provide his own mcount().
> Presumably, mcount() is weak in libc to cover such a use case ?

It was a mistake. I don't remember why I did that way when I switched
Linux from a.out to ELF. It should be fixed.


H.J.

Reply via email to