https://sourceware.org/bugzilla/show_bug.cgi?id=32311
--- Comment #2 from User441669 ---
So the compiler is not very smart... Thanks for your review
--
You are receiving this mail because:
You are on the CC list for the bug.
Priority: P2
Component: libelf
Assignee: unassigned at sourceware dot org
Reporter: the.ra2.ifv at gmail dot com
CC: elfutils-devel at sourceware dot org
Target Milestone: ---
Created attachment 15764
--> https://sourceware.org/bugzi
https://sourceware.org/bugzilla/show_bug.cgi?id=32311
--- Comment #4 from User441669 ---
Just one more step!
Error log:
```text
aarch64-openwrt-linux-musl-gcc-ranlib libelf_pic.a
ccache aarch64-openwrt-linux-musl-gcc -std=gnu99 -Wall -Wshadow -Wformat=2
-Wold-style-definition -Wstrict-prototype
https://sourceware.org/bugzilla/show_bug.cgi?id=32311
--- Comment #8 from User441669 ---
Created attachment 15783
--> https://sourceware.org/bugzilla/attachment.cgi?id=15783&action=edit
elfutils-success.log
The full log after a successful compilation.
--
You are receiving this mail because:
https://sourceware.org/bugzilla/show_bug.cgi?id=32311
--- Comment #9 from User441669 ---
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, loo
https://sourceware.org/bugzilla/show_bug.cgi?id=32311
--- Comment #5 from User441669 ---
(In reply to Mark Wielaard from comment #3)
> Unfortunately I cannot replicate the warning/error even with -flto.
I have no ideas about this. It might be related to the compiler version or musl
libc
--
You
https://sourceware.org/bugzilla/show_bug.cgi?id=32311
--- Comment #7 from User441669 ---
Created attachment 15782
--> https://sourceware.org/bugzilla/attachment.cgi?id=15782&action=edit
007-fix-null-dereference-with-lto.patch
The patch that fixes everything
--
You are receiving this mail bec
https://sourceware.org/bugzilla/show_bug.cgi?id=32311
--- Comment #12 from User441669 ---
> 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?
Uh, no, I'm not sure about this because I'm just a simple