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

Open
ianlancetaylor opened this issue Nov 10, 2016 · 3 comments
Assignees
Labels
Milestone

Comments

@ianlancetaylor
Copy link
Contributor

@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 modified the milestones: Go1.9Maybe, Go1.9 May 22, 2017
@bradfitz
Copy link
Contributor

@bradfitz bradfitz commented May 22, 2017

Ian, still interested in this for 1.9?

@ianlancetaylor
Copy link
Contributor Author

@ianlancetaylor ianlancetaylor commented Jun 2, 2017

Moving to 1.10.

@ianlancetaylor ianlancetaylor modified the milestones: Go1.10, Go1.9Maybe Jun 2, 2017
@rsc rsc modified the milestones: Go1.10, Go1.11 Nov 22, 2017
@gopherbot
Copy link

@gopherbot gopherbot commented Jun 14, 2018

Change https://golang.org/cl/118775 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
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants