From nobody Wed Jul 19 18:53:58 2023 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 4R5lN65SFlz4nRH2; Wed, 19 Jul 2023 18:53:58 +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 4R5lN64sJFz3qZD; Wed, 19 Jul 2023 18:53:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1689792838; 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=Vo+68o4ae1OMN8arfg5JHB36jy3Jb+xa6AVl9hf+sH8=; b=t9GqfmOrEtxq1prkKSmejAkoKkcUyvLdfVqovWR3dPBLp8vbbdDkBU+p1yQgBEXb3YQSU7 wT18XjperzaIBC0832lJ9L+cfb8gykx8IuTdwVH4d9iW+nABVutcx0DY7tOyonqYbi/TqO 5O6szaPGQbL1Xo8nQ80FVFeKc8Mrx5HrPSvpqIhI1KQA9khUZJxMFLMxij5PdTAlFG0RgE mjF6ZawnCCDvzIAMiNH9KtIGCTCURySZyyb1PNNCY375OLBhW6DrqtWbmsF/5GzSSca6xj 2P6FjFZbEeDP0rkJvJ4+KoRmevGeydJt5DIh7ZvKCMsqFjjnS7WJcOwJBK7akg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1689792838; 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=Vo+68o4ae1OMN8arfg5JHB36jy3Jb+xa6AVl9hf+sH8=; b=oDxppGX8NubZF5XjWgQzZHcUF52CXeOkemAwS1I1dfaM3c4TtsYGDSKPeZ+eqsoaY1hu9d FtbWlFuyOdudYVbbp9NfrKUfdonDOouLL8Sw3IaAn+SGm+5P/x2378MAr2LO+Hz7wgi33l zU62lQy70X09nStLv2NPXnFoy7SUcv3hhfRLIrrTLF6ve69fxhbYaZPfifXgu/2pyVwDj1 IUBkUl+DtOzN/Y7RiB9C++YmGLXfpzs5Lb7vtKqoehNvYyfSoNjJhA9EtpUHHe9ikkJv4s +vTyvEom1xMXktsXAcqBL5ldrhGD2aZjGM+YyMN3PSUNlUU0gVgZBPSlD3fAJQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1689792838; a=rsa-sha256; cv=none; b=mov87pNKtx0IugvR9IahywWN92h7l70vBztVk9wpGgxTjdq9s02rFasAV1LbOfefmRo3Wy RAG2aFUotdBX9dwZ8colrNUIJOyTbLBAe06m7bCukg7LD++tL6z+A/GuRGtX2HU7WWuUPs PQKvzX4uPNAMkDwa7bEjIpZbSUANDNK3/tYF2QETkVaFSLDII179y7AHlIiq+vxQZhN1Ll RsLpHn6G6FAc3zhSv5Dpt/4HtdA9GnC5EL/TkIf7aeiVdgw7zJKXtdVhc5QXt0yjqfhtNZ rr6TxcBiNLgQYck6E7Y9Zg+fyPxD8S+tLOhtjhOrlnWRudYpAqVzgn8bAnF65Q== 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 4R5lN63vklz10Dt; Wed, 19 Jul 2023 18:53:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 36JIrwuR065409; Wed, 19 Jul 2023 18:53:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 36JIrwV0065408; Wed, 19 Jul 2023 18:53:58 GMT (envelope-from git) Date: Wed, 19 Jul 2023 18:53:58 GMT Message-Id: <202307191853.36JIrwV0065408@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: e5c4737955d5 - main - amd64 crt1: Explicitly use a PLT entry for main in the PIC case. 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e5c4737955d54d868e73a22beae7e8bb15703779 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=e5c4737955d54d868e73a22beae7e8bb15703779 commit e5c4737955d54d868e73a22beae7e8bb15703779 Author: John Baldwin AuthorDate: 2023-07-19 18:53:33 +0000 Commit: John Baldwin CommitDate: 2023-07-19 18:53:33 +0000 amd64 crt1: Explicitly use a PLT entry for main in the PIC case. This ensures GNU as generates a R_X86_64_PLT32 relocation instead of R_X86_64_32. Reviewed by: kib Fixes: c969310c992a csu: Implement _start using as to satisfy unwinders on x86_64 Differential Revision: https://reviews.freebsd.org/D41101 --- lib/csu/amd64/crt1_s.S | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/csu/amd64/crt1_s.S b/lib/csu/amd64/crt1_s.S index 0c1c3b960bda..f7ea076d94f1 100644 --- a/lib/csu/amd64/crt1_s.S +++ b/lib/csu/amd64/crt1_s.S @@ -60,10 +60,11 @@ _start: addq %rax, %rdx /* env += argc */ #ifdef PIC /* - * XXX. %rip relative addressing does not intended to use in the - * large memory model due to offset from %rip is limited to 32 bits. + * XXX. %rip relative addressing is not intended for use in the + * large memory model due to the offset from %rip being limited + * to 32 bits. */ - leaq main(%rip), %r8 + leaq main@plt(%rip), %r8 #else movabsq $main, %r8 #endif