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

Comments

@probonopd
Copy link

@probonopd 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

This comment has been minimized.

Copy link
Contributor

@agnivade agnivade commented Nov 10, 2019

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.

@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
@apparluk

This comment has been minimized.

Copy link

@apparluk apparluk commented Nov 10, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.