https://sourceware.org/bugzilla/show_bug.cgi?id=32311
--- Comment #10 from Mark Wielaard <mark at klomp dot org> --- (In reply to User441669 from comment #9) > 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) Thanks for the testing. I see you have some other openwrt specific patches. Do you think any of them are useful upstream or for other distros? > 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 That is odd. I wonder if it is a mold linker bug? ELFUTILS_0.122 is the first symbol version. All warnings are about dwfl_linux_kernel_* symbols provided by libdwfl_pic.a I don't see the pattern, what is wrong here? > Also a full log after compilation, named `elfutils-success.log` is provided > in the attachments in case you need it :) One thing that shows up is: configure: WARNING: compiler doesn't generate build-id by default Which means your gcc isn't configured with --enable-linker-build-id You might want to discuss with your distro to enable them, I believe every other distro does. And various elfutils tools kind of depend on build-ids. -- You are receiving this mail because: You are on the CC list for the bug.