Re: Re: call_init in libc6 2.3.6.ds1-11

"Carlos O'Donell" <[email protected]>
Newsgroups gmane.linux.ports.hppa
Message-ID <[email protected]>
> > I wrote dl-lookupcfg.h, and the code you see there is legacy. I
> > carried it forward without understanding what it meant.
>
> It may be that special care is needed for applications that are
> statically linked.

The dl_init, and call_init functions are never used for static executables.
In a static application the call chain looks like this:
_start -> __libc_start_main -> __libc_csu_init -> All init functions.

If DT_INIT has a function descriptor address, then the "& 2" case
causes the address of the function descriptor to be used for "init",
and won't the call to "init (argc, argv, env)" happen vai a $$dyncall
which will load r19 correctly?

If DT_INIT points to a local symbol for init, then the "& 2" case
causes the address of a temporary function descriptor (constructed
with the right r19) to be used for "init", and won't hte call to "init
(argc, argv, env)" happen via $$dyncall?

Both cases work correctly. So what happened in the original post?

c.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.