From 21c288d8bd7e1981891e058d6066c5e7915543da Mon Sep 17 00:00:00 2001 From: patrick Date: Thu, 8 Jun 2017 19:40:49 +0000 Subject: [PATCH] Remove esym (.data) patching. Thanks to Mark we stopped requiring this and with the random-order kernel we shouldn't be doing that anyway. ok kettenis@ --- sys/arch/armv7/stand/efiboot/exec.c | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/sys/arch/armv7/stand/efiboot/exec.c b/sys/arch/armv7/stand/efiboot/exec.c index 282b38b8aaa..4a8a434b3af 100644 --- a/sys/arch/armv7/stand/efiboot/exec.c +++ b/sys/arch/armv7/stand/efiboot/exec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: exec.c,v 1.10 2016/10/06 18:15:44 kettenis Exp $ */ +/* $OpenBSD: exec.c,v 1.11 2017/06/08 19:40:49 patrick Exp $ */ /* * Copyright (c) 2006, 2016 Mark Kettenis @@ -35,30 +35,11 @@ typedef void (*startfuncp)(void *, void *, void *) __attribute__ ((noreturn)); void run_loadfile(u_long *marks, int howto) { - Elf_Ehdr *elf = (Elf_Ehdr *)marks[MARK_SYM]; - Elf_Shdr *shp = (Elf_Shdr *)(marks[MARK_SYM] + elf->e_shoff); u_long esym = marks[MARK_END] & 0x0fffffff; - u_long offset = 0; char args[256]; char *cp; void *fdt; uint32_t board_id = 0; - int i; - - /* - * Tell locore.S where the symbol table ends by setting - * 'esym', which should be the first word in the .data - * section. - */ - for (i = 0; i < elf->e_shnum; i++) { - /* XXX Assume .data is the first writable segment. */ - if (shp[i].sh_flags & SHF_WRITE) { - /* XXX We have to store the virtual address. */ - esym |= shp[i].sh_addr & 0xf0000000; - *(u_long *)(LOADADDR(shp[i].sh_addr)) = esym; - break; - } - } snprintf(args, sizeof(args) - 8, "%s:%s", cmd.bootdev, cmd.image); cp = args + strlen(args); -- 2.20.1