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

aya: Apply BTF relocations to all functions #602

Merged
merged 2 commits into from
May 29, 2023

Conversation

marysaka
Copy link
Member

@marysaka marysaka commented May 3, 2023

This fix aya wrong logic causing non entrypoint functions to not have any BTF relocations working.

As a result, I needed to refactor how functions are stored and handled.

I also fixed missing section_offset computation for instruction offset in multiple spots.

@netlify
Copy link

netlify bot commented May 3, 2023

Deploy Preview for aya-rs-docs ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit c4e721f
🔍 Latest deploy log https://app.netlify.com/sites/aya-rs-docs/deploys/6474a8837d696e00085c4c8b
😎 Deploy Preview https://deploy-preview-602--aya-rs-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@marysaka marysaka force-pushed the fix/btf-reloc-all-functions branch 2 times, most recently from 78ce3b6 to d62fda7 Compare May 4, 2023 10:13
Copy link
Member

@vadorovsky vadorovsky left a comment

Choose a reason for hiding this comment

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

In general looks good, just wondering about that added @section in the error message.

aya-obj/src/btf/relocation.rs Outdated Show resolved Hide resolved
Copy link
Collaborator

@alessandrod alessandrod left a comment

Choose a reason for hiding this comment

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

This is a quality PR! Thanks so much for doing this work. See comments.

aya-obj/src/btf/relocation.rs Outdated Show resolved Hide resolved
aya-obj/src/btf/relocation.rs Outdated Show resolved Hide resolved
aya-obj/src/btf/relocation.rs Show resolved Hide resolved
aya-obj/src/btf/relocation.rs Outdated Show resolved Hide resolved
test/integration-test/src/tests/btf_relocations.rs Outdated Show resolved Hide resolved
@marysaka marysaka force-pushed the fix/btf-reloc-all-functions branch 2 times, most recently from 28be1cc to c737e5c Compare May 29, 2023 09:55
@marysaka marysaka requested a review from alessandrod May 29, 2023 09:57
Copy link
Collaborator

@alessandrod alessandrod left a comment

Choose a reason for hiding this comment

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

Looks good, just a small nit

aya-obj/src/btf/relocation.rs Outdated Show resolved Hide resolved
This fix aya wrong logic causing non entrypoint functions to not have
any BTF relocations working.

Also fix missing section_offset computation for instruction offset in
multiple spots.
@marysaka marysaka force-pushed the fix/btf-reloc-all-functions branch from c737e5c to c4e721f Compare May 29, 2023 13:28
@marysaka
Copy link
Member Author

Looks good, just a small nit

Should be ready to merge 👍

@alessandrod alessandrod merged commit 3a9a54f into aya-rs:main May 29, 2023
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.

3 participants