[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 0bcd08e 1/9: ELF unexec: Correct section header ind
From: |
Paul Eggert |
Subject: |
[Emacs-diffs] master 0bcd08e 1/9: ELF unexec: Correct section header index |
Date: |
Sun, 08 Nov 2015 18:01:07 +0000 |
branch: master
commit 0bcd08ef052bca9b8d08696068c2a0c387d0dd56
Author: Alan Modra <address@hidden>
Commit: Paul Eggert <address@hidden>
ELF unexec: Correct section header index
First a small fix. The code incorrectly uses "NEW_SECTION_H (n)" when
it should have been using "NEW_SECTION_H (nn)" to find the name of the
section currently being processed. Of course, before the bss
sections, n and nn have the same value, so this doesn't matter except
in the case of .sbss. For .sbss this probably meant .bss (most likely
the next section) was copied from memory. A later patch removes the
bogus .sbss handling anyway.
* unexelf.c (unexec): Use correct index to look up names.
---
src/unexelf.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/unexelf.c b/src/unexelf.c
index 483da6e..1699f31 100644
--- a/src/unexelf.c
+++ b/src/unexelf.c
@@ -1015,12 +1015,12 @@ temacs:
/* Write out the sections. .data and .data1 (and data2, called
".data" in the strings table) get copied from the current process
instead of the old file. */
- if (!strcmp (old_section_names + NEW_SECTION_H (n).sh_name, ".data")
- || !strcmp ((old_section_names + NEW_SECTION_H (n).sh_name),
+ if (!strcmp (old_section_names + NEW_SECTION_H (nn).sh_name, ".data")
+ || !strcmp ((old_section_names + NEW_SECTION_H (nn).sh_name),
".sdata")
- || !strcmp ((old_section_names + NEW_SECTION_H (n).sh_name),
+ || !strcmp ((old_section_names + NEW_SECTION_H (nn).sh_name),
".lit4")
- || !strcmp ((old_section_names + NEW_SECTION_H (n).sh_name),
+ || !strcmp ((old_section_names + NEW_SECTION_H (nn).sh_name),
".lit8")
/* The conditional bit below was in Oliva's original code
(1999-08-25) and seems to have been dropped by mistake
@@ -1043,14 +1043,14 @@ temacs:
loader, but I never got anywhere with an SGI support call
seeking clues. -- fx 2002-11-29. */
#ifdef IRIX6_5
- || !strcmp ((old_section_names + NEW_SECTION_H (n).sh_name),
+ || !strcmp ((old_section_names + NEW_SECTION_H (nn).sh_name),
".got")
#endif
- || !strcmp ((old_section_names + NEW_SECTION_H (n).sh_name),
+ || !strcmp ((old_section_names + NEW_SECTION_H (nn).sh_name),
".sdata1")
- || !strcmp ((old_section_names + NEW_SECTION_H (n).sh_name),
+ || !strcmp ((old_section_names + NEW_SECTION_H (nn).sh_name),
".data1")
- || !strcmp ((old_section_names + NEW_SECTION_H (n).sh_name),
+ || !strcmp ((old_section_names + NEW_SECTION_H (nn).sh_name),
".sbss"))
src = (caddr_t) OLD_SECTION_H (n).sh_addr;
else
- [Emacs-diffs] master updated (82c1b36 -> 2ce0c06), Paul Eggert, 2015/11/08
- [Emacs-diffs] master 0bcd08e 1/9: ELF unexec: Correct section header index,
Paul Eggert <=
- [Emacs-diffs] master 190b968 4/9: ELF unexec: Symbol table patching, Paul Eggert, 2015/11/08
- [Emacs-diffs] master 47c6e30 3/9: ELF unexec: Merge Alpha and MIPS COFF debug handling, Paul Eggert, 2015/11/08
- [Emacs-diffs] master 3ff9fc0 5/9: ELF unexec: _OBJC_ symbols in bss sections, Paul Eggert, 2015/11/08
- [Emacs-diffs] master 856f4ea 2/9: ELF unexec: Tidy code, Paul Eggert, 2015/11/08
- [Emacs-diffs] master 2ce0c06 9/9: * src/unexelf.c (NEW_PROGRAM_H): Remove unused macro (Bug#20614)., Paul Eggert, 2015/11/08
- [Emacs-diffs] master 8285c2a 6/9: ELF unexec: R_*_NONE relocs, Paul Eggert, 2015/11/08
- [Emacs-diffs] master 3008c52 8/9: ELF unexec: Don't insert a new section, Paul Eggert, 2015/11/08
- [Emacs-diffs] master 0d64422 7/9: ELF unexec: Drive from PT_LOAD header rather than sections, Paul Eggert, 2015/11/08