-
Notifications
You must be signed in to change notification settings - Fork 15
llvm-objdump -t does not respect -j #859
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
We do not boot with QEMU because it only supports MARCH_Z900, which is disabled with clang: https://github.com/groeck/linux-build-test/blob/b8650ca8cdef921992b71db582b9bbdc4efb0ab3/rootfs/s390/run-qemu-s390.sh#L22 https://git.kernel.org/linus/c263a4e990b7296b074e33aa077239a0a28a818e We do not use llvm-objdump for the time being because of ClangBuiltLinux/linux#859. Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
We do not boot with QEMU because it only supports MARCH_Z900, which is disabled with clang: https://github.com/groeck/linux-build-test/blob/b8650ca8cdef921992b71db582b9bbdc4efb0ab3/rootfs/s390/run-qemu-s390.sh#L22 https://git.kernel.org/linus/c263a4e990b7296b074e33aa077239a0a28a818e We do not use llvm-objdump for the time being because of ClangBuiltLinux/linux#859. Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
We do not boot with QEMU because it only supports MARCH_Z900, which is disabled with clang: https://github.com/groeck/linux-build-test/blob/b8650ca8cdef921992b71db582b9bbdc4efb0ab3/rootfs/s390/run-qemu-s390.sh#L22 https://git.kernel.org/linus/c263a4e990b7296b074e33aa077239a0a28a818e We do not use llvm-objdump for the time being because of ClangBuiltLinux/linux#859. Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
cc @rupprecht |
This comes from |
The warnings are still present but the build does not error:
Might mean the check might not be working properly? |
Does the error string |
I'm not sure what the original error was. The warning seems benign (should not be firing) but should be fixed. Filed as http://llvm.org/PR50085. It looks like the warning for More minimal repro:
However, GNU objdump prints the same warning for my minimal repro above. And it looks like you don't see the warning with s390x-linux-gnu-objdump? Strange... |
So I still see these warnings with llvm-objcopy-18, but I no longer see the error+build failure.
|
I've retitled this issue to be a little bit more accurate in light of my comments at https://lore.kernel.org/20240219231623.GA2565406@dev-arch.thelio-3990X/, where I also suggest a kernel side workaround for s390 (even though this is no longer s390 specific).
With this issue resolved, |
I've submitted the workaround on the kernel side: https://lore.kernel.org/20240220-s390-work-around-llvm-objdump-t-j-v1-1-47bb0366a831@kernel.org/ |
…ee LLVM With LLVM main, which has the necessary changes to ld.lld and llvm-objcopy to support s390, and linux-next, which has the necessary changes to the kernel to support these tools, ARCH=s390 builds cleanly with LLVM=1. Cut builds that satisfy these conditions over to LLVM=1 so that regressions with this working setup do not occur. Link: llvm/llvm-project@fe3406e Link: llvm/llvm-project@3c02cb7 Link: ClangBuiltLinux/linux#859 Link: ClangBuiltLinux/linux#1991 Link: ClangBuiltLinux/linux#1992 Link: ClangBuiltLinux/linux#1993 Link: ClangBuiltLinux/linux#1994 Link: ClangBuiltLinux/linux#1995 Link: ClangBuiltLinux/linux#1996 Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Kernel workaround accepted: https://git.kernel.org/s390/c/7f115ff4fc20698452ff4a1cbb9c790be10b0066 |
When building with OBJDUMP=llvm-objdump, there are a series of warnings from the section comparisons that arch/s390/boot/Makefile performs between vmlinux and arch/s390/boot/vmlinux: llvm-objdump: warning: section '.boot.preserved.data' mentioned in a -j/--section option, but not found in any input file llvm-objdump: warning: section '.boot.data' mentioned in a -j/--section option, but not found in any input file llvm-objdump: warning: section '.boot.preserved.data' mentioned in a -j/--section option, but not found in any input file llvm-objdump: warning: section '.boot.data' mentioned in a -j/--section option, but not found in any input file The warning is a little misleading, as these sections do exist in the input files. It is really pointing out that llvm-objdump does not match GNU objdump's behavior of respecting '-j' / '--section' in combination with '-t' / '--syms': $ s390x-linux-gnu-objdump -t -j .boot.data vmlinux.full vmlinux.full: file format elf64-s390 SYMBOL TABLE: 0000000001951000 l O .boot.data 0000000000003000 sclp_info_sccb 00000000019550e0 l O .boot.data 0000000000000001 sclp_info_sccb_valid 00000000019550e2 g O .boot.data 0000000000001000 early_command_line ... $ llvm-objdump -t -j .boot.data vmlinux.full vmlinux.full: file format elf64-s390 SYMBOL TABLE: 0000000000100040 l O .text 0000000000000010 dw_psw 0000000000000000 l df *ABS* 0000000000000000 main.c 00000000001001b0 l F .text 00000000000000c6 trace_event_raw_event_initcall_level 0000000000100280 l F .text 0000000000000100 perf_trace_initcall_level ... It may be possible to change llvm-objdump's behavior to match GNU objdump's behavior but the difficulty of that task has not yet been explored. The combination of '$(OBJDUMP) -t -j' is not common in the kernel tree on a whole, so workaround this tool difference by grepping for the sections in the full symbol table output in a similar manner to the sed invocation. This results in no visible change for GNU objdump users while fixing the warnings for OBJDUMP=llvm-objdump, further enabling use of LLVM=1 for ARCH=s390 with versions of LLVM that have support for s390 in ld.lld and llvm-objcopy. Reported-by: Heiko Carstens <hca@linux.ibm.com> Closes: https://lore.kernel.org/20240219113248.16287-C-hca@linux.ibm.com/ Link: ClangBuiltLinux#859 Signed-off-by: Nathan Chancellor <nathan@kernel.org> Link: https://lore.kernel.org/r/20240220-s390-work-around-llvm-objdump-t-j-v1-1-47bb0366a831@kernel.org Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
The text was updated successfully, but these errors were encountered: