Owee is an experimental library to work with DWARF format.
OCaml users might find the Owee_location module interesting.
Provided an executable:
Dynlink.Then it gives you the location of the definition of an arbitrary functional value. Linking the library is enough, no change to the toolchain is required.
There is partial support for DWARF 5; only symbol names and filenames are fully tested.
These restrictions can be relaxed. Open issues for platform you'd find interesting to support & on which you can test the library.