Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var BuildIDReadSize = 32 * 1024 // changed for testing
Functions ¶
func ReadBuildID ¶
ReadBuildID reads the build ID from an archive or binary. It only supports the gc toolchain. Other toolchain maintainers should adjust this function.
func ReadBuildIDFromBinary ¶
ReadBuildIDFromBinary reads the build ID from a binary.
ELF binaries store the build ID in a proper PT_NOTE section.
Other binary formats are not so flexible. For those, the linker stores the build ID as non-instruction bytes at the very beginning of the text segment, which should appear near the beginning of the file. This is clumsy but fairly portable. Custom locations can be added for other binary types as needed, like we did for ELF.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.