~/talk

Deep dive into a go binary

Talkat GopherCon UK 2025 · 2025-08-13..08-15· [compilers-and-language-design]
slides:none on file

A compiled Go ELF is about 2.2MB for a Hello World and splits into headers, six segments and 26 sections: text ~604KB (machine code), rodata ~313KB (strings, types, interfaces), gopclntab ~490KB (PC→file/line/function for stack traces), and DWARF ~622KB (debug info). readelf, go tool objdump, xxd and go tool buildid reveal these; strip removes debug/symbol sections reducing the binary to 1.5MB and garble obfuscates leaked names/paths.

AI-written summary · about

  1. 0:00Go binary deep dive
  2. 1:33Hello world binary size
  3. 3:19ELF binary structure
  4. 8:44ELF headers in execution
  5. 11:15ELF sections in Go
  6. 14:27Read-only data in Go
  7. 16:39Symbol and string tables
  8. 19:29DWARF debugging info
  9. 20:14Go-specific binary sections
  10. 23:13Go stack traces
  11. 29:22Garbage collection efficiency
  12. 30:26Segments in binary data
  13. 32:36Stripping Go binaries
  14. 33:59Binary metadata risks
  15. 35:45Stack traces without symbols
  16. 36:50Reflect optimization
  17. 37:34Go binary layout
  18. 39:01Further learning
  19. 42:14Q&A: Architecture differences
  20. 42:57Q&A: Build ID sections
  21. 44:45Q&A: Static linking
  22. 45:48Q&A: Runtime access to sections
  23. 47:14Q&A: Compressing Go binaries
  24. 48:40Q&A: TinyGo and UPX
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.