This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


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

Re: A testcase anad a patch for the __gmon_start__ problem on PPC.


At 05:46 11.10.00, H . J . Lu wrote:
>On Tue, Oct 10, 2000 at 08:30:14PM -0700, H . J . Lu wrote:
>
> > to weak undefined. That is the same thing as __gmon_start__ on PPC. We
> > don't see the problem on x86 since WEAK_GMON_START is defined for x86.
> > Those 2 changes have no impact on x86 as far as __gmon_start__ is
> > concerned. If we want the binary compatibility, we need to put back
> > the weak defined __gmon_start__ for all targets where WEAK_GMON_START
> > is not defined before. One way to fix it is to provide a PPC initfini.c.
> >
> >
> > H.J.
> > ---
> > 2000-10-10  H.J. Lu  <hjl@gnu.org>
> >
> >       * sysdeps/powerpc/initfini.c: New. For the binary compatibility.
>
>My second thought, since only i386 defines WEAK_GMON_START before, it
>seems that all but i386 are affected. Here is a new patch.

One question, are you 100% sure that this is no static/shared linker bug? I 
know that my testcase (and probably yours too) fails on x86 and PPC, but 
succeeds on alpha (btw, can people try that on sparc/arm/m68k please?), 
which makes me think we may work around a different problem here.

On the other side backwards compatibility on PPC can probably achieved easier:

         #ifndef PLATFORM_GMON_START_COMPAT
         #define PLATFORM_GMON_START_COMPAT 1
         #endif
         if (gmon_start && PLATFORM_GMON_START_COMPAT)
                 gmon_start();

and define it for PPC to:

         #define PLATFORM_GMON_START_COMPAT (*(((int*)gmon_start)+1) != 0)

This way we can have the advantages of the new setup and are able to drop 
backwards compatibility sometime in the future (glibc-3.0?).

Franz.


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