From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.10]) by sourceware.org (Postfix) with ESMTPS id 050DA3861962 for ; Thu, 9 Jul 2020 08:42:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 050DA3861962 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=linux-m68k.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=whitebox@nefkom.net Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4B2V7169vbz1rvxy; Thu, 9 Jul 2020 10:42:53 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4B2V715Y1Kz1qr51; Thu, 9 Jul 2020 10:42:53 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id jMjILAmmDvNT; Thu, 9 Jul 2020 10:42:52 +0200 (CEST) X-Auth-Info: RMhO7ITQeEy+IWpu9uXDbts7z1XSjXmaeOtqAj+995lBM+B2C69l2JgxCQ/mxM7d Received: from igel.home (ppp-46-244-184-194.dynamic.mnet-online.de [46.244.184.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Thu, 9 Jul 2020 10:42:52 +0200 (CEST) Received: by igel.home (Postfix, from userid 1000) id 557F72C0B9F; Thu, 9 Jul 2020 10:42:52 +0200 (CEST) From: Andreas Schwab To: Vincent Chen Cc: libc-alpha@sourceware.org, palmer@dabbelt.com, darius@bluespec.com, dj@redhat.com Subject: Re: [RFC PATCH] riscv: Add support for STT_GNU_IFUNC symbols References: <1594283178-9047-1-git-send-email-vincent.chen@sifive.com> X-Yow: I'd like MY data-base JULIENNED and stir-fried! Date: Thu, 09 Jul 2020 10:42:52 +0200 In-Reply-To: <1594283178-9047-1-git-send-email-vincent.chen@sifive.com> (Vincent Chen's message of "Thu, 9 Jul 2020 16:26:18 +0800") Message-ID: <87lfjtt6yb.fsf@igel.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-9.5 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, 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: Thu, 09 Jul 2020 08:42:57 -0000 On Jul 09 2020, Vincent Chen wrote: > diff --git a/sysdeps/riscv/dl-irel.h b/sysdeps/riscv/dl-irel.h > new file mode 100644 > index 0000000..9dd8de9 > --- /dev/null > +++ b/sysdeps/riscv/dl-irel.h > @@ -0,0 +1,53 @@ > +/* Machine-dependent ELF indirect relocation inline functions. > + RISC-V version. > + Copyright (C) 2012-2020 Free Software Foundation, Inc. I think that should list only 2020 as copyright year. > diff --git a/sysdeps/riscv/dl-machine.h b/sysdeps/riscv/dl-machine.h > index 03db94a..728e6d3 100644 > --- a/sysdeps/riscv/dl-machine.h > +++ b/sysdeps/riscv/dl-machine.h > @@ -248,7 +256,12 @@ elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc, > break; > } > #endif > - > + case R_RISCV_IRELATIVE: > + value = map->l_addr + reloc->r_addend; > + if (__glibc_likely (!skip_ifunc)) > + value = elf_ifunc_invoke (value); > + *addr_field = value; > + break; > case R_RISCV_JUMP_SLOT: > case __WORDSIZE == 64 ? R_RISCV_64 : R_RISCV_32: > *addr_field = value; Please keep the empty line between each case bock. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different."