-
Notifications
You must be signed in to change notification settings - Fork 310
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
CONFIG_WERROR=y and CONFIG_LD_ORPHAN_WARN_LEVEL="error" break kpatch-build #1391
Comments
This branch: https://github.com/joe-lawrence/kpatch/tree/ld-orphan-error works around the problem by restoring |
The branch https://github.com/joe-lawrence/kpatch/tree/ld-orphan-error fixed the 'ld: error: unplaced orphan section' error on CentOS-Stream 9 builds. Thanks Joe! |
swine
pushed a commit
to swine/kpatch
that referenced
this issue
May 31, 2024
Upstream kernel v6.1+ commit linux@e1789d7c752e ("kbuild: upgrade the orphan section warning to an error if CONFIG_WERROR is set") and CONFIG_WERROR will result in failed kernel builds due to the linker reporting tons of "unplaced orphan section `.text.<function>` <object-file.o>" errors. Workaround this by temporarily demoting such errors in the top-level kernel Makefile. Reported-and-tested-by: Zhijun Wang <zhijwang@redhat.com> Closes: dynup#1391 ("CONFIG_WERROR=y and CONFIG_LD_ORPHAN_WARN_LEVEL="error" break kpatch-build") Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com>
joe-lawrence
added a commit
to joe-lawrence/kpatch
that referenced
this issue
Jun 7, 2024
Upstream kernel v6.1+ commit linux@e1789d7c752e ("kbuild: upgrade the orphan section warning to an error if CONFIG_WERROR is set") and CONFIG_WERROR will result in failed kernel builds due to the linker reporting tons of "unplaced orphan section `.text.<function>` <object-file.o>" errors. Workaround this by temporarily demoting such errors in the top-level kernel Makefile. Reported-and-tested-by: Zhijun Wang <zhijwang@redhat.com> Closes: dynup#1391 ("CONFIG_WERROR=y and CONFIG_LD_ORPHAN_WARN_LEVEL="error" break kpatch-build") Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Zhijun Wang reports seeing this on recent CentOS-Stream 9 builds.
I can confirm with upstream v6.8 and CONFIG_LD_ORPHAN_WARN_LEVEL="error":
This combination breaks
CONFIG_WERROR=y
kernel builds with-ffunction-sections
as the linker complaints about orphan sections are now promoted to errors.(To be specific, upstream v6.2+ kernel commit torvalds/linux@e1789d7c752e ("kbuild: upgrade the orphan section warning to an error if CONFIG_WERROR is set") propagates the linker error up. I suspect this commit has finally made its way back to CS-9.)
The text was updated successfully, but these errors were encountered: