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

From: Paul Eggert <[email-masked]>
Date: Sun, 8 Nov 2015 10:07:42 -0800

Alan Modra wrote:
> IBM legal get back to me to say they believe IBM's FSF copyright
> assignment letter does cover contributions to EMACS.

This should be enough. I installed your patch into Emacs master, with one minor 
fixup (attached) to pacify './configure --enable-gcc-warnings'.

Petr, can you please verify that this fixes the bug for you? If so, I can mark 
the bug as fixed in our database.

Thanks again for fixing the bug, Alan.
>From fc4d0bb842509ce81d2dfe2dec1f7fdbef728531 Mon Sep 17 00:00:00 2001
From: Paul Eggert <[email-masked]>
Date: Sun, 8 Nov 2015 09:36:14 -0800
Subject: [PATCH] * src/unexelf.c (NEW_PROGRAM_H): Remove unused macro
 (Bug#20614).

---
 src/unexelf.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/unexelf.c b/src/unexelf.c
index 85ed934..c10c7f2 100644
--- a/src/unexelf.c
+++ b/src/unexelf.c
@@ -208,8 +208,6 @@ entry_address (void *section_h, ptrdiff_t idx, ptrdiff_t entsize)
   (*(ElfW (Shdr) *) entry_address (new_section_h, n, new_file_h->e_shentsize))
 #define OLD_PROGRAM_H(n) \
   (*(ElfW (Phdr) *) entry_address (old_program_h, n, old_file_h->e_phentsize))
-#define NEW_PROGRAM_H(n) \
-  (*(ElfW (Phdr) *) entry_address (new_program_h, n, new_file_h->e_phentsize))
 
 typedef unsigned char byte;
 
@@ -250,7 +248,7 @@ unexec (const char *new_name, const char *old_name)
   ElfW (Phdr) *old_bss_seg, *new_bss_seg;
   ElfW (Addr) old_bss_addr, new_bss_addr;
   ElfW (Word) old_bss_size, new_data2_size;
-  ElfW (Off)  old_bss_offset, new_data2_offset;
+  ElfW (Off) old_bss_offset, new_data2_offset;
 
   ptrdiff_t n;
   ptrdiff_t old_bss_index;
-- 
2.1.0