http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46986
--- Comment #10 from Anders F Björklund <afb at users dot sourceforge.net> 2011-09-02 08:45:22 UTC --- Here's my attempt at a native version. (of that "gox-extract" shell script) Instead of the default variant: OBJCOPY=${OBJCOPY:-objcopy} $OBJCOPY -j .go_export $1 $2 The Darwin version could be this: OTOOL=${OTOOL:-otool} $OTOOL -s __GNU_GO __go_export $1 | grep -v "^$1:" | grep -v "Contents of (__GNU_GO,__go_export) section" | cut -f 2- | tr -d ' ' | xxd -r -p - $2 It doesn't include the objcopy header, but I believe that is skipped anyway ?