Hi Daniel! On 5/18/21 4:26 PM, Daniel Kiper wrote: > When I was looking at the issue first time I thought in the same way. > Though after some thinking I realized that it is perfectly valid to > start 64-bit kernel from 32-bit bootloader which was build in 32-bit > environment. So, I think it makes sense to take that patch, which is not > very complicated and does not introduce anything which did not exist > earlier in the relocator64.S, even a such scenario is not very common > today.
But this is about the toolchain, isn't it? Shouldn't even a 32-bit x86 toolchain be able to build 64-bit code? I just checked standard binutils on a 32-bit Debian system and both the assembler and the linker support 64-bit targets: (sid_i386-dchroot)glaubitz@barriere:~$ as --help|grep 64 --32/--64/--x32 generate 32bit/64bit/x32 code generic32, generic64, i386, i486, i586, i686, pconfig, waitpkg, cldemote, movdiri, movdir64b, nomovdiri, nomovdir64b, noavx512_bf16, generic32, generic64, i8086, i186, i286, i386, i486, -mamd64 accept only AMD64 ISA [default] -mintel64 accept only Intel64 ISA (sid_i386-dchroot)glaubitz@barriere:~$ (sid_i386-dchroot)glaubitz@barriere:~$ ld --help|grep supported ld: supported targets: elf32-i386 elf32-iamcu pei-i386 elf32-little elf32-big elf64-x86-64 elf32-x86-64 pei-x86-64 elf64-l1om elf64-k1om elf64-little elf64-big pe-x86-64 pe-bigobj-x86-64 pe-i386 srec symbolsrec verilog tekhex binary ihex plugin trad-core ld: supported emulations: elf_i386 elf_iamcu elf_x86_64 elf32_x86_64 elf_l1om elf_k1om i386pep i386pe (sid_i386-dchroot)glaubitz@barriere:~$ So I'm not sure what kind of host system we are talking about here? This looks more like a configuration issue of the distribution in question which deliberately builds its 32-bit toolchain without 64-bit support. Adrian -- .''`. John Paul Adrian Glaubitz : :' : Debian Developer - glaub...@debian.org `. `' Freie Universitaet Berlin - glaub...@physik.fu-berlin.de `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913 _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel