Re: Re: call_init in libc6 2.3.6.ds1-11
"John David Anglin" <[email protected]>
| Newsgroups | gmane.linux.ports.hppa |
|---|---|
| Message-ID | <[email protected]> |
> > While it's possible that DT_INIT and DT_FINI shouldn't point at function > > descriptors, the above hack can't be right since DL_DT_INIT_ADDRESS is used > > for calling init() from dl-init.c: > > > > init_t init = (init_t) DL_DT_INIT_ADDRESS > > (l, l->l_addr + l->l_info[DT_INIT]->d_un.d_ptr); > > > > /* Call the function. */ > > init (argc, argv, env); > > We might have been lucky in that init () called another function which > setup r19 for us before we accessed data. I agree completely that r19 > should be set to the r19 of the module before calling init(), even if > it *is* or *isn't* a function descriptor. > > 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. Dave -- J. David Anglin [email protected] National Research Council of Canada (613) 990-0752 (FAX: 952-6602)