Skip to content

Figure out how to handle dlsym with RTLD_NEXT #36

@mplegendre

Description

@mplegendre

The RTLD_NEXT parameter to dlsym has at least two issues with gotcha:

  • When the symbol being passed to dlsym isn't wrapped: the behavior of dlsym with RTLD_NEXT changes based on the caller library. Wrapping dlsym will break this. We need to simulate the bottom level call as if coming from the top level caller.

  • Calling dlsym with RTLD_NEXT can return a different "bottom-level symbol" than without. If the symbol is wrapped, should we return the same wrapper function with and without RTLD_NEXT? Should we support different stacks of wrappers?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions