[Bug,libelf/32311] elf_compress_gnu.c: gcc warns null-dereference with lto
Commit Message
https://sourceware.org/bugzilla/show_bug.cgi?id=32311
--- Comment #6 from Mark Wielaard <mark at klomp dot org> ---
(In reply to User441669 from comment #4)
> Just one more step!
>
Indeed! There was one typo in the patch (forgot to remove one line):
Good to see your compiler version/setup caught that.
I'll post an updated patch. If you could test that one to see if it resolves
all compiler warnings that would be appreciated.
@@ -691,7 +691,6 @@ elf_compress (Elf_Scn *scn, int type, unsigned int flags)
}
else
{
- shdr.s64 = elf64_getshdr (scn);
shdr.s64->sh_size = new_size;
shdr.s64->sh_addralign = __libelf_type_align (ELFCLASS64,
ELF_T_CHDR);