From patchwork Tue Aug 15 21:31:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 801784 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-83194-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="b9oroKWN"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xX5Nk0PtSz9sRg for ; Wed, 16 Aug 2017 07:35:01 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:mime-version :content-type; q=dns; s=default; b=Wp+WpW7Bd3SxeXNZBB+InhVMNeVmd kj27jL6QxpeqjA5U3TqI9mY3whSRsG+kEaGQRvNdOSkQoxtU+wDbSGCK3jwoqzJZ HuXc1996FRCFMba3sk9yWIVYyVRL7DmsNtD75SLywlqHbZt4H0UfGnWWx03erJVE b4aCpx5nbf4SMw= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:mime-version :content-type; s=default; bh=JtlyYz9iTuJ2M9dDHd18JsKBCHQ=; b=b9o roKWNag5FGuT2hbw/3UQgkhy52fatoFrBSfCMvr3KZNRj3ApMaIuzzRVQm/xmU9h B0t0BOwRo5QTQR3pe8KjtNAtlw1/ORKxm3iNosNyNuj6EWavJ3u2tckVbXahJnT3 5CAt9XEOlIv/iVI3wFgmdLQoys6UEDaYC2ahx3NM= Received: (qmail 26905 invoked by alias); 15 Aug 2017 21:34:20 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 100558 invoked by uid 89); 15 Aug 2017 21:32:56 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.4 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS, URIBL_RED autolearn=ham version=3.3.2 spammy= X-HELO: relay1.mentorg.com Date: Tue, 15 Aug 2017 21:31:54 +0000 From: Joseph Myers To: Subject: Allow abort PLT references in libc.so for SH Message-ID: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 X-ClientProxiedBy: svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) Given my patch for the ICEs building a glibc string function test for SH, the testsuite can build completely for SH with GCC 7 and mainline. However, there is a test failure that does not appear for GCC 6: check-localplt fails because of an abort PLT reference in libc.so. Given the lack of a trap insn pattern for SH, it seems unavoidable that the compiler might sometimes generate abort calls, and such abort calls (generated from __builtin_trap when there is no trap insn pattern) will be unaffected by the normal mapping to __GI_abort for calls within glibc. Thus, this patch allows (but does not require) an abort PLT reference in libc.so for SH. Tested for sh4-linux-gnu with build-many-glibcs.py (GCC 7, with my patch applied). 2017-08-15 Joseph Myers * sysdeps/unix/sysv/linux/sh/localplt.data: Allow abort in libc.so. diff --git a/sysdeps/unix/sysv/linux/sh/localplt.data b/sysdeps/unix/sysv/linux/sh/localplt.data index 2753547..babb19d 100644 --- a/sysdeps/unix/sysv/linux/sh/localplt.data +++ b/sysdeps/unix/sysv/linux/sh/localplt.data @@ -10,6 +10,8 @@ libc.so: _Unwind_Find_FDE libc.so: _exit libc.so: __errno_location libm.so: matherr +# Generated by the compiler because there is no trap insn pattern. +libc.so: abort ? # The main malloc is interposed into the dynamic linker, for # allocations after the initial link (when dlopen is used). ld.so: malloc