-
Notifications
You must be signed in to change notification settings - Fork 7.5k
native_posix: Warnings during link on orphan sections after #10368 #10493
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
Comments
cc: @aescolar |
Raising the priority to |
Note, this can be reproduced with samples/hello_world in Ubuntu 18.04 with the default distro gcc (7.3) |
@aescolar: Are you hinting that this is related to PIE? |
No.. I just pointed to a very typical Linux distribution.. |
GCC on Ubuntu has PIE turned on by default (since 16.10, IIRC). If you do gcc --v and there is an "--enable-default-pie", native_posix will fail to build. Adding "-no-pie" as linker option gets past the PIE issue, but it complains about not able to find "-lgcc_s" (libgcc_s.so and libgcc_s.so.1 are installed by GCC). @aescolar Are you hitting the PIE issue? If so, we need to create another issue for that. |
There are sections defined in common-rom/ram.ld where they are showing up as orphan sections. So add these as known sections. Fixes zephyrproject-rtos#10493 Signed-off-by: Daniel Leung <[email protected]>
With "fail to build" you mean you will get a warning from the linker due to orphan sections? |
Not due to orphan sections, but something like this:
This causes sanitycheck to fail. But PR #10528 will fix the orphan section warning emitted. |
There are sections defined in common-rom/ram.ld where they are showing up as orphan sections. So add these as known sections. Fixes #10493 Signed-off-by: Daniel Leung <[email protected]>
Still some missing (on ae8649c):
20 out of 250 of |
I just did a quick trial build with and without PIE in a Ubuntu 18.04 machine and did not see neither of the problems you mention ( |
Hm... I haven't seen the shell ones on my development machine. It was on GCC 6.4.0 though. The new PR #10536 should fix the shell_* section. |
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]>
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 #10493 Signed-off-by: Daniel Leung <[email protected]>
Resubmitted from #10368 (comment) :
After #10368 was applied, building for BOARD=native_posix produces warnings like below. The resulting executable seems to work.
The text was updated successfully, but these errors were encountered: