From 6f1959ca20d725b657e13bd18b6d329be203642c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Mon, 9 Jan 2023 12:34:03 +0000 Subject: [PATCH] README: -tiny does a bit more now On my machine, garble itself goes from about 5.7MiB to about 4.8 MiB when being built with `garble build` and `garble build -tiny`, which is roughly a 16% decrease in size. The 2-5% figure is dated at this point, as we do better than that now. --- README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index b15eb93..de76167 100644 --- a/README.md +++ b/README.md @@ -66,16 +66,17 @@ declaration, for example. With the `-tiny` flag, even more information is stripped from the Go binary. Position information is removed entirely, rather than being obfuscated. Runtime code which prints panics, fatal errors, and trace/debug info is removed. -All in all, this can make binaries 2-5% smaller. +Many symbol names are also omitted from binary sections at link time. +All in all, this can make binaries about 15% smaller. With this flag, no panics or fatal runtime errors will ever be printed, but they can still be handled internally with `recover` as normal. In addition, the `GODEBUG` environmental variable will be ignored. Note that this flag can make debugging crashes harder, as a panic will simply -exit the entire program without printing a stack trace, and all source code -positions are set to line 1. Similarly, `garble reverse` is generally not useful -in this mode. +exit the entire program without printing a stack trace, and source code +positions and many names are removed. +Similarly, `garble reverse` is generally not useful in this mode. ### Speed