summaryrefslogtreecommitdiff
path: root/kexec/kexec-elf-rel.c
diff options
context:
space:
mode:
authorLaurent Dufour <ldufour@linux.vnet.ibm.com>2014-02-03 15:37:49 +0100
committerSimon Horman <horms@verge.net.au>2014-02-04 17:26:10 +0900
commitd047cb716ee41ead450af5e8cc8e7190d2d04673 (patch)
tree322f36bcfd1c07ed46b733651623c78e2d4662a4 /kexec/kexec-elf-rel.c
parent178e393d3a00604143eab2889939ea13be095e03 (diff)
kexec/ppc64 ELF ABIv2 ABI support
When building in PPC64 little endian mode, the compiler is now using the new ABI v2. Among other changes, this new ABI removes the function descriptors and changes the way the TOC address is computed when entering a C function. The purgatory assembly part where the dot symbols are removed, and ELF relocation code are impacted in this patch. Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com> Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'kexec/kexec-elf-rel.c')
-rw-r--r--kexec/kexec-elf-rel.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/kexec/kexec-elf-rel.c b/kexec/kexec-elf-rel.c
index 020cab0..c625f30 100644
--- a/kexec/kexec-elf-rel.c
+++ b/kexec/kexec-elf-rel.c
@@ -379,12 +379,12 @@ int elf_rel_load(struct mem_ehdr *ehdr, struct kexec_info *info,
* Relocation Entries: If the index is STN_UNDEF,
* the undefined symbol index, the relocation uses 0
* as the "symbol value".
- * So, is this really an error condition to flag die?
+ * TOC symbols appear as undefined but should be
+ * resolved as well. Their type is STT_NOTYPE so allow
+ * such symbols to be processed.
*/
- /*
- die("Undefined symbol: %s\n", name);
- */
- continue;
+ if (ELF32_ST_TYPE(sym.st_info) != STT_NOTYPE)
+ die("Undefined symbol: %s\n", name);
}
sec_base = 0;
if (sym.st_shndx == SHN_COMMON) {