From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) by sourceware.org (Postfix) with ESMTPS id A100F3857C5A for ; Thu, 10 Dec 2020 02:08:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org A100F3857C5A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=sifive.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=jimw@sifive.com Received: by mail-ej1-x62d.google.com with SMTP id x16so5096124ejj.7 for ; Wed, 09 Dec 2020 18:08:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=WqURXMC/kUGHluBogmZn5Vx/FcUx4b+1ZrQi1Ar6Mfo=; b=LnttvSSqDusQOc+AlTGGmqwE3jcbJMbuBKkONC2DvPErFr/q2zcXs2wmOi0RuksHn0 eKUuqSGtf81I+p1UEbEYVVWs9Bsuj0AiuIATKNOVt+YP70cqP8C/qY38K9t9s4pFGuyt 173v84l05rpYv4MG52JjTixbNPoMnAWKx9OirnLEr13w56tz6aixeCbA+hERqhDdC/8D GDICkF1ryGY5ftzXfp9BDzKO3t88t4sHmUwcv/LMNNLvlm+3V8K6kT1wNuTqmaOhhLDn 5LBs+U5GPQUX+ylSSCxj4RrIK2Ghv98ucJsGzKr8oVZCxKQ0QmY9+avKcoi17an3IPSK ZDWg== 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=WqURXMC/kUGHluBogmZn5Vx/FcUx4b+1ZrQi1Ar6Mfo=; b=ppUFQnzp1JfQQKadggMf2chPnhn4e6yexQGgR53pXPrusjO+cBymMeRDfOW8JpJWLf +ejVG04FXIMQW9I95eRWrnuw7xMgHlRJ7ldh6oLgIEPL/hUxK5HnQnVN+BdrcxJWG/UN PKzlJgxrIU8SbpJSg2Ob4nNIZCaEsqtkP8sj2P8ticM5gxVAlRewty+lu6PbUXAh7tyT /XAKsY+zYt/TuneDuA3biqHt21Xb3rl0NcLESOYNJLq+sx3z7dKaq87piATzAYRqyryZ 3qFztnhw2qFqIq+aK5M82Fb0eczQogCq+Dp7yz3vAzumifGtB0tr8oluNz6DSJ6aZ12L kGpA== X-Gm-Message-State: AOAM532l7WxVjLP+9t+fs9DR6X4S0Wsn3Ex2DHX7HCGs3vFnSizDZfim iAFSdkVa1LG9lEmSoeamNE2IQjuGXo7YtnBwD3Xrzg== X-Google-Smtp-Source: ABdhPJzBWA4HEIs07ZxFjNiWOf4qbznbldnrZhOQ11iSjsDD8EMvYfwpRbsvl+DyfM8iJvJAj/gl7ljNnaXUgbxPpcs= X-Received: by 2002:a17:906:ae4e:: with SMTP id lf14mr4619223ejb.310.1607566128559; Wed, 09 Dec 2020 18:08:48 -0800 (PST) MIME-Version: 1.0 References: <20201208125128.775313-1-hjl.tools@gmail.com> In-Reply-To: <20201208125128.775313-1-hjl.tools@gmail.com> From: Jim Wilson Date: Wed, 9 Dec 2020 18:08:37 -0800 Message-ID: Subject: Re: V3 [PATCH 0/2] Switch to a new section if the SECTION_RETAIN bit doesn't match To: "H.J. Lu" Cc: GCC Patches X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, HTML_MESSAGE, 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 Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Dec 2020 02:08:51 -0000 On Tue, Dec 8, 2020 at 4:51 AM H.J. Lu via Gcc-patches < gcc-patches@gcc.gnu.org> wrote: > When SECTION_RETAIN is used, definitions marked with used attribute and > unmarked definitions are placed in a section with the same name. Instead > of issue an error: > Have you tested glibc builds with this patch? I noticed yesterday that your earlier patch had broken glibc builds, and was about to raise a bug report for that. I'm seeing In file included from : gconv_db.c: In function 'free_mem': gconv_db.c:831:18: error: 'free_mem' causes a section type conflict with 'free_derivation' 831 | libc_freeres_fn (free_mem) | ^~~~~~~~ ./../include/libc-symbols.h:316:15: note: in definition of macro 'libc_freeres_fn' 316 | static void name (void) | ^~~~ gconv_db.c:174:1: note: 'free_derivation' was declared here 174 | free_derivation (void *p) | ^~~~~~~~~~~~~~~ This is because free_derivation and free_mem are in the same section, but free_mem has attribute used and free_derivation does not. This patch is changing the error to a warning, which I think solves the problem unless --enable-werror is used, which is probably good enough. We could maybe decide that what glibc is doing is wrong and fix glibc to use different section names or mark both functions as attribute used. Jim