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

cmd/objdump: does not provide file/line info for files built with -buildmode=pie #17883

ianlancetaylor opened this issue Nov 10, 2016 · 3 comments


Copy link

@ianlancetaylor ianlancetaylor commented Nov 10, 2016

go build -buildmode=pie ~/hello.go
go tool objdump -s 'main.main' hello

Observe that the file/line information is shown as just :0. If you do the same commands but omit -buildmode=pie the correct file/line information is shown.

I have a partial fix for this, but a full fix requires applying the dynamic relocations to the pclntab data. The RELATIVE dynamic relocations can be ignored, but there are some non-relative relocations to symbols defined in runtime/cgo.

@ianlancetaylor ianlancetaylor added this to the Go1.9 milestone Nov 10, 2016
@bradfitz bradfitz added the NeedsFix label May 22, 2017
@bradfitz bradfitz added this to the Go1.9Maybe milestone May 22, 2017
@bradfitz bradfitz removed this from the Go1.9 milestone May 22, 2017
Copy link

@bradfitz bradfitz commented May 22, 2017

Ian, still interested in this for 1.9?

Copy link
Contributor Author

@ianlancetaylor ianlancetaylor commented Jun 2, 2017

Moving to 1.10.

@ianlancetaylor ianlancetaylor added this to the Go1.10 milestone Jun 2, 2017
@ianlancetaylor ianlancetaylor removed this from the Go1.9Maybe milestone Jun 2, 2017
@rsc rsc removed this from the Go1.10 milestone Nov 22, 2017
@rsc rsc added this to the Go1.11 milestone Nov 22, 2017
Copy link

@gopherbot gopherbot commented Jun 14, 2018

Change mentions this issue: cmd/internal/objfile: fetch pclntab for PIE

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

No branches or pull requests

4 participants