-
Notifications
You must be signed in to change notification settings - Fork 17.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmd/go: -trimpath not trimming some C source file paths #58564
Comments
Details of GCC toolchain
|
I'm able to reproduce this using
|
(from debugging with bcmills offline) It sounds like we should use --file_prefix_map in the invocations of the compiler, assuming the compiler version supports it. |
Note that we already use |
Using There are several different definitions of the From https://reproducible-builds.org/docs/build-path/, it looks like |
Oh, I see, the strings are coming from calls to The (Probably you already knew all that.) |
Sorry, crossed paths. You did know all that. |
This was fixed by https://go-review.git.corp.google.com/c/go/+/478455. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I was trying the "new" -trimpath feature and found that some system path information was inserted into the executable binary.
Most paths were trimmed successfully but some paths to C source files were not trimmed.
The problem can be seen when building this project: https://github.com/inkyblackness/imgui-go-examples
In the
cmd/example_sdl_opengl3
directoryI'm not sure this is really a bug but I can't see these strings in the DWARF data (when dumped with readelf) nor do they exist as literal strings in the source.
What did you expect to see?
All system paths used during the build and included in the binary, to be trimmed.
What did you see instead?
Some system paths included in the binary have not been trimmed.
The text was updated successfully, but these errors were encountered: