Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

redbpf: compute symbol offset rather than address #357

Closed
wants to merge 1 commit into from

Conversation

ajwerner
Copy link

Fixes #356

BPF expects offsets in the object files rather than virtual memory addresses. In some cases, the virtual memory offset of the .text section is 0, in which case the correction in this change is a no-op. If the .text section has a non-zero address offset, the previous logic for determining the symbol offset was wrong.

BPF expects offsets in the object files rather than virtual memory addresses.
In some cases, the virtual memory offset of the .text section is 0, in which
case the correction in this change is a no-op. If the .text section has a
non-zero address offset, the previous logic for determining the symbol offset
was wrong.
@ajwerner ajwerner marked this pull request as draft December 28, 2022 14:54
@ajwerner
Copy link
Author

Preempted by #308.

@ajwerner ajwerner closed this Dec 28, 2022
@ajwerner ajwerner deleted the symbol-offset-calculation branch December 28, 2022 15:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sym_offset calculation in attach uprobe fails to account to address differences
1 participant