Re: [PATCH] s390/boot: Add 'alloc' to info.bin .vmlinux.info section flags

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Feb 16, 2024 at 12:55:53PM -0700, Nathan Chancellor wrote:
> When attempting to boot a kernel compiled with OBJCOPY=llvm-objcopy,
> there is a crash right at boot:
> 
>   Out of memory allocating 6d7800 bytes 8 aligned in range 0:20000000
>   Reserved memory ranges:
>   0000000000000000 a394c3c30d90cdaf DECOMPRESSOR
>   Usable online memory ranges (info source: sclp read info [3]):
>   0000000000000000 0000000020000000
>   Usable online memory total: 20000000 Reserved: a394c3c30d90cdaf Free: 0
>   Call Trace:
>   (sp:0000000000033e90 [<0000000000012fbc>] physmem_alloc_top_down+0x5c/0x104)
>    sp:0000000000033f00 [<0000000000011d56>] startup_kernel+0x3a6/0x77c
>    sp:0000000000033f60 [<00000000000100f4>] startup_normal+0xd4/0xd4
> 
> GNU objcopy does not have any issues. Looking at differences between the
> object files in each build reveals info.bin does not get properly
> populated with llvm-objcopy, which results in an empty .vmlinux.info
> section.
...
> Closes: https://github.com/ClangBuiltLinux/linux/issues/1996
> Link: https://github.com/llvm/llvm-project/commit/3c02cb7492fc78fb678264cebf57ff88e478e14f
> Suggested-by: Ulrich Weigand <ulrich.weigand@xxxxxxxxxx>
> Signed-off-by: Nathan Chancellor <nathan@xxxxxxxxxx>

Thanks a lot, applied!

However when building the kernel with "LLVM=1" I can see
something else which looks like an llvm-objdump bug to me:

$make LLVM=1 bzImage
...
  SECTCMP .boot.data
llvm-objdump: warning: section '.boot.data' mentioned in a -j/--section option, but not found in any input file

This works without warning with GNU objcopy, and actually the output
is also different:

$ objdump -v
GNU objdump (GNU Binutils for Ubuntu) 2.41

$ objdump -t -j .boot.data arch/s390/boot/vmlinux

arch/s390/boot/vmlinux:     file format elf64-s390

SYMBOL TABLE:
0000000000020000 l     O .boot.data     0000000000003000 sclp_info_sccb
00000000000240e0 l     O .boot.data     0000000000000001 sclp_info_sccb_valid
0000000000023010 g     O .boot.data     0000000000000008 ident_map_size
0000000000023018 g     O .boot.data     00000000000010c8 physmem_info
00000000000250e2 g       .boot.data     0000000000000000 __boot_data_end
0000000000020000 g       .boot.data     0000000000000000 __boot_data_start
00000000000240e2 g     O .boot.data     0000000000001000 early_command_line
0000000000023008 g     O .boot.data     0000000000000008 early_ipl_comp_list_size
0000000000023000 g     O .boot.data     0000000000000008 early_ipl_comp_list_addr

While with llvm-copy:

$ llvm-objdump --version
LLVM (http://llvm.org/):
  LLVM version 19.0.0git

$ llvm-objdump -t -j .boot.data arch/s390/boot/vmlinux

arch/s390/boot/vmlinux: file format elf64-s390

SYMBOL TABLE:
0000000000000200 l       .head.text     0000000000000000 ipl_start
0000000000010020 l       .head.text     00000000000000d4 startup_normal
00000000000101b0 l       .head.text     00000000000000b2 startup_kdump
0000000000010280 l       .head.text     000000000000005a startup_pgm_check_handler
000000000001025c l       .head.text     0000000000000000 startup_kdump_relocated
0000000000000000 l    df *ABS*  0000000000000000 als.c
000000000001e040 l     O .rodata        0000000000000018 als
000000000001f6f0 l     O .data  0000000000000050 print_missing_facilities.als_str
0000000000011800 l     F .text  00000000000000e2 print_machine_type
...
0000000000020000 l     O .boot.data     0000000000003000 sclp_info_sccb
00000000000240e0 l     O .boot.data     0000000000000001 sclp_info_sccb_valid
... and so on (everything is dumped)
llvm-objdump: warning: section '.boot.data' mentioned in a -j/--section option, but not found in any input file

So somehow llvmdump's "-j/--section" option doesn not seem to work.




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux