https://sourceware.org/bugzilla/show_bug.cgi?id=32311
--- Comment #9 from User441669 <the.ra2.ifv at gmail dot com> --- Compilation successfully! I plan to close this issue as fixed, and send this patch to the OpenWrt project (named `007-fix-null-dereference-with-lto.patch` in the attachments) linker prints some warnings, looks like it's about the libdw component: ccache aarch64-openwrt-linux-musl-gcc -std=gnu99 -Wall -Wshadow -Wformat=2 -Wold-style-definition -Wstrict-prototypes -Wtrampolines -Wlogical-op -Wduplicated-cond -Wnull-dereference -Wimplicit-fallthrough=5 -Wuse-after-free=3 -Werror -Wunused -Wextra -Wstack-usage=262144 -mcpu=cortex-a72.cortex-a53 -fno-caller-saves -fno-plt -pipe -Ofast -fhonour-copts -fmacro-prefix-map=/openwrt/build_dir/target-aarch64_generic_musl/elfutils-0.191=elfutils-0.191 -ffunction-sections -fdata-sections -flto=auto -fno-fat-lto-objects -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -D_GNU_SOURCE -Wno-unused-result -Wno-format-nonliteral -Wno-error=use-after-free -L/openwrt/staging_dir/toolchain-aarch64_generic_gcc-14.2.0_musl/usr/lib -L/openwrt/staging_dir/toolchain-aarch64_generic_gcc-14.2.0_musl/lib -fuse-ld=mold -Wl,--gc-sections -flto=auto -fuse-linker-plugin -znow -zrelro -Wl,--build-id -o libdw.so -shared -Wl,-z,defs -Wl,-z,relro -o libdw.so \ -Wl,--soname,libdw.so.1,--enable-new-dtags \ -Wl,--version-script,libdw.map \ -Wl,--no-undefined \ -Wl,--whole-archive ../libebl/libebl_pic.a ../backends/libebl_backends_pic.a ../libcpu/libcpu_pic.a libdw_pic.a ../libdwelf/libdwelf_pic.a ../libdwfl/libdwfl_pic.a -Wl,--no-whole-archive \ ../lib/libeu.a ../libelf/libelf.so -ldl -lz -largp -lfts -pthread mold: warning: libdw.map: cannot assign version `ELFUTILS_0.122` to symbol `dwfl_linux_kernel_find_elf`: symbol not found mold: warning: libdw.map: cannot assign version `ELFUTILS_0.122` to symbol `dwfl_linux_kernel_module_section_address`: symbol not found mold: warning: libdw.map: cannot assign version `ELFUTILS_0.122` to symbol `dwfl_linux_kernel_report_kernel`: symbol not found mold: warning: libdw.map: cannot assign version `ELFUTILS_0.122` to symbol `dwfl_linux_kernel_report_modules`: symbol not found mold: warning: libdw.map: cannot assign version `ELFUTILS_0.122` to symbol `dwfl_linux_kernel_report_offline`: symbol not found mold: warning: libdw.map: cannot assign version `ELFUTILS_0.122` to symbol `dwfl_linux_kernel_find_elf`: symbol not found mold: warning: libdw.map: cannot assign version `ELFUTILS_0.122` to symbol `dwfl_linux_kernel_module_section_address`: symbol not found mold: warning: libdw.map: cannot assign version `ELFUTILS_0.122` to symbol `dwfl_linux_kernel_report_kernel`: symbol not found mold: warning: libdw.map: cannot assign version `ELFUTILS_0.122` to symbol `dwfl_linux_kernel_report_modules`: symbol not found mold: warning: libdw.map: cannot assign version `ELFUTILS_0.122` to symbol `dwfl_linux_kernel_report_offline`: symbol not found Also a full log after compilation, named `elfutils-success.log` is provided in the attachments in case you need it :) Thanks for your excellent work! I appreciate your kindness and generous help. ^^ -- You are receiving this mail because: You are on the CC list for the bug.