This is the mail archive of the
mailing list for the glibc project.
Re: PPC startup code
Roland McGrath writes:
> This makes it sound like it's part of a formal spec, which it's not. The
> registers at startup are part of the ELF ABI spec. But __libc_start_main
> and its calling sequence are just part of the glibc ABI, which can and does
> change between glibc releases. There is just the set of practical issues I
> mentioned with the part of the ABI involving crt1.o changing, which is rare
> but not intrinsically different from other glibc ABI changes that are fine.
True. If we assume (a) we are not going to change the calling
sequence for _start, and (b) we want to use the generic
__libc_start_main, then it is apparent that we need a shim to
rearrange the arguments of _start for the generic __libc_start_main.
The question is, should that be in _start itself (and therefore linked
into every executable) or in libc.so?
I am tending to think that it should be in libc.so, mainly because
putting it in start.S will make it a little larger, and introduce some
potential problems for not very much gain. IMHO.