From nobody Tue Oct 25 16:00:53 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Mxc9f0L6bz4gBr4; Tue, 25 Oct 2022 16:00:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Mxc9d6vbvz4734; Tue, 25 Oct 2022 16:00:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1666713654; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EF/efp/O+Lk/B1zFN9++2VXvPt+2dA4WyLWWqtn+Z08=; b=Yk4DyTDPci9B/7sc1KquKWn0n2FxNJ+r1kv+1unpgdY4wagD+gWMOkFesvgd7GnXghKr+p yRAAoeMAjwD/vyItQ4EAZGViEHfPM5Mthk5BMMbvPHcOiT/zAqgWYBbDqLjbPhqiDIQ/XY Ghlr477lkxX/Y8ba6Cv9f3dExdKbX4WLkLcM/P2stoENYpsfMph9+HJ1QA+YYGGWQdDmvM IQgeJIk2ALP+taEV2h2ioFiJzZT6mSQ5BZgBvcWnTLP4WY1USl0Oqj3jrYduV1waVUYGuv Yl20EEsosfDHm9Bs4Mq9U94JKPmZ4ZLCVtw7iNr9fg/KI8tqyoCjzGWoBkNUKg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Mxc9d61W5zk9T; Tue, 25 Oct 2022 16:00:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 29PG0rjB090525; Tue, 25 Oct 2022 16:00:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 29PG0rAN090524; Tue, 25 Oct 2022 16:00:53 GMT (envelope-from git) Date: Tue, 25 Oct 2022 16:00:53 GMT Message-Id: <202210251600.29PG0rAN090524@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 5f00525dfca4 - main - i386: move hard-coded load address for PIE below default linker base List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5f00525dfca4b1fbb0f8296a411bf57c23bce694 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1666713654; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EF/efp/O+Lk/B1zFN9++2VXvPt+2dA4WyLWWqtn+Z08=; b=xC3CTgE3PFylQW6QIFpCcdINNe9I9rj0qU5K88bLCA2pma6KI3K8tb7DJWMpxgQItCHi3i Njyh0Q57kx5hJDYBuHDH3YMQahzYLz3sQO0PKN8RyG3m/XF5o5gGYMq0/PmdMvSKBoeLtD G8x2/5oB2HSfH52Ivkk8Soxw7fKK0uWqKABdxgEj1tO/BVwLqyzglvGAsCkxk5js+FPB3H PEllccoqjJB0abHAHzNJ5HxEjySbyyuZoGJz/NMcO4Nx2CfyRJhEfNc5+1icSAYXfnDRxE epU/QkXQV3nqMdrtrewi4J/DJjbyCw4G/C0sLe5RNdcPSVHzwXz9v4+r20GXTg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1666713654; a=rsa-sha256; cv=none; b=GsoCh3t5ELSGcdGvaVCtOuGcKpYFkMlNMtRuBFe8EPovjeFemilTvlRPdxIDKoUDx/gzmQ t8yyi3okffZPar56UCzSn4gE1iffzzARezGQWpjQfSg4iQovS0agtjwsrx5E67uRwhJD7R tguRhcJNK2ZKHi6kOPPEwdLrybJBNdgUAI2oE8vwLD8ZAhkffIyqhby5o9OCYIfDWAJgtc 15y07+mxj+LhJznbWcfflqei4q/lDcL8n7OEv2BQwuJ5zzA0/0PMb+y1pzAmSmEIIpyPPC jFGKGCgkli8IP3RTvfl42EkcLDFV5vwgZvuKWXaXq2kBOqW53nP4NGHSwEcjnQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=5f00525dfca4b1fbb0f8296a411bf57c23bce694 commit 5f00525dfca4b1fbb0f8296a411bf57c23bce694 Author: Konstantin Belousov AuthorDate: 2022-10-22 20:03:17 +0000 Commit: Konstantin Belousov CommitDate: 2022-10-25 16:00:44 +0000 i386: move hard-coded load address for PIE below default linker base both for i386 native and compat32 amd64. We know the ld-elf.so.1 size in advance, it fits there. Trying to push it up after the end of a binary cannot work reliably and eventually fail for large binaries. Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D37085 --- sys/x86/include/elf.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/x86/include/elf.h b/sys/x86/include/elf.h index e587b52202e8..e8744858e4b7 100644 --- a/sys/x86/include/elf.h +++ b/sys/x86/include/elf.h @@ -89,7 +89,7 @@ __ElfType(Auxinfo); #define ELF_TARG_MACH EM_386 #define ELF_TARG_VER 1 -#define ET_DYN_LOAD_ADDR 0x01001000 +#define ET_DYN_LOAD_ADDR 0x00002000 #elif defined(__amd64__) @@ -150,7 +150,7 @@ __ElfType(Auxinfo); #define ELF_TARG_VER 1 #if __ELF_WORD_SIZE == 32 -#define ET_DYN_LOAD_ADDR 0x01001000 +#define ET_DYN_LOAD_ADDR 0x00002000 #else #define ET_DYN_LOAD_ADDR 0x01021000 #endif