Skip to content

Conversation

@altugbozkurt07
Copy link

@altugbozkurt07 altugbozkurt07 commented Oct 29, 2025

As per our discussion with @alessandrod , i added a small fix to make sure extern declarations preserve linkage/calling-convention and add the proper section info to hint the llvm backend for btf datasec generation for ksyms.


This change is Reviewable

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.

Nice work and thanks for adding the compiler test! Just couple of nits and after that I think it's good to go. 🙂

@vadorovsky reviewed all commit messages.
Reviewable status: 0 of 2 files reviewed, 3 unresolved discussions


-- commits line 2 at r1:
nit: s/Dont/Don't/


src/llvm/mod.rs line 270 at r1 (raw file):

            if num_blocks == 0 {
                unsafe { LLVMSetSection(value, c".ksyms".as_ptr()) };
                info!(

In DISanitizer (https://github.com/aya-rs/bpf-linker/blob/main/src/llvm/di.rs) we seem to use mostly trace! log level for fixups, let's use it here too instead of info!.


src/llvm/mod.rs line 277 at r1 (raw file):

            }
        }
        if unsafe { !LLVMIsAGlobalVariable(value).is_null() } {

As clippy suggests, you can merge these two if stamements into one.

@alessandrod
Copy link
Collaborator

let's not merge this until we have kfuncs working e2e in aya since this might not be enough

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