From patchwork Sun Nov 10 21:53:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iain Sandoe X-Patchwork-Id: 1192674 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-512907-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=sandoe.co.uk Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="jL9LCTSx"; 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 47B76z50MZz9sP3 for ; Mon, 11 Nov 2019 08:53:29 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :content-type:content-transfer-encoding:mime-version:subject :message-id:date:to; q=dns; s=default; b=d4xih6f0W6IAag92o93CzbJ 2/r8dGGgSQJrUcm09b9d+L9/654358h5ynDdAWFAS9ER1r0lLiQptrUcyo4P0VSV RmEDnorO4DaNjrj3uE3SE3JcZnUKW7CyW1HQ/Wl0MsZqkjIiTo4lGp3ToiONZdfb LsSV0qnXUHqU1l3O2QDo= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :content-type:content-transfer-encoding:mime-version:subject :message-id:date:to; s=default; bh=8HMsfdwhGVI59jgNN59Mc8VWfzo=; b= jL9LCTSx1WIgleU5eri/5p4e3wQfbXxkTzHlzUV9DSzUs92j9dDnvjztAKrSV8KJ WuR8y2Z7nmMdH2B3nDHzUf7GmneiuaqmqCNqpEtufwBTOWlPz8MftwlD7Z4IfYV4 lzWprshZtVozx+SKM4PYSwm5vRWI8WLs3uO2VuRY+rI= Received: (qmail 129187 invoked by alias); 10 Nov 2019 21:53:21 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 129178 invoked by uid 89); 10 Nov 2019 21:53:21 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-21.1 required=5.0 tests=AWL, BAYES_05, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_COUK, KAM_STOCKGEN, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=H*c:yes, H*c:delsp, pic, H*F:D*co.uk X-HELO: smtp2.wavenetuk.net Received: from smtp.wavenetuk.net (HELO smtp2.wavenetuk.net) (195.26.37.10) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 10 Nov 2019 21:53:19 +0000 Received: from [192.168.1.212] (host81-138-1-83.in-addr.btopenworld.com [81.138.1.83]) by smtp2.wavenetuk.net (Postfix) with ESMTPA id 72E176000FF for ; Sun, 10 Nov 2019 21:53:16 +0000 (GMT) From: Iain Sandoe Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: [Darwin, machopic 11/n, committed] A flag to indicate synbols should be linker-visible. Message-Id: Date: Sun, 10 Nov 2019 21:53:08 +0000 To: GCC Patches Some of the solution to PR71767 is incomplete, and we need finer-grained control over whether symbols need to be made linker-visible. This is a preparation patch, providing the flag. tested on x86_64-darwin16, applied to mainline. thanks gcc/ChangeLog: 2019-11-10 Iain Sandoe * config/darwin.h (MACHO_SYMBOL_FLAG_LINKER_VIS): New. (MACHO_SYMBOL_LINKER_VIS_P): New. diff --git a/gcc/config/darwin.h b/gcc/config/darwin.h index f331fa1..8eb8edf 100644 --- a/gcc/config/darwin.h +++ b/gcc/config/darwin.h @@ -843,6 +843,13 @@ extern GTY(()) section * darwin_sections[NUM_DARWIN_SECTIONS]; #define MACHO_SYMBOL_HIDDEN_VIS_P(RTX) \ ((SYMBOL_REF_FLAGS (RTX) & MACHO_SYMBOL_FLAG_HIDDEN_VIS) != 0) +/* Set on a symbol that should be made visible to the linker (overriding + 'L' symbol prefixes). */ + +#define MACHO_SYMBOL_FLAG_LINKER_VIS ((SYMBOL_FLAG_SUBT_DEP) << 4) +#define MACHO_SYMBOL_LINKER_VIS_P(RTX) \ + ((SYMBOL_REF_FLAGS (RTX) & MACHO_SYMBOL_FLAG_LINKER_VIS) != 0) + /* Set on a symbol that is a pic stub or symbol indirection (i.e. the L_xxxxx${stub,non_lazy_ptr,lazy_ptr}. */