From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from hamster.birch.relay.mailchannels.net (hamster.birch.relay.mailchannels.net [23.83.209.80]) by sourceware.org (Postfix) with ESMTPS id 799FA3858D39 for ; Fri, 9 Jul 2021 07:02:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 799FA3858D39 X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 0DA0F1829F8; Fri, 9 Jul 2021 07:02:29 +0000 (UTC) Received: from pdx1-sub0-mail-a31.g.dreamhost.com (100-101-162-69.trex.outbound.svc.cluster.local [100.101.162.69]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id A89DA182A08; Fri, 9 Jul 2021 07:02:28 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from pdx1-sub0-mail-a31.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384) by 100.101.162.69 (trex/6.3.3); Fri, 09 Jul 2021 07:02:29 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|siddhesh@gotplt.org X-MailChannels-Auth-Id: dreamhost X-Share-Tangy: 28897d0359d1c2ae_1625814148907_450134274 X-MC-Loop-Signature: 1625814148907:2359776908 X-MC-Ingress-Time: 1625814148907 Received: from pdx1-sub0-mail-a31.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a31.g.dreamhost.com (Postfix) with ESMTP id 674DE852E0; Fri, 9 Jul 2021 00:02:28 -0700 (PDT) Received: from [192.168.1.137] (unknown [1.186.101.110]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: siddhesh@gotplt.org) by pdx1-sub0-mail-a31.g.dreamhost.com (Postfix) with ESMTPSA id BB5F38080F; Fri, 9 Jul 2021 00:02:21 -0700 (PDT) Subject: Re: [PATCH v7 2/8] Remove __morecore and __default_morecore To: Florian Weimer Cc: libc-alpha@sourceware.org References: <20210708174325.3243721-1-siddhesh@sourceware.org> <20210708174325.3243721-3-siddhesh@sourceware.org> <8735soknne.fsf@oldenburg.str.redhat.com> X-DH-BACKEND: pdx1-sub0-mail-a31 From: Siddhesh Poyarekar Message-ID: Date: Fri, 9 Jul 2021 12:32:14 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <8735soknne.fsf@oldenburg.str.redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3494.2 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_NONE, KAM_DMARC_STATUS, NICE_REPLY_A, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NEUTRAL, TXREP 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: Fri, 09 Jul 2021 07:02:32 -0000 On 7/9/21 11:57 AM, Florian Weimer via Libc-alpha wrote: > * Siddhesh Poyarekar: > >> diff --git a/malloc/hooks.c b/malloc/hooks.c >> index 45c91d6502..4aa6dadcff 100644 >> --- a/malloc/hooks.c >> +++ b/malloc/hooks.c >> @@ -20,6 +20,8 @@ >> #if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_34) >> void weak_variable (*__after_morecore_hook) (void) = NULL; >> compat_symbol (libc, __after_morecore_hook, __after_morecore_hook, GLIBC_2_0); >> +void *(*__morecore)(ptrdiff_t); >> +compat_symbol (libc, __morecore, __morecore, GLIBC_2_0); >> #endif > > This fails to assemble on ARC (and elsewhere with GCC 9 and earlier): > > /tmp/ccEXL6bz.s: Assembler messages: > /tmp/ccEXL6bz.s: Error: `__morecore@GLIBC_2.32' can't be versioned to common sym > bol '__morecore' > > You need to add __attribute__ ((morecore)). I could do this (I know you mean nocommon there)... > I posted a generic fix for this: > > Force building with -fno-common > > > But until then, every instance needs to be fixed manually. ... or I could review your generic fix instead. It seems like a much better cleanup than having to specify the attribute on everything that changes. What do you think? Siddhesh