From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-3.3 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_GMAIL_RCVD, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 1F7FB20248 for ; Fri, 1 Mar 2019 01:53:17 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-type; q=dns; s=default; b=s7sH 73BQso7IsiAB1q5A6fMwfFvD0Qh8N4WrlHqwJiBODG4k4XIPnMKTBOJg9rc6lDYS ZasOpsmSw0+SpvjZqvoUyVWS7lZKpzF/zoUfPkqa+IXuhpLtRsGB4xbkuoHMiNZk 2i2xf915uHn6Q/KpoEvnvZfmTNKGuu1lgF8lTvc= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-type; s=default; bh=KFN4D1VoBk pB0qZ3UA5+MkhrvnI=; b=eoH0luKSYLCNyixp+LmzhnDphYQs3u6UOWOsd1RF7L cR1EbXfljOGpMnfEQsELpN2zsiQ4Fv7V6BiRKn1IKr3zoin0VSDkT4AhfllOxchu gPNmWPavG2Xog9Sn30Zr6bhGQoZodLazCCPQZz3xo9cyw88BB1y/BRQIHnPpy54j M= Received: (qmail 58319 invoked by alias); 1 Mar 2019 01:53:14 -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 Received: (qmail 58305 invoked by uid 89); 1 Mar 2019 01:53:13 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: mail-oi1-f195.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=fi25pN/jQlrNR3lzdvEFVWJsGH/QE9xYH7NeaC5cv0g=; b=sH1eWVYdgApOHfgHHQ0gx67S9WHOOHBmB9VXQrMGbXKvxH7o3U9RKyqRSm6nkR2YjY 1sZaHt9HcDVRRRhq2xzj5n7R/16RJSvmL3YPvP2fbwnsZX3ypd0/YkfK0dHKmO/YzV+q LuaDDMlpNEijfacFkv2hLJ66fIFagZS4FsuWRMq4ZHJRYFSJGonxThIewLFpw96pcFm6 Hv0dXB2OTl6HImRzTHpN8ML+NTrV/+KUewxQGLY6Xeu1CvgHVDrZXAdR4IXYOu8Rc9v7 wW4/ItNJ4PaHc6wLvPM1wBX/8M6xMhCEzwSrbx3mKnuFBEllxEgB/6DuWpepWXaEVhhO B59g== MIME-Version: 1.0 References: <87mumqei4h.fsf@oldenburg2.str.redhat.com> <87a7ihv84x.fsf@oldenburg2.str.redhat.com> <14742246.106524.1551401420668@poczta.nazwa.pl> In-Reply-To: <14742246.106524.1551401420668@poczta.nazwa.pl> From: "H.J. Lu" Date: Thu, 28 Feb 2019 17:52:32 -0800 Message-ID: Subject: Re: [PATCH] elf: Add tests with a local IFUNC resolver [BZ #23937] To: Rafal Luzynski Cc: Florian Weimer , GNU C Library Content-Type: text/plain; charset="UTF-8" On Thu, Feb 28, 2019 at 4:50 PM Rafal Luzynski wrote: > > Florian, > > 27.02.2019 11:27 Florian Weimer wrote: > > > > * Florian Weimer: > > > > > The existing tests all use global symbols (but with different > > > visibility). Local symbols could be treated differently by the > > > compiler and linker (as was the case on POWER ELFv2, causing > > > bug 23937), and we did not have test coverage for this. > > > > > > Tested on x86-64 and POWER ELFv2 little-endian, with and without > > > --disable-multi-arch. On POWER, the test cases elf/ifuncmain9, > > > elf/ifuncmain9pic, elf/ifuncmain9pie reproduce bug 23937 with older > > > binutils. > > > > > > 2019-02-20 Florian Weimer > > > > > > [BZ #23937] > > > elf: Add test with a local IFUNC resolver. > > > * elf/ifuncmain9.c: New file. > > > * elf/ifuncmain9pic.c: Likewise. > > > * elf/ifuncmain9picstatic.c: Likewise. > > > * elf/ifuncmain9pie.c: Likewise. > > > * elf/ifuncmain9static.c: Likewise. > > > * elf/Makefile [multi-arch] (tests-ifuncstatic): Add > > > ifuncmain9static, ifuncmain9picstatic. > > > * elf/Makefile [multi-arch && build-shared] (tests-internal): > > > Add ifuncmain9, ifuncmain9pic. > > > * elf/Makefile [multi-arch && build-shared && have-fpie] > > > (ifunc-pie-tests): Add ifuncmain9pie. > > > (CFLAGS-ifuncmain9pic.c): Add $(pic-ccflag). > > > (CFLAGS-ifuncmain9picstatic.c): Likewise. > > > (CFLAGS-ifuncmain9pie.c): Add $(pie-ccflag). > > All those tests fail at my test machine: You left out the most relevant info. What is your test machine? > FAIL: elf/ifuncmain9 > FAIL: elf/ifuncmain9pic > FAIL: elf/ifuncmain9picstatic > FAIL: elf/ifuncmain9pie > FAIL: elf/ifuncmain9static > > $ cat elf/ifuncmain9.out > info: initial value of resolver_called: 0 > error: invalid magic value: 0x400630 > info: resolver_called value: 1 > info: implementation_called value: 0 > error: invalid implementation_called value (must be 1) > $ cat elf/ifuncmain9pic.out > info: initial value of resolver_called: 0 > error: invalid magic value: 0x400640 > info: resolver_called value: 1 > info: implementation_called value: 0 > error: invalid implementation_called value (must be 1) > $ cat elf/ifuncmain9picstatic.out > info: initial value of resolver_called: 0 > error: invalid magic value: 0x400c70 > info: resolver_called value: 1 > info: implementation_called value: 0 > error: invalid implementation_called value (must be 1) > $ cat elf/ifuncmain9pie.out > info: initial value of resolver_called: 0 > error: invalid magic value: 0x5ef358e0 > info: resolver_called value: 1 > info: implementation_called value: 0 > error: invalid implementation_called value (must be 1) > $ cat elf/ifuncmain9static.out > info: initial value of resolver_called: 0 > error: invalid magic value: 0x400c60 > info: resolver_called value: 1 > info: implementation_called value: 0 > error: invalid implementation_called value (must be 1) > > I hope it helps. Feel free to ask more questions. > > Regards, > > Rafal -- H.J.