Skip to content

Make Go label collection work for stripped binaries#729

Closed
nsavoire wants to merge 1 commit intoopen-telemetry:mainfrom
DataDog:nsavoire/g_offset_retrieval_for_stripped_binaries
Closed

Make Go label collection work for stripped binaries#729
nsavoire wants to merge 1 commit intoopen-telemetry:mainfrom
DataDog:nsavoire/g_offset_retrieval_for_stripped_binaries

Conversation

@nsavoire
Copy link
Copy Markdown
Contributor

Use gopclntab to retrieve the runtime.stackcheck / runtime.load_g symbol address when the binary is stripped.

Symbol lookup is currently implemented inefficiently by iterating over the gopclntab functions.

Use gopclntab to retrieve the runtime.stackcheck / runtime.load_g symbol
address when the binary is stripped.

Symbol lookup is currently implemented inefficiently by iterating over the
gopclntab functions.
@nsavoire nsavoire requested review from a team as code owners August 25, 2025 08:11
@linux-foundation-easycla
Copy link
Copy Markdown

CLA Not Signed

return p.val, true
}

func (g *Gopclntab) LookupFunction(funcName string) (uintptr, error) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a duplicate to PCForSymbol() in #728

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry about that, I did not see you already opened a PR for this. I will close this one...

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no worry :) it was just pushed earlier this morning.

@nsavoire nsavoire closed this Aug 25, 2025
@nsavoire nsavoire deleted the nsavoire/g_offset_retrieval_for_stripped_binaries branch December 5, 2025 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants