-
Notifications
You must be signed in to change notification settings - Fork 632
[BREAKING]libc/elf: rename modlib to elf #2985
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
Conversation
[Experimental Bot, please feedback here] No, this PR does not fully meet the NuttX requirements. While it provides a summary and testing information, it lacks crucial details. Here's what's missing:
Therefore, the PR needs revision before it can be considered complete. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See this comment:
87e6b78
to
6d0afa6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested OK on rv-virt:knsh64. Thanks :-)
https://gist.github.com/lupyuen/edb4747d1235c77be624bd4c6a24a500
+ git clone https://github.com/anchao/nuttx --branch 25020501 nuttx
+ git clone https://github.com/anchao/nuttx-apps --branch 25020501 apps
NuttX Source: https://github.com/apache/nuttx/tree/fa059c19fad275324afdfec023d24a85827516e9
NuttX Apps: https://github.com/apache/nuttx-apps/tree/6d0afa6c9b8d4ecb896f9aa177dbdfcd40218f48
+ tools/configure.sh rv-virt:knsh64
nsh> uname -a
NuttX 10.4.0 fa059c19fa Feb 5 2025 19:25:45 risc-v rv-virt
nsh> ostest
ostest_main: Exiting with status 0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also tested OK on real hardware: Oz64 SG2000 RISC-V SBC (milkv_duos:nsh
). Thanks :-)
https://gist.github.com/lupyuen/15fd5e68f66b03f19f476b5ef3c066f1
+ git clone https://github.com/anchao/nuttx nuttx --branch 25020501
+ git clone https://github.com/anchao/nuttx-apps apps --branch 25020501
NuttX Source: https://github.com/apache/nuttx/tree/fa059c19fad275324afdfec023d24a85827516e9
NuttX Apps: https://github.com/apache/nuttx-apps/tree/6d0afa6c9b8d4ecb896f9aa177dbdfcd40218f48
+ tools/configure.sh milkv_duos:nsh
nsh> uname -a
NuttX 10.4.0 fa059c19fa Feb 6 2025 22:00:28 risc-v milkv_duos
nsh> ostest
ostest_main: Exiting with status 0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @anchao :-)
- Why this change is really necessary? What it fixes / improves?
- Modlib library [1] is meant for loadable modules of various formats. So far we only support ELF but other formats may be added. When other formats are added then elf name will be confusing again. We should stick to name modlib as this is loadable module component, not just elf handler.
- How does that change impact existing configurations and backward-compatibility (i.e. older nuttx-apps)? You marked impact
N/A
but this seems breaking change so description is invalid? Also providing reference to different change is not an impact factor just a reference / dependency and should belong to summary section. - This change will breaks existing libc and configuration. It will break compatibility with nuttx-apps out of sync with nuttx. This change should be marked as breaking change. It would be good to first discuss this kind of change on mailing lists.
- Where are build / runtime test logs? Did you verify build and runtime with latest release of nuttx-apps to see if it does not break things?
- How does that align with other standards (libc) and OS/RTOS implementations?
- How does that align with existing libelf API / compatibility?
[1] https://nuttx.apache.org/docs/latest/applications/examples/module/index.html
[2] https://github.com/apache/nuttx/tree/fdc0b608b5893a207ea37a276e0adade6ded3b62/libs/libc/modlib
NuttX have 2 elf implementations before, one is libelf and other one is modlib, 90% of the code was duplicated. Modlib has more features than libelf, including dynamic loading, so the libelf code was completely deleted in the following commit: In other words, you asked this question because you don't know what happened in modlib, so libelf is a more suitable name |
@anchao could you please verify, it is failing in the CI |
Thanks @acassis , this PR depends on apps repo apache/nuttx#15765, so it may not be possible to pass CI separately |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could there be an email to the mailing list to point out the (proposed) breaking change? Some members of the community don't monitor GitHub. Thanks!
@hartmannathan Thanks for your suggestion, I sent an email to the dev list |
We'll change "Draft Mode" to "Ready for Review" after the voting. Thanks :-) |
Renaming "modlib" to "libelf" is more in line with the implementation content, which makes it easier for individual developers to understand the capabilities of this module. CONFIG_LIBC_MODLIB -> CONFIG_LIBC_ELF Signed-off-by: chao an <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @anchao for your work, the additional information, and discussion/vote on the mailing list! :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@anchao Please close the voting. Thanks :-)
This Breaking PR compiles with the NuttX Breaking Changes Handling Process:
- CI Checks are successful
- Tested OK with OSTest on Real Hardware: Avaota-A1 A527 Arm64 SBC and Oz64 SG2000 64-bit RISC-V SBC
- No Blocking Binding Vote
@lupyuen Done, thank you very much for the extra work on this PR. |
Summary
libc/elf: rename modlib to elf
Renaming "modlib" to "elf" is more in line with the implementation content,
which makes it easier for individual developers to understand the capabilities of this module.
CONFIG_LIBC_MODLIB -> CONFIG_LIBC_ELF
Signed-off-by: chao an [email protected]
Impact
N/A, depends on apache/nuttx#15765
Testing
sim/sotest