From owner-svn-src-all@freebsd.org Tue Sep 25 19:29:36 2018 Return-Path: Delivered-To: svn-src-all@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 1B22510B924C; Tue, 25 Sep 2018 19:29:36 +0000 (UTC) (envelope-from andreast@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 C4A687DD79; Tue, 25 Sep 2018 19:29:35 +0000 (UTC) (envelope-from andreast@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 BFA754C43; Tue, 25 Sep 2018 19:29:35 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8PJTZ1U021332; Tue, 25 Sep 2018 19:29:35 GMT (envelope-from andreast@FreeBSD.org) Received: (from andreast@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8PJTZl9021331; Tue, 25 Sep 2018 19:29:35 GMT (envelope-from andreast@FreeBSD.org) Message-Id: <201809251929.w8PJTZl9021331@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andreast set sender to andreast@FreeBSD.org using -f From: Andreas Tobler Date: Tue, 25 Sep 2018 19:29:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338930 - head/libexec/rtld-elf/powerpc X-SVN-Group: head X-SVN-Commit-Author: andreast X-SVN-Commit-Paths: head/libexec/rtld-elf/powerpc X-SVN-Commit-Revision: 338930 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Sep 2018 19:29:36 -0000 Author: andreast Date: Tue Sep 25 19:29:35 2018 New Revision: 338930 URL: https://svnweb.freebsd.org/changeset/base/338930 Log: Bring the 32-bit powerpc (PowerMac) back to live. The commit 338486 reworked some TLS bits. This broke operation on the PowerMac. Namely one could not login. At login the screen/shell was giving back lots of backslashes and the login shell dumped core. The fix to this issue is to revert the powerpc commit from 338486 and to increase the TLS_TCB_SIZE to 16. Reverting only did not help, login was possible but userland applications aborted with strange messages. I tested this patch with world/kernel builds and with port upgrades. Additionally a full gcc8 bootstrap was successfully completed. Reviewed by: jhibbits@ Approved by: re (Glen) Modified: head/libexec/rtld-elf/powerpc/rtld_machdep.h Modified: head/libexec/rtld-elf/powerpc/rtld_machdep.h ============================================================================== --- head/libexec/rtld-elf/powerpc/rtld_machdep.h Tue Sep 25 18:54:18 2018 (r338929) +++ head/libexec/rtld-elf/powerpc/rtld_machdep.h Tue Sep 25 19:29:35 2018 (r338930) @@ -69,12 +69,12 @@ void _rtld_powerpc_pltcall(void); #define TLS_TP_OFFSET 0x7000 #define TLS_DTV_OFFSET 0x8000 -#define TLS_TCB_SIZE 8 +#define TLS_TCB_SIZE 16 #define round(size, align) \ (((size) + (align) - 1) & ~((align) - 1)) #define calculate_first_tls_offset(size, align) \ - TLS_TCB_SIZE + round(8, align) #define calculate_tls_offset(prev_offset, prev_size, size, align) \ round(prev_offset + prev_size, align) #define calculate_tls_end(off, size) ((off) + (size))