From owner-svn-src-head@freebsd.org Mon May 20 20:48:05 2019 Return-Path: Delivered-To: svn-src-head@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 BB3E6159218D; Mon, 20 May 2019 20:48:05 +0000 (UTC) (envelope-from emaste@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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5DA3691CDA; Mon, 20 May 2019 20:48:05 +0000 (UTC) (envelope-from emaste@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 32DAA238A3; Mon, 20 May 2019 20:48:05 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4KKm4Ad061772; Mon, 20 May 2019 20:48:04 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4KKm41C061771; Mon, 20 May 2019 20:48:04 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201905202048.x4KKm41C061771@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 20 May 2019 20:48:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348008 - head/lib/csu/mips X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/lib/csu/mips X-SVN-Commit-Revision: 348008 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5DA3691CDA X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.983,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 May 2019 20:48:06 -0000 Author: emaste Date: Mon May 20 20:48:04 2019 New Revision: 348008 URL: https://svnweb.freebsd.org/changeset/base/348008 Log: mips: remove 16-byte alignment from .init and .fini epilogues The .init and .fini epilogues from crtn should be placed immediately after any instructions in .init and .fini sections from the linked objects. Using 16-byte alignment for the epilogues on MIPS was a bug, but it did not cause any issue with GNU ld as GNU ld (2.17.50) fills the padding with NOPs. Current versions of LLD fill any padding between different object files with trap instructions. Inserting trap padding prior to the .init/.fini epilogue is undesriable as the resulting binary will crash at runtime. The .init and .fini sections in object files linked between crti and crtn must already be a multiple of the instruction size and so no alignment directive is required in crtn. Indeed, other architectures (except sparc64) do not specify alignment in their crtn implementations. Reported by: arichardson Reviewed by: andrew Event: Waterloo Hackathon 2019 Differential Revision: https://reviews.freebsd.org/D18291 Modified: head/lib/csu/mips/crtn.S Modified: head/lib/csu/mips/crtn.S ============================================================================== --- head/lib/csu/mips/crtn.S Mon May 20 19:36:36 2019 (r348007) +++ head/lib/csu/mips/crtn.S Mon May 20 20:48:04 2019 (r348008) @@ -5,7 +5,6 @@ __FBSDID("$FreeBSD$"); .gnu_attribute 4, 0 #endif .section .init,"ax",%progbits - .align 4 .set noreorder #if defined(__ABICALLS__) && (defined(__mips_n32) || defined(__mips_n64)) REG_L gp, CALLFRAME_GP(sp) @@ -16,7 +15,6 @@ __FBSDID("$FreeBSD$"); .set reorder .section .fini,"ax",%progbits - .align 4 .set noreorder #if defined(__ABICALLS__) && (defined(__mips_n32) || defined(__mips_n64)) REG_L gp, CALLFRAME_GP(sp)