From patchwork Wed Oct 12 16:04:55 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 16434 Received: (qmail 23571 invoked by alias); 12 Oct 2016 16:05:12 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 23088 invoked by uid 89); 12 Oct 2016 16:05:12 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM, SPF_PASS autolearn=no version=3.3.2 spammy=15, 6 X-HELO: mail-vk0-f53.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=ashdYydTemclNdh4lsEK2x1dLiwHlJcvawG54w1rid0=; b=E2uiaAki3ij2E/l6vVCoA/mvWbq6HE+hncCPROcFA/THwewlhpXoe8eYrpBraLN7u2 L96vGJiGHhdUivJaawl+1fJjP00tYgnAapiUErvH7qpJnZ+5jzgZ64r0DykMH/yeZGVr eWPEJwqkX8YK5uiZs50PzIkKSUb3N94Ba1yqAjkCTZE2gW7mytNHBUK57o4z9Namecyz +i6tcRKfD9pLfPY/zzwrL1GFFJeS/xp1VDP7vJkP1QjzgTcOqovOOWSozqHLBwVlxO6j vOJZrKxqr4jWyK09ZvqOBY27FIZQhMKaVKf3NaHa7z4gWN3tF7aL0jOUnMvDgdmQhXmD 3/yQ== X-Gm-Message-State: AA6/9Rk9Oz86wAQLXg4VxGxvtriWht4BfMBajyM3BsNi0iR5f8BqBzkIdgtL7Eu1dcdGpboL X-Received: by 10.31.92.22 with SMTP id q22mr1090215vkb.88.1476288300247; Wed, 12 Oct 2016 09:05:00 -0700 (PDT) Subject: Re: [PATCH v2 3/3] Consolidate posix_fadvise implementations To: Joseph Myers References: <1475021701-22246-1-git-send-email-adhemerval.zanella@linaro.com> <1475021701-22246-3-git-send-email-adhemerval.zanella@linaro.com> <724b49ae-ab7a-d678-cac6-ba286bf8b069@gotplt.org> <086eefb0-907f-7dea-0af6-b3f4b15eddc7@linaro.org> Cc: libc-alpha@sourceware.org From: Adhemerval Zanella Message-ID: <3faeab56-ea0f-1fb1-68cd-f260162b18ab@linaro.org> Date: Wed, 12 Oct 2016 13:04:55 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: On 12/10/2016 12:39, Joseph Myers wrote: > On Wed, 12 Oct 2016, Adhemerval Zanella wrote: > >> For some reason I am not seeing this issue with my mips64n64 toolchain >> (gcc 5.3.1, binutils 2.26.0.20160331). > > I was using GCC 5.4.1 20160810 and binutils 2.27.51.20160810. I've now > updated to today's GCC 5 branch and binutils master, and still see the > same issue, in a clean build from scratch. I updated the binutils in my mips64 toolchain to master (2.27.51.20161012) and now I am see this behaviour. > > The error is complaining about libc.so when linking sotruss-lib.so. > libc.so has (readelf --dyn-syms) > > 262: 000000000010b950 28 FUNC GLOBAL DEFAULT 12 posix_fadvise64@GLIBC_2.2 > 417: 000000000010b950 28 FUNC WEAK DEFAULT 12 posix_fadvise64@@GLIBC_2.2 > 1505: 000000000010b950 28 FUNC GLOBAL DEFAULT 12 posix_fadvise64@@GLIBC_2.3.3 > > that is, two separate definitions at version GLIBC_2.2. It looks to me > like sysdeps/unix/sysv/linux/posix_fadvise64.c would create a > posix_fadvise64 weak_alias, while > sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fadvise64.c then adds > compat_symbol / versioned_symbol calls. If a symbol is being created with > explicit versioning, direct weak_alias / strong_alias calls for it should > be disabled. Yes, it seems the case. The patch below disable the weak_alias for mips64 and I could complete the build without issues with check-abi clean. By the way, do you know exactly why mips64n64 requires this symbol versioning? I noted MIPS64 sets __OFF_T_MATCHES_OFF64_T and it is ILP64 (so size_t is 8 bytes), so diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fadvise64.c b/sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fadvise64.c index d7aab25..0af3c38 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fadvise64.c +++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fadvise64.c @@ -15,6 +15,8 @@ License along with the GNU C Library; if not, see . */ +#undef weak_alias +#define weak_alias(a, b) #undef strong_alias #define strong_alias(a, b)