Description of problem: You can reproduce the crash in both x86_64 and aarch64 architectures. On x86_64 architecture: 1. Clone the u-boot project git clone https://source.denx.de/u-boot/u-boot.git 2. Go to the project cd u-boot 3. Configure for the rcar spider board make r8a779f0_spider_defconfig 4. Cross-build with make CROSS_COMPILE=aarch64-linux-gnu- On aarch64 architecture: 1. Clone the u-boot project git clone https://source.denx.de/u-boot/u-boot.git 2. Go to the project cd u-boot 3. Configure for the rcar spider board make r8a779f0_spider_defconfig 4. Build with make The same segmentation fault happens. collect2: fatal error: ld terminated with signal 11 [Segmentation fault], core dumped Version-Release number of selected component: binutils-aarch64-linux-gnu-2.41-2.fc41 Additional info: reporter: libreport-2.17.15 type: CCpp reason: aarch64-linux-gnu-ld killed by SIGSEGV journald_cursor: s=bb27a374636d4211bcbdf6b680828a68;i=122fd75;b=2a04dc238a5c4957967fdb1e5b43987a;m=29564579d1;t=6263c1181d192;x=71d6fbe047bcb459 executable: /usr/bin/aarch64-linux-gnu-ld cmdline: /usr/bin/aarch64-linux-gnu-ld -plugin /usr/libexec/gcc/aarch64-linux-gnu/14/liblto_plugin.so -plugin-opt=/usr/libexec/gcc/aarch64-linux-gnu/14/lto-wrapper -plugin-opt=-fresolution=/tmp/ccudJr06.res --sysroot=/usr/aarch64-linux-gnu/sys-root --build-id --no-add-needed --eh-frame-hdr --hash-style=gnu -dynamic-linker /lib/ld-linux-aarch64.so.1 -X -EL -maarch64linux -o u-boot -L/usr/lib/gcc/aarch64-linux-gnu/14 -L/usr/lib/gcc/aarch64-linux-gnu/14 -z noexecstack --no-warn-rwx-segments -pie --gc-sections -Bstatic --no-dynamic-linker -z notext --build-id=none -Ttext 0x0 arch/arm/cpu/armv8/start.o --whole-archive arch/arm/cpu/built-in.o arch/arm/cpu/armv8/built-in.o arch/arm/lib/built-in.o arch/arm/mach-renesas/built-in.o board/renesas/spider/built-in.o boot/built-in.o cmd/built-in.o common/built-in.o disk/built-in.o drivers/built-in.o drivers/usb/cdns3/built-in.o drivers/usb/common/built-in.o drivers/usb/dwc3/built-in.o drivers/usb/emul/built-in.o drivers/usb/eth/built-in.o drivers/usb/host/built-in.o drivers/usb/isp1760/built-in.o drivers/usb/mtu3/built-in.o drivers/usb/musb-new/built-in.o drivers/usb/musb/built-in.o drivers/usb/phy/built-in.o drivers/usb/ulpi/built-in.o env/built-in.o fs/built-in.o lib/built-in.o net/built-in.o keep-syms-lto.o -lgcc --no-whole-archive -Map u-boot.map -T u-boot.lds cgroup: 0::/user.slice/user-1000.slice/user/app.slice/app-org.gnome.Terminal.slice/vte-spawn-20120831-efc6-44f5-8234-8863123f5475.scope rootdir: / uid: 1000 kernel: 6.11.5-300.fc41.x86_64 package: binutils-aarch64-linux-gnu-2.41-2.fc41 runlevel: N 5 backtrace_rating: 4 crash_function: elf64_aarch64_init_small_plt0_entry Truncated backtrace: Thread no. 1 (4 frames) #0 elf64_aarch64_init_small_plt0_entry at ../bfd/elfnn-aarch64.c:9847 #1 elf64_aarch64_finish_dynamic_sections at ../bfd/elfnn-aarch64.c:9947 #2 bfd_elf_final_link at ../bfd/../../binutils-2.41/bfd/elflink.c:13412 #3 ldwrite at ../../binutils-2.41/ld/ldwrite.c:545
Created attachment 2057675 [details] File: proc_pid_status
Created attachment 2057676 [details] File: maps
Created attachment 2057677 [details] File: limits
Created attachment 2057678 [details] File: open_fds
Created attachment 2057679 [details] File: mountinfo
Created attachment 2057680 [details] File: os_info
Created attachment 2057681 [details] File: cpuinfo
Created attachment 2057682 [details] File: core_backtrace
Created attachment 2057683 [details] File: exploitable
Created attachment 2057684 [details] File: dso_list
Created attachment 2057685 [details] File: environ
Created attachment 2057686 [details] File: backtrace
If I understand right, then the native aarch64 ld crashes the same way as the cross-ld. Let's switch the component to binutils as we are only consumers here.
Yes, this is a linker problem. I have a small patch which allows the link to complete, but I have also pinged the AArch64 binutils maintainers upstream to see if they would prefer a different solution. In the meantime I will apply the patch to rawhide, f42 and f41 so that u-boot builds can complete.
Fixed in binutils-2.44-3.fc42. For unknown reasons rawhide builds are not working at the moment, so a fix for rawhide is delayed.
Fixed in binutils-2.44-3.fc43. The rawhide build issue has resolved itself, so now that build is complete as well. Both builds are now in the Bodhi system awaiting enough karma to reach their buildroots.
Hi Nick I am still seeing the same segmentation fault with binutils-2.44-3.fc43. This occurred with a recent Fedora nightly snapshot while cross compiling u-boot. [root@kvm-01-guest08 ~]# cat /etc/fedora-release Fedora release 43 (Rawhide) [root@kvm-01-guest08 ~]# rpm -qa binutils binutils-2.44-3.fc43.x86_64 [root@kvm-01-guest08 ~]# dnf install -y gcc-aarch64-linux-gnu bison flex openssl-devel gnutls-devel openssl-devel-engine srecord [root@kvm-01-guest08 ~]# git clone https://source.denx.de/u-boot/u-boot.git [root@kvm-01-guest08 ~]# cd u-boot/ [root@kvm-01-guest08 u-boot]# make r8a779f0_spider_defconfig YACC scripts/kconfig/zconf.tab.c LEX scripts/kconfig/zconf.lex.c HOSTCC scripts/kconfig/zconf.tab.o HOSTLD scripts/kconfig/conf # # configuration written to .config # [root@kvm-01-guest08 u-boot]# make CROSS_COMPILE=aarch64-linux-gnu- --->8 UPD include/generated/timestamp_autogenerated.h CC common/version.o AR common/built-in.o KSL keep-syms-lto.c KSLCC keep-syms-lto.o LTO u-boot lto-wrapper: warning: using serial compilation of 12 LTRANS jobs lto-wrapper: note: see the ‘-flto’ option documentation for more information /usr/bin/aarch64-linux-gnu-ld: /usr/lib/gcc/aarch64-linux-gnu/14/libgcc.a(lse-init.o): in function `init_have_lse_atomics': /builddir/build/BUILD/cross-gcc-14.2.1-build/gcc-14.2.1-20240912/aarch64-linux-gnu/aarch64-linux-gnu/libgcc/../../../gcc-14.2.1-20240912/libgcc/config/aarch64/lse-init.c:46:(.text.startup+0xc): undefined reference to `__getauxval' /usr/bin/aarch64-linux-gnu-ld: /usr/lib/gcc/aarch64-linux-gnu/14/libgcc.a(__aarch64_have_sme.o): in function `sme_accessible': /builddir/build/BUILD/cross-gcc-14.2.1-build/gcc-14.2.1-20240912/aarch64-linux-gnu/aarch64-linux-gnu/libgcc/../../../gcc-14.2.1-20240912/libgcc/config/aarch64/__aarch64_have_sme.c:49:(.text.startup+0xc): undefined reference to `__getauxval' /usr/bin/aarch64-linux-gnu-ld: /usr/lib/gcc/aarch64-linux-gnu/14/libgcc.a(__arm_tpidr2_restore.o): in function `__arm_tpidr2_restore': /builddir/build/BUILD/cross-gcc-14.2.1-build/gcc-14.2.1-20240912/aarch64-linux-gnu/aarch64-linux-gnu/libgcc/../../../gcc-14.2.1-20240912/libgcc/config/aarch64/__arm_tpidr2_restore.S:88:(.text+0x90): undefined reference to `abort' /usr/bin/aarch64-linux-gnu-ld: /usr/lib/gcc/aarch64-linux-gnu/14/libgcc.a(__arm_tpidr2_save.o): in function `__libgcc_arm_tpidr2_save': /builddir/build/BUILD/cross-gcc-14.2.1-build/gcc-14.2.1-20240912/aarch64-linux-gnu/aarch64-linux-gnu/libgcc/../../../gcc-14.2.1-20240912/libgcc/config/aarch64/__arm_tpidr2_save.S:95:(.text+0x9c): undefined reference to `abort' collect2: fatal error: ld terminated with signal 11 [Segmentation fault], core dumped compilation terminated. make: *** [Makefile:1824: u-boot] Error 1 make: *** Deleting file 'u-boot'
(In reply to Eddie Kovsky from comment #17) Hi Eddie, > I am still seeing the same segmentation fault with binutils-2.44-3.fc43. > This occurred with a recent Fedora nightly snapshot while cross compiling > u-boot. Darn... > [root@kvm-01-guest08 ~]# rpm -qa binutils > binutils-2.44-3.fc43.x86_64 Ah, but you have also installed: binutils-aarch64-linux-gnu-2.44.3.fc43.x86_64 ? Probably not, because according to koji the build failed. :-( I am looking into this. But in the meantime are you able to test building u-boot in a native AArch64 environment ?
FYI - there are two problems with the cross-binutils package: This first is that the current rawhide sources do not build because they make use of a gcc extension to the C standard, but the cross compiler does not default to supporting this extension. I have created a pull request to fix this build problem: https://src.fedoraproject.org/rpms/cross-binutils/pull-request/8 The second issue is that the cross binutils sources do not include the patch that fixes the u-boot build. The cross-binutils sources are at version 2.43.1-3 but the patch to fix the u-boot build only went into the ordinary binutils sources (as version 2.44-3). So this patch needs to be copied into the cross-binutils. I am working on this.
Ideally we would like to keep cross-binutils close to the rawhide (or branched) binutils, but help is always welcome ...
(In reply to Dan Horák from comment #20) > Ideally we would like to keep cross-binutils close to the rawhide (or > branched) binutils, but help is always welcome ... In which case I have now updated the pull request with the addition of the patch from binutils/rawhide that allows u-boot to build... :-)
... and the pull request is in and the builds are complete. I am not sure how long it will take the buildroot to update, but in the meantime you can download binutils-aarch64-linux-gnu-2.43.1-5.fc43.x86_64.rpm from: https://koji.fedoraproject.org/koji/rpminfo?rpmID=41992751
(In reply to Nick Clifton from comment #22) > ... and the pull request is in and the builds are complete. I am not sure > how long it will take the buildroot to update, but in the meantime you can > download binutils-aarch64-linux-gnu-2.43.1-5.fc43.x86_64.rpm from: > > https://koji.fedoraproject.org/koji/rpminfo?rpmID=41992751 should be in the buildroot now and tomorrow in the public rawhide repo, F-42 build has been submitted as an update in https://bodhi.fedoraproject.org/updates/FEDORA-2025-8e99c6193f
Looks like the update in https://bodhi.fedoraproject.org/updates/FEDORA-2025-8e99c6193f is failing one test on rpminspect: https://artifacts.dev.testing-farm.io/8e612a81-b9e5-45bf-9572-4edf1b12f526/
Is this now fixed in current release? Can this be closed?
Yes, closing