debug/elf: add a function to get size of ELF binary #35489
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
FeatureRequest
NeedsDecision
Feedback is required from experts, contributors, and/or the community before a change can be made.
Milestone
What version of Go are you using (
go version
)?1.13
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?Linux arm64
What did you do?
Try to find out the size of an ELF binary on disk (that has random data appended to the end of it, so I can't just use the file size)
What did you expect to see?
A function in https://github.com/golang/go/blob/master/src/debug/elf/elf.go that would give me the size of an ELF binary on disk (based on the information in the ELF headers, not based on the size of the file). I think this functionality is basic enough to be standard library worthy.
What did you see instead?
This functionality is seemingly not implemented there yet.
Would it be possible to add it there?
Code examples in other languages:
The text was updated successfully, but these errors were encountered: