[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 8285c2a 6/9: ELF unexec: R_*_NONE relocs
From: |
Paul Eggert |
Subject: |
[Emacs-diffs] master 8285c2a 6/9: ELF unexec: R_*_NONE relocs |
Date: |
Sun, 08 Nov 2015 18:01:09 +0000 |
branch: master
commit 8285c2ab8050de218c0c06182659ee0a7b23a0f6
Author: Alan Modra <address@hidden>
Commit: Paul Eggert <address@hidden>
ELF unexec: R_*_NONE relocs
These should be ignored on all targets.
* unexelf.c (unexec): Ignore R_*_NONE relocs for any target,
not just Alpha. Comment on reloc size assumption.
---
src/unexelf.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/unexelf.c b/src/unexelf.c
index df99f92..15a4cde 100644
--- a/src/unexelf.c
+++ b/src/unexelf.c
@@ -1202,7 +1202,7 @@ temacs:
}
/* This loop seeks out relocation sections for the data section, so
- that it can undo relocations performed by the runtime linker. */
+ that it can undo relocations performed by the runtime loader. */
for (n = new_file_h->e_shnum; 0 < --n; )
{
ElfW (Shdr) *rel_shdr = &NEW_SECTION_H (n);
@@ -1235,14 +1235,14 @@ temacs:
reloc += rel_shdr->sh_entsize)
{
ElfW (Addr) addr = ((ElfW (Rel) *) reloc)->r_offset - offset;
-#ifdef __alpha__
- /* The Alpha ELF binutils currently have a bug that
- sometimes results in relocs that contain all
- zeroes. Work around this for now... */
+ /* Ignore R_*_NONE relocs. */
if (((ElfW (Rel) *) reloc)->r_offset == 0)
continue;
-#endif
- memcpy (new_base + addr, old_base + addr, sizeof (ElfW
(Addr)));
+ /* Assume reloc applies to a word.
+ ??? This is not always true, eg. TLS module/index
+ pair in .got which occupies two words. */
+ memcpy (new_base + addr, old_base + addr,
+ sizeof (ElfW (Addr)));
}
}
break;
- [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, 2015/11/08
- [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 <=
- [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