-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Closed
Closed
Copy link
Labels
FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.ProposalProposal-AcceptedProposal-FinalCommentPeriod
Milestone
Description
The elf package provide a sentinel error, ErrNoSymbols for the case that Symbols or DynamicSymbols cannot return a symbol list because the section is empty. The same situation is handled in plan9obj by returning a new error for this case. For PE/Mach-O there is no issue since access to the symbols is via direct access to a slice field.
Because of this, it's either necessary to do an error string comparison or re-call f.Section("syms") to check whether is was nil, repeating work that has already been done.
Originally posted to golan-nuts: https://groups.google.com/g/golang-nuts/c/HUpyQwYVKZE/m/uEOw3N4JGwAJ, but filing here to avoid issue being lost.
I am happy to send a PR if this is acceptable.
What version of Go are you using (go version
)?
$ go version go version go1.17 linux/amd64
Does this issue reproduce with the latest release?
Yes
Metadata
Metadata
Assignees
Labels
FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.ProposalProposal-AcceptedProposal-FinalCommentPeriod