Skip to content

optee-utee-build linker.rs doesn't do proper preprocessing #274

@alexhoppus

Description

@alexhoppus

Hi,

I’m working on OP-TEE OS and my changes touch ta.ld.S. I noticed that optee-utee-build uses ta.ld.S as an input template for linker.rs, but doesn’t actually preprocess it: lines beginning with # are filtered out rather than evaluated.

That means it seems that any conditional logic in ta.ld.S (e.g., #ifdef, #if/#else/#endif) is not applied when generating the final .lds for Rust TAs. Per my understanding this can lead to the generated script containing unintended sections or both conditional branches, and it makes Rust TA linking behavior diverge from the OP-TEE build.

Do you consider this as an issue? If so, are there any plans to address it? If not, I’m happy to contribute a fix, but I’d appreciate guidance on the preferred approach.

Thanks!

cc: @ivila

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions