Skip to content

Error looking up function 'dwarf_producer_init': /usr/lib/libdwarf.so: undefined symbol: dwarf_producer_init #23

Open
@DCNick3

Description

@DCNick3

When using with ghidra 10.3.3 on arch linux, I get the following error:

Traceback (most recent call last):
  File "/home/dcnick3/Downloads/ghidra2dwarf/ghidra2dwarf.py", line 507, in <module>
    dwarf_producer_init(
  File "/home/dcnick3/Downloads/ghidra2dwarf/ghidra2dwarf.py", line 111, in wrapper
    r = fun(*(args + (err,)))
	at com.sun.jna.Function.<init>(Function.java:252)
	at com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:594)
	at com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:570)
	at com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:556)
	at com.sun.jna.Library$Handler.invoke(Library.java:243)
	at jdk.proxy3/jdk.proxy3.$Proxy74.dwarf_producer_init(Unknown Source)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
java.lang.UnsatisfiedLinkError: java.lang.UnsatisfiedLinkError: Error looking up function 'dwarf_producer_init': /usr/lib/libdwarf.so: undefined symbol: dwarf_producer_init

This seems to happen because of version mismatch of system libdwarf and the one used by the script + the loader preferring the system libdwarf over the one provided in the script.

I was able to work around the issue by renaming the library to libdwardf_vendor.so and updating the library to call loadLibrary with dwardf_vendor

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