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 07449386CE61 for ; Tue, 14 Jun 2022 05:07:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 07449386CE61 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-642-W-YKyU21M2aaq2pZtX5Zcg-1; Tue, 14 Jun 2022 01:07:51 -0400 X-MC-Unique: W-YKyU21M2aaq2pZtX5Zcg-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E225D3C021A2; Tue, 14 Jun 2022 05:07:50 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.39.192.48]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B045D40CF8E5; Tue, 14 Jun 2022 05:07:49 +0000 (UTC) From: Florian Weimer To: Fangrui Song via Libc-alpha Cc: Szabolcs Nagy , Fangrui Song , Marcus Shawcroft Subject: Re: [PATCH] aarch64: Handle fewer relocations for RTLD_BOOTSTRAP References: <20220606043709.3065173-1-maskray@google.com> <20220611023235.mbjv4fh7rqr4abr4@google.com> <20220614000247.t7hwpggyvgunfuxj@google.com> Date: Tue, 14 Jun 2022 07:07:47 +0200 In-Reply-To: <20220614000247.t7hwpggyvgunfuxj@google.com> (Fangrui Song via Libc-alpha's message of "Mon, 13 Jun 2022 17:02:47 -0700") Message-ID: <87r13rhly4.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.84 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-5.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: Tue, 14 Jun 2022 05:07:56 -0000 * Fangrui Song via Libc-alpha: > On 2022-06-13, Szabolcs Nagy wrote: >>The 06/10/2022 19:32, Fangrui Song wrote: >>> On 2022-06-05, Fangrui Song wrote: >>> > The RTLD_BOOTSTRAP branch is used to relocate ld.so itself. It only >>> > needs to handle RELATIVE, GLOB_DAT, and JUMP_SLOT. >> >>the motivation is not clear to me. >> >>is there an issue with other relocations or is this just a cleanup patch? > > It is a cleanup: remove dead code paths. I think it could be paired (later) with a test that checks that ld.so uses just the relocation types implemented for self-relocation. I do not think it's possible in general to use the same code for self-relocation and subsequent library loading, especially on HIDDEN_VAR_NEEDS_DYNAMIC_RELOC architectures (I like the new name, by the way). Thanks, Florian