From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-il1-x143.google.com (mail-il1-x143.google.com [IPv6:2607:f8b0:4864:20::143]) by sourceware.org (Postfix) with ESMTPS id CBF4F388E81E for ; Mon, 29 Jun 2020 16:25:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org CBF4F388E81E Received: by mail-il1-x143.google.com with SMTP id t4so1821492iln.1 for ; Mon, 29 Jun 2020 09:25:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ib/f5iD+EDtrSHNSpCVAqjd/wM8b5Oeqwh/MvqtfaoE=; b=Nv2QSfkm3HQz9cXZeCPH++OALFhaWK0neUk/PVXY32TOhHVXG/ceZb1ZFbvtdVYqYb Z1o9BYS5kg6A/CrKLoOEJFYR7LEvUkho3eW9LTOJzHQj71Kf0EAhbjaZFKwfybm2jU50 dtUTNqy0ThFDoatimR6NI2WEUY0mX4/xUsEoIL3NY8cz9VepYjOE2/fU0QypxaVheQHM nj1Wq/vkpko2MP24J2OIwlO2YaG9wG9dPxIvIqrQcnMYoKJ4NfCYkgjbdrlW+UGf5kLd axZ2GGJm7lZK0Ct4YdltwgVH1eLvAcrgoqSDoOwB+HSor5Mkb8Usag/tGraKQEJaj426 po4A== X-Gm-Message-State: AOAM533nnltAeXzZFgfbY2B/lH1R9W2xrni6Zaesg68ovKYyOdBNZFMj djEZriN270DuCVINYqKL40leTKv+xrz+4nCvkaxMtMT6ukQ= X-Google-Smtp-Source: ABdhPJyLF4l25BeUZi67+bWdlzFMHUiXdp9Y2OdPRR5npi/1/EaTh4i+SixQT7kTKbE09v/IKBEUjI2biPsTR8gJWEY= X-Received: by 2002:a92:d186:: with SMTP id z6mr17672639ilz.227.1593447930325; Mon, 29 Jun 2020 09:25:30 -0700 (PDT) MIME-Version: 1.0 References: <20200622211034.659739-1-alistair.francis@wdc.com> <87zh8u8d17.fsf@igel.home> <87o8p21bjh.fsf@oldenburg2.str.redhat.com> <87366dx35x.fsf@oldenburg2.str.redhat.com> In-Reply-To: <87366dx35x.fsf@oldenburg2.str.redhat.com> From: Alistair Francis Date: Mon, 29 Jun 2020 09:15:48 -0700 Message-ID: Subject: Re: [PATCH] Allow memset local PLT reference for RISC-V. To: Florian Weimer Cc: Alistair Francis via Libc-alpha , Andreas Schwab , Alistair Francis Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-6.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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, 29 Jun 2020 16:25:32 -0000 On Mon, Jun 29, 2020 at 9:12 AM Florian Weimer wrote: > > * Alistair Francis: > > > On Mon, Jun 29, 2020 at 2:11 AM Florian Weimer wrote: > >> > >> * Alistair Francis via Libc-alpha: > >> > >> > On Tue, Jun 23, 2020 at 12:19 AM Andreas Schwab wrote: > >> >> > >> >> On Jun 22 2020, Alistair Francis via Libc-alpha wrote: > >> >> > >> >> > This is similar to commit a26e2e9feab87d4f745c31411458b048742ac733 > >> >> > "Allow memset local PLT reference for powerpc soft-float.". > >> >> > > >> >> > GCC 10.1 results in the localplt test failing for RISC-V. > >> >> > >> >> Why doesn't the redirect in sysdeps/generic/symbol-hacks.h work? > >> > > >> > I'm not sure. > >> > > >> > I suspect it's the same reason it didn't work in the commit this is > >> > based off: a26e2e9feab87d4f745c31411458b048742ac733 > >> > "Allow memset local PLT reference for powerpc soft-float.". > >> > > >> > The error is part of glibc's check scripts. I'm assuming memset is in > >> > the binary which produces a check failure as we don't expect it to be. > >> > I'm not sure where sysdeps/generic/symbol-hacks.h is involved in this > >> > process though. > >> > >> Please post disassembly showing the location of the PLT calls. Which > >> functions have them? > > > > Sorry, I was waiting on my build to finish (I forgot to keep the > > artifacts the first time). > > > > I'm assuming you wanted the objdump of libc.a? > > libc_pic.a. libc.a is built for static linking and does not use the > symbol hacks. > > If the PLT reference comes from libgcc.a, it won't show up in > libc_pic.a, though. It will only be present in libc.so. Ah ok. There is also a PLT memset in libc_pic.a 1bc: 009aa023 sw s1,0(s5) memset (result->__data, '\0', 1c0: 865e mv a2,s7 1c2: 4581 li a1,0 1c4: 008a8513 addi a0,s5,8 1c8: 00000097 auipc ra,0x0 1c8: R_RISCV_CALL_PLT __GI_memset 1c8: R_RISCV_RELAX *ABS* 1cc: 000080e7 jalr ra # 1c8 <.LVL39+0x14> Alistair > > Thanks, > Florian >