You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@teaclave.apache.org by "alexhoppus (via GitHub)" <gi...@apache.org> on 2026/02/03 14:53:29 UTC

[I] optee-utee-build linker.rs doesn't do proper preprocessing [teaclave-trustzone-sdk]

alexhoppus opened a new issue, #274:
URL: https://github.com/apache/teaclave-trustzone-sdk/issues/274

   Hi,
   
   I’m [working](https://github.com/OP-TEE/optee_os/pull/7690) on OP-TEE OS and my changes touch `ta.ld.S`. I noticed that `optee-utee-build` [uses](https://github.com/apache/teaclave-trustzone-sdk/blob/main/optee-utee-build/src/linker.rs#L144) `ta.ld.S` as an input template for `linker.rs`, but doesn’t actually preprocess it: lines beginning with `#` are [filtered](https://github.com/apache/teaclave-trustzone-sdk/blob/main/optee-utee-build/src/linker.rs#L151) 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 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@teaclave.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@teaclave.apache.org
For additional commands, e-mail: dev-help@teaclave.apache.org


Re: [I] optee-utee-build linker.rs doesn't do proper preprocessing [teaclave-trustzone-sdk]

Posted by "ivila (via GitHub)" <gi...@apache.org>.
ivila commented on issue #274:
URL: https://github.com/apache/teaclave-trustzone-sdk/issues/274#issuecomment-3844735891

   **1. Do you consider this an issue?** 
    
   Yes, I do.
   
   **2. Are there any plans to address it?**
   
   There weren't originally, but I'm going to work on a fix today. Contributions of any kind are more than welcome, and I don’t have a specific approach in mind—feel free to tackle it however you see fit!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@teaclave.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@teaclave.apache.org
For additional commands, e-mail: dev-help@teaclave.apache.org


Re: [I] optee-utee-build linker.rs doesn't do proper preprocessing [teaclave-trustzone-sdk]

Posted by "ivila (via GitHub)" <gi...@apache.org>.
ivila closed issue #274: optee-utee-build linker.rs doesn't do proper preprocessing
URL: https://github.com/apache/teaclave-trustzone-sdk/issues/274


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@teaclave.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@teaclave.apache.org
For additional commands, e-mail: dev-help@teaclave.apache.org