From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi1-x229.google.com (mail-oi1-x229.google.com [IPv6:2607:f8b0:4864:20::229]) by sourceware.org (Postfix) with ESMTPS id 660AB3858C2B for ; Fri, 4 Nov 2022 16:49:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 660AB3858C2B Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-oi1-x229.google.com with SMTP id g10so5738319oif.10 for ; Fri, 04 Nov 2022 09:49:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=am2wJygMCVmupXAoVPmGhD8whbrtMegi8na8K8HBZkw=; b=CyJD+DArRNhUj/kzY52hDJAtBd8kGhnZlnVYl574rlIG0EAqGHAeItbJ9BAX7yoroB 1/UAsI0ivSKtnmS7nBVp+cedljFg/TGGVEV987K6IBBAEOUzq0oOsDM4+e1fA0G0mBgK lz5iuswhaOsvrXIul71sBDBmiC28QGbZTmaHUJE2hgird/5rLu8HTwGXnJYwZitNT9kF shpQAJyIbPaIomyLgxKj3hmZkDNml13fMqJrd0D5nVU03viN5CKU1sDjBsLkGv0csaTz 10gSVoE7oeyL+UskxFKm109ZXAxN5pmSjLnvcXH98d/wvP0goK0qQh+Cvg28s/bsq6+M NQAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=am2wJygMCVmupXAoVPmGhD8whbrtMegi8na8K8HBZkw=; b=RWWmiVi5lL2Y6JX6l+p3tQtFRPt5prcALTTnlfF2ZmfrK3XQ1DGZKnDdhk8jtrQIkV IIg5vi8yW4A/R7n1jaYDd9ShlJh9ojwyVB/SgOd0TrWLjej9btc/XGIpWJhipCON4Z2D 6d1qz9Nck9447hMEFqZbqPdis3JUBfa4CQBiCE6V3eGBV5K8EL15nsvlkBC+RmHuCGA2 Gm+GvnS5ojVAxi7a+SnbKgisqRsrGiKtxLJ6P+/piDqSn5VQXTwxXuo/2mt1EivGKFqf I9LPMioS398BnwV/Tngycc9P1srOXyamGoePWaq/rZNu1cnMxSf/ColyMoGU2YQzJWmY XJxg== X-Gm-Message-State: ACrzQf06JxS+8CzK1bCNJcQAyM/MjOTTyx/DUwT9/fjo029m6JR0WsEh O+HUuJQGlU/ERjdiLhitZaUy8hv6LK2FYaNVhik= X-Google-Smtp-Source: AMsMyM5hPCSg/kcrhAvOlfVakwPTNFVzuwt7Og6FY9l3YJML0cpAY5E3vgbWRljtzf/W3Ax230eH4YziZFzIGAHKuAE= X-Received: by 2002:aca:674a:0:b0:35a:856:4b85 with SMTP id b10-20020aca674a000000b0035a08564b85mr17016932oiy.298.1667580553725; Fri, 04 Nov 2022 09:49:13 -0700 (PDT) MIME-Version: 1.0 References: <87a6572ny0.fsf@oldenburg.str.redhat.com> In-Reply-To: From: "H.J. Lu" Date: Fri, 4 Nov 2022 09:48:37 -0700 Message-ID: Subject: Re: x86_64 / i686 no-PIE failures To: Szabolcs Nagy Cc: Florian Weimer , libc-alpha@sourceware.org, Joseph Myers , Fangrui Song Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-3017.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Fri, Nov 4, 2022 at 2:29 AM Szabolcs Nagy wrote: > > The 11/04/2022 08:12, Florian Weimer via Libc-alpha wrote: > > * Joseph Myers: > > > > > Now that the uchar.h failures with mainline GCC are fixed, other fail= ures > > > show up for x86_64 / i686 no-PIE with mainline GCC and binutils (I do= n't > > > know how long these have been there): > > > > > > /scratch/jmyers/glibc-bot/install/compilers/x86_64-linux-gnu/lib/gcc/= x86_64-glibc-linux-gnu/13.0.0/../../../../x86_64-glibc-linux-gnu/bin/ld: /s= cratch/jmyers/glibc-bot/build/glibcs/x86_64-linux-gnu-no-pie/glibc/elf/ifun= cmain1.o: non-canonical reference to canonical protected function `foo_prot= ected' in /scratch/jmyers/glibc-bot/build/glibcs/x86_64-linux-gnu-no-pie/gl= ibc/elf/ifuncmod1.so > > > /scratch/jmyers/glibc-bot/install/compilers/x86_64-linux-gnu/lib/gcc/= x86_64-glibc-linux-gnu/13.0.0/../../../../x86_64-glibc-linux-gnu/bin/ld: fa= iled to set dynamic section sizes: bad value > > > collect2: error: ld returned 1 exit status > > > ../Rules:238: recipe for target '/scratch/jmyers/glibc-bot/build/glib= cs/x86_64-linux-gnu-no-pie/glibc/elf/ifuncmain1' failed > > > make[3]: *** [/scratch/jmyers/glibc-bot/build/glibcs/x86_64-linux-gnu= -no-pie/glibc/elf/ifuncmain1] Error 1 > > > make[3]: Leaving directory '/scratch/jmyers/glibc-bot/src/glibc/elf' > > > > H.J., > > > > this test no longer seems valid with current binutils (or current > > binutils is broken). > > > > ifuncmain1.o has X86_64_32S and X86_64_PLT32 relocations for > > foo_protected, so the main program must contain a PLT stub for > > foo_protected. Apparently, ld no longer produces such binaries. > > > > What should we do about this? > > aarch64 has the same issue since > > binutils commit 90b7a5df152a64d2bea20beb438e8b81049a5c30 > aarch64: Disallow copy relocations on protected data > > which should be in the binutils 2.39 release > > ld.lld rejects such usage too, i think the plan was to not > support extern protected symbol refs with canonical address > moved to the main exe. > > so the tests should be changed, but i'm not sure what's > the best approach (completely dropping protected or just > ensure the address is not taken in no-pie case). Given the linker change, we should drop these tests for non-PIE. --=20 H.J.