Skip to content

librevdep: add opt-in called-supplied LD_LIBRARY_PATH emulation #2

@sighook

Description

@sighook

Problem

librevdep intentionally avoids environment-dependent resolution, and revdep_semantics(7) currently lists LD_LIBRARY_PATH as a non-goal.
However, some embedding use-cases may want to audit "would this object resolve under a supplied runtime library path?".

This should not be implemented by reading the process environment inside the library. That would make results implicit, host-coupled, and contrary to the current explicit-context design.

Target

Add optional explicit emulation of LD_LIBRARY_PATH via caller-supplied directories.

Non-goal

Do not read ambient process environment (getenv("LD_LIBRARY_PATH")) inside librevdep.

Suggested shape

  • Add process_search_dirs/runtime_library_path to context or per-audit options
  • Search these dirs at the loader-equivalent point in the order
  • Keep default behavior unchanged when the field is empty
  • Optionally add a boolean to model secure-exec suppression

Acceptance criteria

  • Results depend only on explicit inputs
  • No hidden environment dependency is introduced
  • Users can emulate LD_LIBRARY_PATH when they need that analysis mode

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestinvalidThis doesn't seem right

    Type

    Projects

    Status

    Tools

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions