Golang binary dwarf
Sun Feb 7 15:18:22 GMT 2021
On Sun, 2021-02-07 at 14:54 +0000, Manoj Kumar wrote:
> Apologies for replying late. The issue can be reproduced on Ubuntu.
> Please get the attached files & copy to some folder. If golang and
> Dyninst 10.2.1 version are installed on system then please follow the
> below steps:
> 1. export PATH_TO_DYNINST_LIB= <path to lib folder where dyninst
> libraries are installed, if not under /usr/local/lib>makeThis will
> create c++ binary testfile
> 2. compile golang program usinggo build wrapecho.goThis will create
> wrapechoRun wrapecho (./wrapecho) from terminal 1 and run testfile
> (./testfile wrapecho) from terminal 2.
> testfile will print the number of arguments and each argument name
> for each function of wrapecho (like Hellocat,hello)
> 3. compile golang program using linkshared option
> go build -linkshared wrapecho.goThis will create wrapecho
> if above command does not work then use below two commands:go install
> -buildmode=shared stdgo build -linkshared wrapecho.go
> Run wrapecho (./wrapecho) from terminal 1 and run testfile
> (./testfile wrapecho)testfile will print 0 number of arguments for
> each function.
> Please let me know if anything is required to reproduce the issue.
Not having an ubuntu, dyninst or go install I find the above
description somewhat confusing. Could you simply generate the binaries
yourself and upload them somewhere for inspection or show the DWARF
generated for those binaries?
What exactly is the output of your program on the different generated
I assume you mean that there are less Compile Units generated in the
DWARF than expected. If so I am not sure what elfutils can do about
that. It seems a bug in the experimental -sharedlink go linker option.
More information about the Elfutils-devel