github.com/tencent/goom@v1.0.1/tool/README.md (about) 1 ## macos-golink-wrapper 2 3 solution to "syscall.Mprotect panic: permission denied" in Golang on macOS Catalina 10.15.x when using [gomonkey](https://github.com/agiledragon/gomonkey) or [gohook](https://github.com/brahma-adshonor/gohook) 4 5 ## How it works 6 7 Change the `max_prot` value to `0x7` after linking. 8 9 refer to the question: 10 https://stackoverflow.com/questions/60654834/using-mprotect-to-make-text-segment-writable-on-macos 11 12 ## Usage 13 14 Assuming Go is installed in `/opt/go` 15 16 1. Navigate to Path: `/opt/go/pkg/tool/darwin_amd64` 17 2. Rename file `link` to `original_link` 18 3. Download [link wrapper](https://github.com/eisenxp/macos-golink-wrapper/blob/main/link) for replacement 19 4. Make sure link wrapper is executable: `chmod +x link` 20 5. Enjoy it 21 22 ## Thanks 23 24 Thanks to [Elliott Darfink](https://stackoverflow.com/users/976724/elliott-darfink) for sharing. 25 26 27 ## License 28 29 [MIT](https://opensource.org/licenses/MIT) 30 31 ## Copyright 32 this project is a copy of [macos-golink-wrapper](https://github.com/eisenxp/macos-golink-wrapper)