Re: __libc_start_main on IA64

James E Wilson <[email protected]> 15 May 2006 15:42:11 -0700
Newsgroups gmane.linux.redhat.ia64.general
Message-ID <[email protected]>
On Sun, 2006-05-14 at 19:59, William wrote:
________________________________________________________________________
>  compiled staticlly with "gcc test.c -o test -static". But on IA64 the
> program can run if I compiled it using dynamic-linking, but if I
> compiled it staticlly, the program cannot run.

Just grepping the glibc sources for __libc_start_main, I found a clue in
csu/elf-init.c.

IA-64 uses init_array sections, but most other targets haven't been
converted to use them yet.  So you aren't running the init_array
initialization functions on the ia64 machine, but you are running the
init section initialization functions on other targets, because this is
done elsewhere.  Thus the ia64 one doesn't work, but the others do.

This is just from a quick look, you can try filling in the details
yourself.