From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 24E08382FE54 for ; Wed, 25 May 2022 18:21:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 24E08382FE54 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-262-sVT0gHm2OK2Vt4tsIQXAZw-1; Wed, 25 May 2022 14:21:34 -0400 X-MC-Unique: sVT0gHm2OK2Vt4tsIQXAZw-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 34402185A794; Wed, 25 May 2022 18:21:34 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.39.193.94]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 00EAB400F38; Wed, 25 May 2022 18:21:32 +0000 (UTC) From: Florian Weimer To: Wilco Dijkstra via Libc-alpha Cc: "H.J. Lu" , Wilco Dijkstra , Szabolcs Nagy Subject: Re: [PATCH 2/3] Revert "[AArch64][BZ #17711] Fix extern protected data handling" References: Date: Wed, 25 May 2022 20:21:31 +0200 In-Reply-To: (Wilco Dijkstra via Libc-alpha's message of "Wed, 25 May 2022 17:13:36 +0000") Message-ID: <87mtf5wk0k.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 May 2022 18:21:39 -0000 * Wilco Dijkstra via Libc-alpha: > Hi H.J., > >> All imported symbols can be marked with the default visibility and all >> exported symbols, in both executables and shared libraries, can be >> marked with the protected visibility.=C2=A0=C2=A0 These require code cha= nges. > > I meant doing this automatically using an option so most code requires no > source changes. If commonly used libraries mark their exported symbols, > most code (PIC, PIE and non-PIE) could be compiled using this option and > produce efficient code without copy relocations and only using GOT > indirections when needed (ie. accessing an exported symbol in another .so= ).=20 > It would also imply -fno-semantic-interposition for non-exported symbols. > Currently there is no way to achieve this using options (eg. -fvisibility= only > affects definitions), and LLVM and GCC disagree on many details. What about -flto (with a linker plugin)? Thanks, Florian