-
Notifications
You must be signed in to change notification settings - Fork 7.5k
linker: use wildcards in rel-sections.ld #10536
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
linker: use wildcards in rel-sections.ld #10536
Conversation
Codecov Report
@@ Coverage Diff @@
## master #10536 +/- ##
=======================================
Coverage 53.37% 53.37%
=======================================
Files 210 210
Lines 25825 25825
Branches 5686 5686
=======================================
Hits 13783 13783
Misses 9727 9727
Partials 2315 2315 Continue to review full report at Codecov.
|
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.
shouldnt this be extended to .rel.shell_*.?
Otherwise shell_cmd_ and shell_module_ will be missing.
cadbd99
to
7605336
Compare
Thanks for letting me know. I was just looking at common-rom.ld. |
7605336
to
cea2650
Compare
From #10528 (comment)
@dcpleung : I wanted to add that to #10493, but apparently forgot: did you consider not doing any .ld file hacking for native_posix at all? Like, make it link with default host toolchain settings. (I don't know if that's actually easier, or we have a custom .ld even for native_posix, which is a portability hazard in general). |
Thanks to @SebastianBoe for letting me know that ordering works. So updated the patch to use wildcards to match them all. :) |
cea2650
to
d9ad218
Compare
@pfalcon We do have a custom linker script for posix at |
I have some concerns in the same direction. Given that the posix arch is meant to be used with whatever the user wants/has locally, we have very little control over it. So I'm quite concerned about the amount of issues this may raise over time and the involved maintenance effort for this feature in this arch. |
Just removing it will cause all the warnings to come back. You would want to ifdef the linker flag in the cmake file too |
d9ad218
to
9ba0145
Compare
@aescolar I have disabled orphan section warning for native_posix. If this needs to work, we actually have to override the .rel.plt (as we need the ordering to work correctly) and it will probably be problematic in the future. |
9ba0145
to
f64c480
Compare
@aescolar Those are still needed (with GCC 6.4.0 I am using on my machine). |
This is a sidetrack, and not a comment to this PR in particular, but could you describe the problem you had which required them? |
@aescolar Come to think of it, they are no longer needed as we are not warning about orphan sections for posix anymore... (I need more caffeine... :) ) |
Update rel-sections.ld to use wildcards instead of spelling out those sections one by one. Also, for POSIX, don't include this and turns off the warnings. With different host toolchain across different OS, it would be maintanence nightmare to account for all those combinations. So this reverts the POSIX linker script to before the first orphan section changes. Fixes zephyrproject-rtos#10493 Signed-off-by: Daniel Leung <[email protected]>
f64c480
to
0678f5c
Compare
Also reverted |
Update rel-sections.ld to use wildcards instead of
spelling out those sections one by one.
Fixes #10493
Signed-off-by: Daniel Leung [email protected]