Skip to contentSkip to conversation

call_init in libc6 2.3.6.ds1-11

parisc-linux John David Anglin 1 participant 1 message Feb 17, 2007 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive
Quoted 10 lines
Quoted 9 lines

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);
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