From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id gK69DsjlP2OrggEAbAwnHQ (envelope-from ) for ; Fri, 07 Oct 2022 10:39:36 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id AOvtDcjlP2MdYwAAG6o9tA (envelope-from ) for ; Fri, 07 Oct 2022 10:39:36 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id DA64113E1E for ; Fri, 7 Oct 2022 10:39:35 +0200 (CEST) Received: from localhost ([::1]:35364 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ogitL-0007ij-1d for larch@yhetil.org; Fri, 07 Oct 2022 04:39:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39462) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ogim2-0003SK-St for bug-guix@gnu.org; Fri, 07 Oct 2022 04:32:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:35198) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ogim2-0000bs-Jd for bug-guix@gnu.org; Fri, 07 Oct 2022 04:32:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ogim2-0006TF-6Q for bug-guix@gnu.org; Fri, 07 Oct 2022 04:32:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#58033: A bug in file-dynamic-info used by validate-runpath in gnu-build-system and others. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 07 Oct 2022 08:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58033 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Lukasz Olszewski Cc: 58033@debbugs.gnu.org Received: via spool by 58033-submit@debbugs.gnu.org id=B58033.166513149624838 (code B ref 58033); Fri, 07 Oct 2022 08:32:02 +0000 Received: (at 58033) by debbugs.gnu.org; 7 Oct 2022 08:31:36 +0000 Received: from localhost ([127.0.0.1]:34276 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ogilc-0006SY-39 for submit@debbugs.gnu.org; Fri, 07 Oct 2022 04:31:36 -0400 Received: from eggs.gnu.org ([209.51.188.92]:41854) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ogilZ-0006SL-Pc for 58033@debbugs.gnu.org; Fri, 07 Oct 2022 04:31:34 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:55686) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ogilU-0000ZS-7m; Fri, 07 Oct 2022 04:31:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=5zNPNUyNpbhoAA7mT4nZqcwI7DtoyufTq1d5JBnti0k=; b=WowOV2FkHs9eNMi5zfh9 T0oK94KGGawf7u16p3Tz8UYEZAo/GB3CRsQ9Eeawjc8ipNIugiYecruhmWvBr2RoMgKE2wLhChX+a WKVOW2qfHCFn1ni/cIjv5Pu45nJJWH4sX4ZrCx/id7T5WVvTzxtJfDB+n0I6YsC59/KCM/prgT2RX vOd7PkNGcGbLrcxJGW+0wM+6AJhCdsNi7FMLwFkAnLQSN9dQ9OcP44J6M3fZcv8jnrTJ3aOr+Xv4F Vf0/RIedPVR4ICN3jF0CRZnt8TJ77a1G1cbCfC2bR24j9M53BYpT81RAY5wavGpp59q8YDhIY4vEj 3mifd5cOxT/ZXQ==; Received: from [193.50.110.253] (port=37548 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ogilO-0008KR-Mf; Fri, 07 Oct 2022 04:31:27 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: Date: Fri, 07 Oct 2022 10:31:20 +0200 In-Reply-To: (Lukasz Olszewski's message of "Sun, 25 Sep 2022 13:27:47 +0200") Message-ID: <87y1tsdoh3.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1665131975; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=5zNPNUyNpbhoAA7mT4nZqcwI7DtoyufTq1d5JBnti0k=; b=gmrLzG6hMFOVRI7jZuC/ogtYxU2uJewQvMmpSdUarKJxCCXCec/x46xjIohkiCGe0+j5Bt ovEAKqJZGet8s2RT1i1cGjVnckIIGMJi1B+3MOdzL7elQTMCe/Jbr0YyKoEm5FUI6bLkXV Kh9NVZaEtD8XH9l79BJPPbWye2DJjQN2XeZwulE7grqNpxxOUhwCtXzS+v961oGuX+nF4U hqpwcjf1QvhxdqBlU9xg94nL8g88KlL6qArW3O9ZZgydRugtQgQyk4Y6Ilf/Ew4145i6lq 8xpKzcRJljJe42FekFfnCuNjXYShe+g7gup/8ImuEsbgQx7wUL7R7uN/RDBktA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1665131975; a=rsa-sha256; cv=none; b=KwKvTxeL+fgVdiu7rIaFemD7d3yiW1kmT5b1b8/sTttVKIyya+GrUkawdJgbhz4vsGaqWN Ii8JaJq07x00xumt55RnpXzEbdyU7KwF/7U3DRpyMsOC8ffhfObee7vUiC/MHDARbUM6wV I/g5lnNp2vQoiyy9bRhDA02vf2HAXPAyg8UeU7A3XFFiYe1bjtt1UoakgRp9TfvivhI3OH TMazLAJy/zamm4yYJozdUP+6aM2wjEC22SY+RExtCWJK3SC3cFJqAv39EQhdkauBfrtm1K 1hW0lKOqgi5RLF05Jupckfy5Alpchbn4tvbEGdkULzpTcsEJ7zfG3OOwJ2Re+w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=WowOV2Fk; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.07 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=WowOV2Fk; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: DA64113E1E X-Spam-Score: -3.07 X-Migadu-Scanner: scn0.migadu.com X-TUID: 9RN0uWtMnA2p Hi Lukasz, Lukasz Olszewski skribis: > Then if I run $ strip --strip-unneeded --enable-deterministic-archives > file the files can be run fine, but if I use patchelf to add an extra > folder to the rpath strip complains like this: > $ strip --strip-unneeded --enable-deterministic-archives > /home/luk/dev/backup_FileStoreTest > strip: /home/luk/dev/stt5WKN1: warning: allocated section `.dynstr' > not in segment > > Then the binary has its elf header mangled as described previously. > > By copying the unmodified file, modifying rpath and running strip a > couple of times I found that there is no problem if the rpath change > results in rpath of the same or shorter length, but adding even one > byte to it makes 'strip' later complain and mangle the binary. I believe PatchELF has the potential to break binaries, especially when trying to extend RUNPATH (the data has to fit in the string table; PatchELF is supposed to be able to grow the string table as needed, but there might be bugs.) It looks like a workaround is to not run =E2=80=98strip=E2=80=99, right? Ludo=E2=80=99.