Build c-shared ASLR Windows dll

103 views
Skip to first unread message

Quim Muntal

unread,
Sep 15, 2020, 12:41:24 PM9/15/20
to golang-nuts
Hi everyone,

I need to export some Go function as a windows/amd64 DLL which have ASLR and High Entropy VA protections enabled.

I'm currently building the binary using go 1.15 and the command `go build -buildmode=c-shared .`, which generates a DLL with the NX flag but without IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE nor IMAGE_DLLCHARACTERISTICS_HIGH_ENTROPY_VA.

As per https://go-review.googlesource.com/c/go/+/214397/ go 1.15 seems to support -buildmode=pie in windows, but I'm not sure if it ca also be applied when using  -buildmode=c-shared.

Any clue on how to achieve this?

Thanks,
Quim

brainman

unread,
Sep 15, 2020, 5:34:33 PM9/15/20
to golang-nuts
CL you are referring to onle changed executables. I don't think DLLs were fixed. Please file an issue, maybe someone will fix your problem,

Thank you.

Alex 

Reply all
Reply to author
Forward
0 new messages