Well, if it's a package/module you could build it as a library archive (go build -buildmode=archive) and then disassemble/decompile the library.
On Tue, Jan 23, 2024 at 3:18 PM Def Ceb <mikk.mar...@gmail.com> wrote: > No, this is not possible. This is the case for practically every other > language, even C. Unless you intend on inspecting assembly text instead > of a real working binary. > The symbol table + debug symbols built into the binary by default should > make finding the `main.main` function trivial with just about any > reverse engineering tool. > > 'Karolina GORNA' via golang-nuts: > > Hi everyone, > > > > I would like to build my Go program and to reverse-engineer it. I would > > find it easier to build it without the runtime and to statically analyse > > only the binary of the program. > > > > Is it possible and if yes, how please ? > > > > Thank you for your time. > > ------------------------------------------------------------------------ > > Les informations contenues dans ce message électronique ainsi que celles > > contenues dans les documents attachés sont strictement confidentielles > > et sont destinées à l'usage exclusif du (des) destinataire(s) nommé(s). > > Toute divulgation, distribution ou reproduction, même partielle, en est > > strictement interdite sauf autorisation écrite et expresse de l’émetteur. > > Si vous recevez ce message par erreur, veuillez le notifier > > immédiatement à son émetteur par retour, et le détruire ainsi que tous > > les documents qui y sont attachés. > > > > The information contained in this email and in any document enclosed is > > strictly confidential and is intended solely for the use of the > > individual or entity to which it is addressed. > > Partial or total disclosure, distribution or reproduction of its > > contents is strictly prohibited unless expressly approved in writing by > > the sender. > > If you have received this communication in error, please notify us > > immediately by responding to this email, and then delete the message and > > its attached files from your system. > > ------------------------------------------------------------------------ > > > > -- > > You received this message because you are subscribed to the Google > > Groups "golang-nuts" group. > > To unsubscribe from this group and stop receiving emails from it, send > > an email to golang-nuts+unsubscr...@googlegroups.com > > <mailto:golang-nuts+unsubscr...@googlegroups.com>. > > To view this discussion on the web visit > > > https://groups.google.com/d/msgid/golang-nuts/9e309ee6-18ca-48b2-bf6b-e5a9e7325838n%40googlegroups.com > < > https://groups.google.com/d/msgid/golang-nuts/9e309ee6-18ca-48b2-bf6b-e5a9e7325838n%40googlegroups.com?utm_medium=email&utm_source=footer > >. > > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to golang-nuts+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/golang-nuts/a7746ded-49cb-4a8c-aa00-e2bb8676b23a%40gmail.com > . > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CANKfucabsHWfxsMhcnPvVFhs3ePYNLH%2BNe6G0VsJQ%2BGXNyEnzA%40mail.gmail.com.