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

Closed
ianlancetaylor opened this issue Nov 10, 2016 · 4 comments
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@ianlancetaylor
Copy link
Contributor

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 The path to resolution is known, but the work has not been done. label May 22, 2017
@bradfitz bradfitz modified the milestones: Go1.9Maybe, Go1.9 May 22, 2017
@bradfitz
Copy link
Contributor

Ian, still interested in this for 1.9?

@ianlancetaylor
Copy link
Contributor Author

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

Change https://golang.org/cl/118775 mentions this issue: cmd/internal/objfile: fetch pclntab for PIE

@gopherbot
Copy link

Change https://go.dev/cl/227483 mentions this issue: cmd/internal/objfile: read file/line information for ELF PIE binaries

@dmitshur dmitshur modified the milestones: Unplanned, Go1.20 Jun 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

5 participants