Re: [PATCH] libelf: Fixup SHF_COMPRESSED sh_addralign in elf_update if necessary.

2020-08-25 Thread Mark Wielaard
On Wed, Aug 19, 2020 at 11:51:15PM +0200, Mark Wielaard wrote: > In elf_getdata.c we have the following to compensate for possibly > bad sh_addralign values of compressed sections: > > /* Compressed data has a header, but then compressed data. > Make sure to set the alignment of the

Re: [PATCH] libelf: Fixup SHF_COMPRESSED sh_addralign in elf_update if necessary.

2020-08-20 Thread Nick Clifton via Elfutils-devel
Hi Guys, I have now applied the attached patch to the binutils sources to fix the problem there. Cheers Nick diff --git a/bfd/bfd.c b/bfd/bfd.c index ec38a0673c..449bcc6cef 100644 --- a/bfd/bfd.c +++ b/bfd/bfd.c @@ -2558,6 +2558,7 @@ bfd_update_compression_header (bfd *abfd, bfd_byte *conte

[PATCH] libelf: Fixup SHF_COMPRESSED sh_addralign in elf_update if necessary.

2020-08-19 Thread Mark Wielaard
In elf_getdata.c we have the following to compensate for possibly bad sh_addralign values of compressed sections: /* Compressed data has a header, but then compressed data. Make sure to set the alignment of the header explicitly, don't trust the file alignment for the secti