Skip to content

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

@ianlancetaylor

Description

@ianlancetaylor
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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.compiler/runtimeIssues related to the Go compiler and/or runtime.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions