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 05674383820A for ; Thu, 26 May 2022 19:25:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 05674383820A Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-464-W3r0V3RKOlahwajwSWQ3_w-1; Thu, 26 May 2022 15:25:48 -0400 X-MC-Unique: W3r0V3RKOlahwajwSWQ3_w-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 329053C1902A; Thu, 26 May 2022 19:25:48 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.39.192.71]) by smtp.corp.redhat.com (Postfix) with ESMTPS id F2120492C3B; Thu, 26 May 2022 19:25:46 +0000 (UTC) From: Florian Weimer To: Wilco Dijkstra Cc: "H.J. Lu" , Wilco Dijkstra via Libc-alpha , Szabolcs Nagy Subject: Re: [PATCH 2/3] Revert "[AArch64][BZ #17711] Fix extern protected data handling" References: <87mtf5wk0k.fsf@oldenburg.str.redhat.com> Date: Thu, 26 May 2022 21:25:45 +0200 In-Reply-To: (Wilco Dijkstra's message of "Thu, 26 May 2022 19:17:49 +0000") Message-ID: <8735gwhz9i.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.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-5.4 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: Thu, 26 May 2022 19:25:53 -0000 * Wilco Dijkstra: > Hi, > >>> What about -flto (with a linker plugin)? >> >> >> LTO certainly works. An undefined symbol will be imported from a shared >> library. > > LTO allows you to determine which symbols are imported indeed, so the > compiler can use a GOT indirection without requiring explicit import > annotations. > > However LTO does not solve all the code quality issues of FPIC - there > is still no inlining, internal calls indirect via the PLT and > non-static globals use a GOT indirection. Could you share a small example that exhibits these shortcomings? Thanks, Florian