Ticket #1948 (new enhancement)

Opened 6 months ago

Last modified 6 months ago

Make dl*() Functions Standard Compliant

Reported by: bonefish Owned by: axeld
Priority: normal Milestone: R1
Component: System/libroot.so Version: R1 development
Cc: Blocked By:
Platform: All Blocking:

Description

Our dl*() have several issues ATM:

  • Multiple calls to dlopen() should open the object only once.
  • Passing NULL to dlopen() should open the executable.
  • The flags passed to dlopen() are ignored. That is OK for RTLD_LAZY/RTLD_NOW (we always relocate everything when loading), but probably not for RTLD_GLOBAL/RTLD_LOCAL.
  • dlsym() searches only the object itself, not dependencies.
  • Other issues I have missed.

Change History

follow-up: ↓ 2   Changed 6 months ago by jackburton

Maybe we should use glibc's dl* functions instead of rolling our own ?

in reply to: ↑ 1   Changed 6 months ago by bonefish

Replying to jackburton:

Maybe we should use glibc's dl* functions instead of rolling our own ?

I don't think glibc provides those functions. Given that they need to interface with the platform-specific runtime loader there would be little they could do anyway.

Note: See TracTickets for help on using tickets.