From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi1-x22f.google.com (mail-oi1-x22f.google.com [IPv6:2607:f8b0:4864:20::22f]) by sourceware.org (Postfix) with ESMTPS id 27EBB3856DC8 for ; Mon, 9 May 2022 11:33:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 27EBB3856DC8 Received: by mail-oi1-x22f.google.com with SMTP id j12so9858507oie.1 for ; Mon, 09 May 2022 04:33:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=bCC5iDK/oVJdHvn8mh0uoqZl+0zsNG50rInLCY9iimg=; b=6PpZrtnr150XFylVxu5KTZo/Ajj5sADKWxv24w5SQEa9hAXDkbYggDF7dnPWJpsm+U b1DOkHcMJ307wBKqRUm/AGY9cNLY01FqHLiItJDY5BezcBXcCHh3zJK8zuN9pjrv0O10 obLz2ZjgT2LSWfIZA5ie+4qba7iMdFBjThtI41WasCaTdlYOE8g1ce4q7YOoN30DFV9H GAW442G3EpYO85ecOMke6kmfkVp5Fxk0t4IxR7iqbayPAtugAQXRWtgLtY41I/Xi415u nYyskcJpbRlD2Iuuiu+6o03Y+H6DqpKeps++nTfwp3Lj6hmVTK4uoDPF54wEOINg7NSp mJfQ== X-Gm-Message-State: AOAM5338Zjr3uIqggg3nT4R92kmQxpMn1SpOy+pQmuBilOQatRONjiRr 8Inx2g5fmgFBjzgbhOEPaIj8SQNrea2ovA== X-Google-Smtp-Source: ABdhPJz/I7rKO89IqtQ5sYvH/x3CrM4mmtJqPcy3CZmUlT68rHFyA6me4R9gSASorTEKoZTaYadapA== X-Received: by 2002:aca:604:0:b0:325:220e:9081 with SMTP id 4-20020aca0604000000b00325220e9081mr10559437oig.65.1652095992835; Mon, 09 May 2022 04:33:12 -0700 (PDT) Received: from ?IPV6:2804:431:c7ca:5fbd:82eb:6a4d:6bc4:fb11? ([2804:431:c7ca:5fbd:82eb:6a4d:6bc4:fb11]) by smtp.gmail.com with ESMTPSA id k1-20020a9d7dc1000000b006060322126csm4484533otn.60.2022.05.09.04.33.11 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 09 May 2022 04:33:12 -0700 (PDT) Message-ID: <71082740-47dc-6684-2fe7-44e43c8e8e61@linaro.org> Date: Mon, 9 May 2022 08:33:10 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: Re: [PATCH v4 04/13] LoongArch: ABI Implementation Content-Language: en-US To: libc-alpha@sourceware.org References: <20220509023010.1250020-1-caiyinyu@loongson.cn> <20220509023010.1250020-5-caiyinyu@loongson.cn> <20220509082007.nvn37ol7k66l5htv@google.com> From: Adhemerval Zanella In-Reply-To: <20220509082007.nvn37ol7k66l5htv@google.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00, BODY_8BITS, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: Mon, 09 May 2022 11:33:18 -0000 On 09/05/2022 05:20, Fangrui Song via Libc-alpha wrote: > >> +/* Set up the loaded object described by L so its stub function >> +   will jump to the on-demand fixup code __dl_runtime_resolve.  */ >> + >> +static inline int __attribute__ ((always_inline)) >> +elf_machine_runtime_setup (struct link_map *l, struct r_scope_elem *scope[], >> +               int lazy, int profile) >> +{ >> +#ifndef RTLD_BOOTSTRAP >> +  /* If using PLTs, fill in the first two entries of .got.plt.  */ >> +  if (l->l_info[DT_JMPREL]) >> +    { >> +      extern void _dl_runtime_resolve (void) >> +    __attribute__ ((visibility ("hidden"))); >> +      ElfW (Addr) *gotplt = (ElfW (Addr) *) D_PTR (l, l_info[DT_PLTGOT]); >> +      /* If a library is prelinked but we have to relocate anyway, >> +     we have to be able to undo the prelinking of .got.plt. >> +     The prelinker saved the address of .plt for us here.  */ > > prelink has been deprecated and will be removed. You can drop complexity > here and avoid mentioning prelink. It was removed already.