Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debug/elf: add a function to get size of ELF binary #35489

Open
probonopd opened this issue Nov 10, 2019 · 2 comments
Open

debug/elf: add a function to get size of ELF binary #35489

probonopd opened this issue Nov 10, 2019 · 2 comments
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

Comments

@probonopd
Copy link

probonopd commented Nov 10, 2019

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:

@agnivade
Copy link
Contributor

This is a fine thing to have in a third-party library, but I don't think it needs to be in the standard library. Also see https://golang.org/doc/faq#x_in_std.

@agnivade agnivade added FeatureRequest NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. labels Nov 10, 2019
@ALTree ALTree changed the title Feature request: Function to get size of ELF binary debug/elf: add a function to get size of ELF binary Nov 10, 2019
@ghost
Copy link

ghost commented Nov 10, 2019

cf: Calculate the size of an ELF (Go Forum)

@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Jul 13, 2022
@seankhliao seankhliao added this to the Unplanned milestone Aug 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.
Projects
Status: Triage Backlog
Development

No branches or pull requests

4 participants