anjiahao1 opened a new pull request, #22266:
URL: https://github.com/apache/nuttx/pull/22266

   ## Summary
   
   Add tools/symbolprefix.sh, a helper that adds a prefix to the sections
   and symbols in object files and static archives. Selected sections
   and symbols can be skipped, so a section can remain shared between the
   kernel and user images in a protected build.
   
   Usage:
   
   ```
   symbolprefix.sh [--skip-section <section>]... [--skip-symbol <file>] \
     <input...> <output> <prefix>
   ```
   
   ## Impact
   
   * Is new feature added? YES - a host-side helper tool.
   * Impact on user: NO
   * Impact on build: NO
   * Impact on hardware: NO
   * Impact on documentation: NO
   * Impact on security: NO
   * Impact on compatibility: NO
   
   ## Testing
   
   Build host: Linux x86_64 (Ubuntu 24.04), GCC 13.3.0
   
   * `bash -n tools/symbolprefix.sh`
   * Smoke test: compiled a small object with symbols `foo` and `bar`,
     ran the tool with prefix `myprefix_`, and verified the result:
   
   ```
   $ nm sp_out.o | grep myprefix
   0000000000000000 T myprefix_bar
   0000000000000000 D myprefix_foo
   
   $ readelf -S sp_out.o | grep myprefix
   [ 1] .myprefix_text    PROGBITS ...
   [ 2] .myprefix_data    PROGBITS ...
   [ 3] .myprefix_bss     NOBITS ...
   ```
   
   ## PR verification
   
   * [x] This PR introduces only one functional change.
   * [x] I have updated all required description fields above.
   * [x] My PR adheres to Contributing Guidelines and Documentation.
   * [ ] My PR is still work in progress (not ready for review).
   * [x] My PR is ready for review and can be safely merged into a codebase.
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to