From owner-freebsd-toolchain@freebsd.org Sat Oct 7 10:03:10 2017 Return-Path: Delivered-To: freebsd-toolchain@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 39BA2E345C0 for ; Sat, 7 Oct 2017 10:03:10 +0000 (UTC) (envelope-from rdivacky@vlakno.cz) Received: from vlakno.cz (mail.vlakno.cz [91.217.96.224]) by mx1.freebsd.org (Postfix) with ESMTP id D89E171AA1 for ; Sat, 7 Oct 2017 10:03:09 +0000 (UTC) (envelope-from rdivacky@vlakno.cz) Received: by vlakno.cz (Postfix, from userid 1002) id 35074DF7DAB; Sat, 7 Oct 2017 12:00:24 +0200 (CEST) Date: Sat, 7 Oct 2017 12:00:24 +0200 From: Roman Divacky To: freebsd-toolchain@freebsd.org Subject: Exceptions Handling on PPC64 with clang - gnu ld bug identified Message-ID: <20171007100024.GA82791@vlakno.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.9.1 (2017-09-22) X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Oct 2017 10:03:10 -0000 Hi, In a followup to https://lists.freebsd.org/pipermail/freebsd-toolchain/2017-May/002961.html I attempted to fix gnu ld in base to fix the wrongly set bit. The following patch http://www.vlakno.cz/~rdivacky/ppc64.exceptions.fix.patch switches a few computations to happen in 64bits instead of 32bit and fixes the wrong personality/LDSA info in binaries. As a result clang compiled/assembled c++ binaries with EH start to work for me. Can someone verify this works for everyone? I can see the same cast in upstream binutils but in a couple more places, so this is probably not the final answer but is good enough for me. Thanks, Roman