-
Notifications
You must be signed in to change notification settings - Fork 15
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
Thin LTO causes relocation R_AARCH64_CALL26 out of range
#1550
Comments
By the way, I was unable to test |
"Doctor, it hurts when I do this." "So don't do that." :) But in all seriousness, the likelihood of this happening in the real world is fairly slim, as distributions will build modular kernels so that they can run on a wide variety of hardware and people who want a monolithic kernel are going to only build what they need for a single piece of hardware. Does this require LTO to reproduce? I tried to build an arm64 allyesconfig + |
@nathanchance Yes, it does. The symptom disappears with I completely agree that |
LLD accepts |
No-LTO does not show this symptom even with |
CONFIG_RELOCATABLE=n
does not prevent relocation R_AARCH64_CALL26 out of range
relocation R_AARCH64_CALL26 out of range
shadow call stack, CFI, DEBUG_INFO, TRIM_UNUSED_KSYMS are unnecessary to cause this symptom. The script attached to #1554 still causes this. |
This might be caused by significant differences in sizes of vmlinux: Without LTO:
With thin LTO:
The difference ratio is even greater than the x86 case #1556. |
This could be a duplicate of #1394. When the kernel is too big, relocation out of range looks natural. On the other hand,
CONFIG_RELOCATABLE=n
should prevent such errors.Besides,
allyesconfig
for arm64 leaves many modules disabled. This is becauseCONFIG_ARCH_*
,CONFIG_*_MBOX
andCONFIG_*_FIRMWARE
are left disabled. Building a too big kernel needs manual configuration.With the attached .config or reproducing script, linux 5.16-rc5 with
CONFIG_RELOCATABLE=n
causes the following build error:clang-build-arch28.sh.gz
config.txt.gz
The text was updated successfully, but these errors were encountered: