github.com/pkujhd/goloader@v0.0.0-20240411034752-1a28096bd7bd/examples/soloader/run.sh (about) 1 #!/bin/bash 2 3 go build -o soloader.so -buildmode=c-shared soloader.go 4 mv elf.txt elf.cpp 5 g++ -std=c++11 -ldl elf.cpp -w -o elf 6 mv elf.cpp elf.txt 7 go tool compile -o soloadertest.o ../inline/inline.go 8 ./elf 9 10 rm -f soloader.h soloader.so soloadertest.o elf