You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have created some test cases for the docker arm64 binary file, See #2 for details.
When i use IdaPro, readelf or simplely retrieve all symbols from *elf.File, it works and I obtain the correct address.
When I use *gosym.Table, the address is incorrect. address = 0x00635cb0
Also, when *gosym.Table is built, the data contains errors.
you can set a condition breakpoint in /usr/lib/go/src/debug/gosym/pclntab.go at line 308 with i==6626, where the *gosym.Func is built.
And I used go-parser with IdaPro, which shows that gopclntab contains incorrect data.
in this address: data(0x238980) + .textbase(0x3fd1e0) = 0x00635cb0
There's another thing:
I've previously built some simple binary files for testing, see #1, and they run well after removing the IdaProOffset.
So debug/gosym get wrong address, because binary file gopclntable data wrong or need other calculate.
debug/gosym get wrong, but go-parser get correct data.
in go-parser use this text-start:
in debug/gosym use this text-start:
this f.textStart data from here: /usr/lib/go/src/debug/gosym/pclntab.go:258
and this t.PC come from NewLineTable, in code ~/ecapture/user/config/config_gotls.go:333.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.