-
-
Notifications
You must be signed in to change notification settings - Fork 234
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
obfuscated names in header files included from assembly fail at link time #553
Comments
Thank you - it seems like what's happening here is that names like |
@mvdan Note my second edit, which should probably be a separate issue. The var https://github.com/ethereum/go-ethereum/blob/master/rpc/ipc_unix.go#L34 |
Thanks - could you please file that as a separate issue with repro steps? I'm fairly sure the two bugs are unrelated, and the assembly one is already a pretty involved fix. |
Assembly files can include header files within the same Go module, and those header files can include "defines" which refer to Go names. Since those Go names are likely being obfuscated, we need to replace them just like we do in assembly files. The added mechanism is rather basic; we add two TODOs to improve it. This should help when building projects like go-ethereum. Fixes burrowers#553.
Assembly files can include header files within the same Go module, and those header files can include "defines" which refer to Go names. Since those Go names are likely being obfuscated, we need to replace them just like we do in assembly files. The added mechanism is rather basic; we add two TODOs to improve it. This should help when building projects like go-ethereum. Fixes burrowers#553.
Assembly files can include header files within the same Go module, and those header files can include "defines" which refer to Go names. Since those Go names are likely being obfuscated, we need to replace them just like we do in assembly files. The added mechanism is rather basic; we add two TODOs to improve it. This should help when building projects like go-ethereum. Fixes #553.
What version of Garble and Go are you using?
What environment are you running Garble on?
go env
OutputWhat did you do?
$ git clone https://github.com/ethereum/go-ethereum $ cd go-ethereum $ garble build -trimpath -v -o ./build/bin/geth ./cmd/geth
What did you expect to see?
Successfully compiling go-ethereum.
What did you see instead?
Lots of undefined references during linking, similar to the below.
Comments
I dug in a little bit and with a whitelist, select packages can be obfuscated just fine.
Running with
-debug
I can see the package with undefined references:Seeing the same result on tip of master.
EDIT:
I blacklisted that particular module from being obfuscated, and the rest of go-ethereum obfuscated just fine.
EDIT2:
Reversing also fails on the rpc subpackage (github.com/ethereum/go-ethereum), no actual panic output is required.
Additionally blacklisting this package and reverse works as expected.
The text was updated successfully, but these errors were encountered: