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]
Other format: [Raw text]

Re: PPC startup code


Geoff Keating writes:

> Also, I don't see the part of the patch where you handle applications
> that have an old start.S but a new glibc.  It looks like you've
> changed the calling sequence of __libc_start_main without supplying
> compatibility code, which is an ABI incompatibility.
> 
> So, I think this patch will need some redesign before it can go into glibc.

Ah, OK.  Where this started was that changes were made to the generic
libc-start.c but the corresponding changes weren't made to the
powerpc-specific one.  Roland was concerned about that and asked why
we couldn't use the generic one.  I hadn't realized or thought about
the compatibility aspects, and you're right, we can't change the
calling sequence of __libc_start_main.

Maybe what we can do instead is to have the PPC __libc_start_main call
the generic one.  Something like this:

#define __libc_start_main   __generic_libc_start_main
#include <sysdeps/generic/libc-start.c>

__libc_start_main(...)
{
  /* detect static binaries, do all that stuff */
  if (*stack_on_entry == 0) {
    argc = *(int *)stack_on_entry;
    argv = (char **)(stack_on_entry + 4);
  }
  __generic_libc_start_main(...)
}

Thoughts?

Paul.


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