golang will embed the path of the source file into the binary, also the 
.gopclntab will contains the path.
try use -trimpath and see if there's any change.

在2024年4月27日星期六 UTC+8 01:28:05<Vivi A> 写道:

> Hi All,
>
> *Does anybody have experience in how the use of CGO and dynamic linking 
> may affect the reproducibility of a Go project?*
>
> *Context*
> I am trying to reproduce a Linux amd64 binary release using the same 
> source commit, os & dist, Go, C compiler, and linker version. It reproduces 
> locally but not against the reference build. I can see that e.g. 
> gnu.build-id is embedded, yet the diffs are much larger than this, for 
> example seeing differences in the ELF .rodata (which may or may not have to 
> do with the use of CGO). 
>
> Regards,
> Vivi
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/716dbec1-c492-4229-8865-668e96714ff5n%40googlegroups.com.

Reply via email to