From patchwork Sat Jul 29 18:34:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Andreas K. Huettel" X-Patchwork-Id: 1814539 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=NTE0toe5; dkim-atps=neutral Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RCtTm4xWHz1ybX for ; Sun, 30 Jul 2023 04:35:07 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E26983858C2D for ; Sat, 29 Jul 2023 18:35:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E26983858C2D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1690655704; bh=vVKCqUCEQ9W5l3arKT3aRMtFwFL+EEHlhwh1ey9lNjE=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=NTE0toe5dfjTtk4eByXQ8Ak24hX4xp/HXUdgzCCR1m0pzU8pDdickeBng+L0RfT21 LWcohAwqdEneVvEsv8523pJvRjHgMTvJbIe0XRoMxaD+YxVk1AtQ8Lwt9rSOKgxDMi wSdBXsJwfGwug0splJ8yYKTqGd+lCJMyoyUUXKGc= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id 422F93858C62 for ; Sat, 29 Jul 2023 18:34:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 422F93858C62 To: libc-alpha@sourceware.org, vapier@gentoo.org Subject: build failure on ia64 (+ patch), "relocation truncated to fit: GPREL22 against `.text'" Date: Sat, 29 Jul 2023 20:34:35 +0200 Message-ID: <4817905.GXAFRqVoOG@pinacolada> Organization: Gentoo Linux MIME-Version: 1.0 X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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-Patchwork-Original-From: "Andreas K. Huettel via Libc-alpha" From: "Andreas K. Huettel" Reply-To: "Andreas K. Huettel" Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org Sender: "Libc-alpha" When testing a manual build on ia64 we ran (on two different Gentoo machines) into https://bugs.gentoo.org/723268 https://sourceware.org/pipermail/libc-alpha/2020-May/114028.html gcc -o /home/dilfridge/glibc_build/support/test-run-command -nostdlib -nostartfiles -static /home/dilfridge/glibc_build/csu/crt1.o /home/dilfridge/glibc_build/csu/crti.o `gcc --print-file-name=crtbegin.o` /home/dilfridge/glibc_build/support/test-run-command.o /home/dilfridge/glibc_build/elf/static-stubs.o /home/dilfridge/glibc_build/support/libsupport_nonshared.a -Wl,--start-group /home/dilfridge/glibc_build/libc.a -lgcc -Wl,--end-group `gcc --print-file-name=crtend.o` /home/dilfridge/glibc_build/csu/crtn.o /usr/lib/gcc/ia64-unknown-linux-gnu/13/../../../../ia64-unknown-linux-gnu/bin/ld: warning: -z relro ignored /home/dilfridge/glibc_build/libc.a(dl-support.o): in function `_dl_aux_init': /home/dilfridge/glibc/elf/dl-support.c:239:(.text+0x51): relocation truncated to fit: GPREL22 against `.text' /home/dilfridge/glibc_build/libc.a(dl-support.o): in function `setup_vdso': /home/dilfridge/glibc/elf/setup-vdso.h:108:(.text+0xea2): relocation truncated to fit: GPREL22 against `.text' collect2: error: ld returned 1 exit status make[2]: *** [../Rules:290: /home/dilfridge/glibc_build/support/test-run-command] Error 1 make[2]: *** Waiting for unfinished jobs.... make[2]: Leaving directory '/home/dilfridge/glibc/support' make[1]: *** [Makefile:484: support/others] Error 2 make[1]: Leaving directory '/home/dilfridge/glibc' make: *** [Makefile:9: all] Error 2 Turns out we have a fix for this in our Gentoo patchset since glibc-2.31, pasted below. Since this fixes a clear build failure, is localized to sysdeps/unix/sysv/linux/ia64, and there are no positive test results without it anywhere, I'd like to pull it in for 2.38. Any objections? From ed428afb4c6353692fba6cedaa2f9db7bc9fb551 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sat, 11 Jul 2020 20:06:51 +0300 Subject: [PATCH 4/9] Fix miscompilation on ia64's gcc-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug: https://bugs.gentoo.org/723268 Signed-off-by: Andreas K. Hüttel --- sysdeps/unix/sysv/linux/ia64/dl-sysdep.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/ia64/dl-sysdep.h b/sysdeps/unix/sysv/linux/ia64/dl-sysdep.h index 3e4d5da820..eb7681b704 100644 --- a/sysdeps/unix/sysv/linux/ia64/dl-sysdep.h +++ b/sysdeps/unix/sysv/linux/ia64/dl-sysdep.h @@ -32,7 +32,9 @@ #ifndef __ASSEMBLER__ /* Don't declare this as a function---we want it's entry-point, not it's function descriptor... */ -extern int _dl_sysinfo_break attribute_hidden; +/* Use section ".text" to force far GPREL64 relocation instead of + GPREL22 . */ +extern int _dl_sysinfo_break attribute_hidden __attribute__((section(".text"))); # define DL_SYSINFO_DEFAULT ((uintptr_t) &_dl_sysinfo_break) # define DL_SYSINFO_IMPLEMENTATION \ asm (".text\n\t" \