This is the mail archive of the
mailing list for the glibc project.
Re: PPC startup code
Paul Mackerras <paulus at samba dot org> writes:
> I just compiled up and tested glibc with the following patch to
> start.S and libc-start.c, using the generic libc-start.c with a hack
> to do the __aux_cache_init thing (inside #ifdef __powerpc__). It all
> works just fine. With this patch we do the detection of static
> binaries inside start.S. We end up doing the same computations as
> before, though, so it shouldn't break anything. Some of the work that
> the PPC dl-start.S does is now redundant and could be eliminated.
> Roland, is this the sort of thing you wanted? I assume there is a
> cleaner way to do the __aux_cache_init thing in libc-start.c.
The idea behind having a very small start.S and code in libc.so was
that start.S gets linked into every application, and so it's better to
have as little code as possible there just to keep executable size
down. In addition, if start.S is small and simple, that makes future
glibc improvements easier to make.
It seems like your patch drifts away from these design goals.
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.
- Geoffrey Keating <geoffk at geoffk dot org>