emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 0/8] ELF unexec (bug#20614)


From: Eli Zaretskii
Subject: Re: [PATCH 0/8] ELF unexec (bug#20614)
Date: Mon, 02 Nov 2015 05:40:43 +0200

> Date: Mon, 2 Nov 2015 12:23:34 +1030
> From: Alan Modra <address@hidden>
> 
> This series of patches addresses bug #20614 by rewriting the bss
> handling code rather than adding yet more hacks.

Thanks.  It would be best to send these to the bug tracker,
address@hidden, so that this is recorded with the bug.

> Finding bss sections
> by name as we do currently results in complicated code that
> - does not account for all names of possible bss sections,
> - assumes specific ordering of bss sections,
> - can wrongly choose a SHT_NOBITS section not in the bss segment,
> - incorrectly calculates bss size (no accounting for alignment gaps),
> - assumes .data and .bss are in the same segment.
> 
> All of these problems and more are solved by finding the bss segment
> in PT_LOAD headers, ie. the address range included in p_memsz but not
> p_filesz of the last PT_LOAD header, then matching SHT_NOBITS sections
> in that address range.
> 
> I've split the patch into a series as there are multiple problems of
> varying severity in this code, and it might be a little easier to
> review this way.  The series was tested indiviually on x86_64-linux
> and on powerpc64-linux and powerpc64le-linux after fixing bug #20614
> with patch 7/8.
> 
> Patch 8/8 goes further and removes the added .data2 section.  I don't
> see any need for a new SHT_PROGBITS section to cover the old bss
> section(s) plus dumped data.  Not adding a section means there is no
> need to patch symbol st_shndx or section sh_info and sh_link fields,
> which is fragile code.  At least, sh_info shouldn't really be patched
> unless SHF_INFO_LINK is set in sh_flags, but not all linkers set the
> flag properly.

I'll let ELF experts review this, but in any case, we will need your
legal paperwork before we can accept such a substantial contribution.
Let me know if you want me to send you the copyright assignment form.

Thanks!



reply via email to

[Prev in Thread] Current Thread [Next in Thread]