On Thu, Apr 4, 2019 at 2:32 PM Steeve Morin <steeve.mo...@gmail.com> wrote: > > We are big Go users on Android and iOS thanks to golang/mobile. > > Lately we were doing some size profiling and stumbled upon runtime.pclntab, > which in our case represents almost 20% of the file size according to bloaty. > Now I understand that it's used for things like runtime.Caller and panics. > That said, in a mobile context panics are not that useful as this job is > handled by > services like Crashlytics and DWARF. > > So we were wondering if it would be possible to strip it (or not emit it > altogether) > and what would be the consequences/limitations of that?
The consequences of removing pclntab would be fairly severe. You wouldn't just lose runtime.Callers and stack traces and tracing and profiling. The pclntab section is also used by the garbage collector to traverse the stack, and by the stack copying code. I doubt that many substantial Go programs would still work correctly. That said you could in principle drop part of pclntab with less severe consequences, such as removing the function names. I don't know of any supported way to do that, though. Ian -- 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. For more options, visit https://groups.google.com/d/optout.