call_init in libc6 2.3.6.ds1-11
Quoted 10 lines
Quoted 9 lines
While it's possible that
DT_INITandDT_FINIshouldn't point at function descriptors, the above hack can't be right sinceDL_DT_INIT_ADDRESSis used for callinginit()fromdl-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);
Quoted 7 lines
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
Signature · 6 lines
J. David Anglin [email protected] National Research Council of Canada (613) 990-0752 (FAX: 952-6602) _______________________________________________ parisc-linux mailing list [email protected] http://lists.parisc-linux.org/mailman/listinfo/parisc-linux