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

remove upload ExecutableInfo in WriteRawRequest. #3014

Open
zdyj3170101136 opened this issue Jan 2, 2025 · 2 comments
Open

remove upload ExecutableInfo in WriteRawRequest. #3014

zdyj3170101136 opened this issue Jan 2, 2025 · 2 comments

Comments

@zdyj3170101136
Copy link
Contributor

no need to do that.

in extracing of elf file, you could use this to add enough information to elf file to compute base address.

func(p *elf.Prog) bool {
		// use debuginfo to compute baseAddress
		// function GetBase need elf.FileHeader, elf.ProgHeader and stextOffset.
		// - stextOffset compute from ef.Symbols()
		// - elf.FileHeader would all be written through elfwriter.NewFromSource
		// - elf.ProgHeader need .text and elf.PT_LOAD
		return p.Type == elf.PT_LOAD
	}
@brancz
Copy link
Member

brancz commented Jan 6, 2025

This is not quite correct. Stripped debuginfo does not necessarily have the right offsets anymore (split/objdump remove them because the .text section is not there anymore). The binary that was profiled always will though, because otherwise the executable can't be executed.

@brancz
Copy link
Member

brancz commented Jan 6, 2025

Also, the agent already doesn't send it anymore, because it already performs normalization locally.

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

No branches or pull requests

2 participants