From owner-svn-src-stable@freebsd.org Tue Feb 13 04:10:11 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6AA8DF1CD6F; Tue, 13 Feb 2018 04:10:11 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 18D33820CE; Tue, 13 Feb 2018 04:10:11 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E60681BAD3; Tue, 13 Feb 2018 04:10:10 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w1D4AAVa091441; Tue, 13 Feb 2018 04:10:10 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w1D4AAZZ091439; Tue, 13 Feb 2018 04:10:10 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201802130410.w1D4AAZZ091439@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Tue, 13 Feb 2018 04:10:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r329191 - in stable/11: stand/common sys/kern X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable/11: stand/common sys/kern X-SVN-Commit-Revision: 329191 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Feb 2018 04:10:11 -0000 Author: kevans Date: Tue Feb 13 04:10:10 2018 New Revision: 329191 URL: https://svnweb.freebsd.org/changeset/base/329191 Log: Revert MFC r328911 from r329183 jhb@ had specified an MFC timer of 1-month, and I clobbered his efforts by MFC'ing it way prematurely. Back out that part of r329183 so it may be MFC'd when jhb is ready. Modified: stable/11/stand/common/load_elf_obj.c stable/11/sys/kern/link_elf_obj.c Directory Properties: stable/11/ (props changed) Modified: stable/11/stand/common/load_elf_obj.c ============================================================================== --- stable/11/stand/common/load_elf_obj.c Tue Feb 13 03:44:50 2018 (r329190) +++ stable/11/stand/common/load_elf_obj.c Tue Feb 13 04:10:10 2018 (r329191) @@ -280,8 +280,6 @@ __elfN(obj_loadimage)(struct preloaded_file *fp, elf_f switch (shdr[i].sh_type) { case SHT_REL: case SHT_RELA: - if ((shdr[shdr[i].sh_info].sh_flags & SHF_ALLOC) == 0) - break; lastaddr = roundup(lastaddr, shdr[i].sh_addralign); shdr[i].sh_addr = (Elf_Addr)lastaddr; lastaddr += shdr[i].sh_size; Modified: stable/11/sys/kern/link_elf_obj.c ============================================================================== --- stable/11/sys/kern/link_elf_obj.c Tue Feb 13 03:44:50 2018 (r329190) +++ stable/11/sys/kern/link_elf_obj.c Tue Feb 13 04:10:10 2018 (r329191) @@ -267,17 +267,9 @@ link_elf_link_preload(linker_class_t cls, const char * symstrindex = shdr[i].sh_link; break; case SHT_REL: - /* - * Ignore relocation tables for sections not - * loaded by the loader. - */ - if (shdr[shdr[i].sh_info].sh_addr == 0) - break; ef->nreltab++; break; case SHT_RELA: - if (shdr[shdr[i].sh_info].sh_addr == 0) - break; ef->nrelatab++; break; } @@ -399,16 +391,12 @@ link_elf_link_preload(linker_class_t cls, const char * pb++; break; case SHT_REL: - if (shdr[shdr[i].sh_info].sh_addr == 0) - break; ef->reltab[rl].rel = (Elf_Rel *)shdr[i].sh_addr; ef->reltab[rl].nrel = shdr[i].sh_size / sizeof(Elf_Rel); ef->reltab[rl].sec = shdr[i].sh_info; rl++; break; case SHT_RELA: - if (shdr[shdr[i].sh_info].sh_addr == 0) - break; ef->relatab[ra].rela = (Elf_Rela *)shdr[i].sh_addr; ef->relatab[ra].nrela = shdr[i].sh_size / sizeof(Elf_Rela); @@ -619,17 +607,9 @@ link_elf_load_file(linker_class_t cls, const char *fil symstrindex = shdr[i].sh_link; break; case SHT_REL: - /* - * Ignore relocation tables for unallocated - * sections. - */ - if ((shdr[shdr[i].sh_info].sh_flags & SHF_ALLOC) == 0) - break; ef->nreltab++; break; case SHT_RELA: - if ((shdr[shdr[i].sh_info].sh_flags & SHF_ALLOC) == 0) - break; ef->nrelatab++; break; case SHT_STRTAB: @@ -883,8 +863,6 @@ link_elf_load_file(linker_class_t cls, const char *fil pb++; break; case SHT_REL: - if ((shdr[shdr[i].sh_info].sh_flags & SHF_ALLOC) == 0) - break; ef->reltab[rl].rel = malloc(shdr[i].sh_size, M_LINKER, M_WAITOK); ef->reltab[rl].nrel = shdr[i].sh_size / sizeof(Elf_Rel); @@ -903,8 +881,6 @@ link_elf_load_file(linker_class_t cls, const char *fil rl++; break; case SHT_RELA: - if ((shdr[shdr[i].sh_info].sh_flags & SHF_ALLOC) == 0) - break; ef->relatab[ra].rela = malloc(shdr[i].sh_size, M_LINKER, M_WAITOK); ef->relatab[ra].nrela =