From patchwork Fri Aug 30 06:13:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "srinuvasan.a" X-Patchwork-Id: 3778 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Fri, 30 Aug 2024 08:13:46 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-oi1-f187.google.com (mail-oi1-f187.google.com [209.85.167.187]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 47U6Dixv005891 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 30 Aug 2024 08:13:45 +0200 Received: by mail-oi1-f187.google.com with SMTP id 5614622812f47-3db2b8a3ed6sf1732163b6e.2 for ; Thu, 29 Aug 2024 23:13:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1724998419; cv=pass; d=google.com; s=arc-20240605; b=MvjpoehNgj9BbPvXxoWURJYTtKDJFvmWlnPGJ2CNJA+hG2LPpOFxNwc0pL8u4+PV72 tAxlby6AVldu+tXB64awR8/FeqjPV59MvptF4eFnp2BExU8u+RV3WiMizlCmOWo98CiW WbdVBx3Kl8SKiLhQ7SStAZSy5VOj+IOAWiLRLSvdirkIasbN2s10lq6hy4pDPOGC5EMK kAu2L4b6PAsoaoN+7u+JBxggLaEsa3v2OxlJy82AhYzZyEB/2TZcBQoHx1OyT2ItVxNG eCjvarqpDc+EozlIke/crulFZ4oKZSjN4BKvVVk5Ez5bHmimeRJLA9uZ/QCLoaA+U+5M 1TIg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:feedback-id:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=d+RRNm7J5Zsc0zub4jhdOfFahb3FK/z0Xrg2bDT3rGI=; fh=9LMfw/5jjz80AcAs1Y6N5rj/2VH94YWiGlqn0vLYLrM=; b=LplEX8oEeCpHo6nXJB3LTOUT+6F3MXMwZMWa/Kpj5GmO2C+y1AagfhL/arEsKfwJuE y28XD0Iy+YPBPOQ2nkkIL60GTPxaqx8pY8iF4fHV9ZXJgQW6V+/5l40lTad/Aii4tIXO /2WmTIyHzRpEgm64stJ0MZUjFPGQI00ITmjA/FnuqP9qorkbqIlj5wd0Tu4BW1jEeQXi YVNIY2QbXi7zCjf5ZmfIvO1y5GWAaUQeXvJApBiRXS9IF0xcXQ3ImNMML0RceS+UT2Rv TuO+COurNw6NqI7w8NRaDlYPMT4W/mQjWL2hNWylKXnWyyU7TWq+pnduYf5NrGRwBoPW zKZA==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=FnWGGf4h; spf=pass (google.com: domain of srinuvasan.a@siemens.com designates 185.136.65.226 as permitted sender) smtp.mailfrom=srinuvasan.a@siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1724998419; x=1725603219; darn=isar-build.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:feedback-id :mime-version:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=d+RRNm7J5Zsc0zub4jhdOfFahb3FK/z0Xrg2bDT3rGI=; b=QFTpWmFaSMiVhqPoMIhnptOPOtZefmf6nOeEd51rdSjP8/7JtEbH5cTiON4MwETVQK TSOzTY4n6wcopc32n0IyWtKDvlq24JGXK0JxBmasTxJKzg/TUQRLqOD/RLRCQe+5SsHn IudqfY+zCtSJ4Dj+t/B8ZfrxlU6IZbYQ1bQ5+Fl7TyUef2b/kZHNu+BPZaCEVuFCIfg8 iYyfcd+0girGNDyVY3mnYJeb7WDC1utChZlG5+zn1uGMf24z2M0R5eTnxdwhx/19Z94c uIOiOXf6Upuc0ACX87D8NpkKHVcKWvjE1bfPoJ8tcLP7Ncv2eSCH9PZ6/R6eFUhyd4ug ygMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724998419; x=1725603219; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:feedback-id :mime-version:message-id:date:subject:cc:to:from:x-beenthere :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=d+RRNm7J5Zsc0zub4jhdOfFahb3FK/z0Xrg2bDT3rGI=; b=YvVPEcnEpUGdfELR6gQ/trQaa1iH7xJe9kStbmQeWwlNkMpyq+CO2/+dtBRrnxnqrg lww80dAFHtd/N3ZCDCz0Ck1u38TEMAaSTalOqnB4SBPJ86YpI0bjm7amqb7NW8EI8DhU uv90YOzY6IkO7xZvn0+5wYoQ6ZgcSuN8Cny9y+SsJ3iPdZJrvrqikQ5ztBqrd50t28LV D3vtK278/4HIA12UlxSy21ThwH6tZLGjyP9w9aRKRnztIBdzb/VVQB7tzniSfr0BxZxX C+FQHsQn47//nRMh2N9RARKG2SIO9RRAAge3xbvCmTdOzQEcR9peGFyO8PzEiHberf1E qwlQ== X-Forwarded-Encrypted: i=2; AJvYcCUwRtcCfHkje2qpollWAB/RTVTTV6vALb1Px1bQNkHvu2cbfltoZefRIA8oIbj7j7wEtuLzwFA=@isar-build.org X-Gm-Message-State: AOJu0YzxIPKaGmla4wjviVjsjbscz8IURZrG7Pdn4K1yxyaAAzo2TdAV tnd0b2YT0EPG4e4abCwDcynuCiZBrqXk2UfD2O4XRnHiAzVcgVHt X-Google-Smtp-Source: AGHT+IEVA1WlcWq3Hler9e64hHLbkvNXUnFpqNPsrENHq/IT+C42Xcq7ywk7GuUkTbNS37LoaPhGHA== X-Received: by 2002:a05:6870:d696:b0:24f:c31a:5c29 with SMTP id 586e51a60fabf-2779035c2c7mr5221131fac.43.1724998418974; Thu, 29 Aug 2024 23:13:38 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6870:1ec3:b0:24f:6f0d:5f4a with SMTP id 586e51a60fabf-2778f0b1d64ls726823fac.0.-pod-prod-01-us; Thu, 29 Aug 2024 23:13:38 -0700 (PDT) X-Received: by 2002:a05:6870:b491:b0:25d:fb57:db43 with SMTP id 586e51a60fabf-277900e54f8mr5588540fac.12.1724998418191; Thu, 29 Aug 2024 23:13:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1724998418; cv=none; d=google.com; s=arc-20240605; b=IjtxrV92dpj2kQFsErceVxb8VtM+TgrHQfEVNT6cvcWzvP/oDXpkBhiAS3ZJkaxd71 t+3wXaa2Ji27+dLCYoR2+r1bF75wDX4E4i6rFntnmOqKchCbPXxBiMCmyq6SSQew1ng8 39xSxS7blzCbK5jZha86RAFJyR2V+mQiG/SWOcBARUJxydV+jprUNjFhuHWm8Q+fZAtd 8FcpH8Dc4JnKiBG4AH+FQlsAfg2W1D7dy8dHzuDrFn2RuSERZp9tW/U0RJYpSv1+qImg YwKAD68mA/qM8vCgVTqV00LXMjY/Ob9qbqAsy3mCU+MzPMG4fcP2F4TzLaDRTqWP4Db2 ywcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=feedback-id:content-transfer-encoding:mime-version:message-id:date :subject:cc:to:from:dkim-signature; bh=8IhRbiaaVt7tO1IS7zWk+nErAG3/qVTQTAwzOCvZ9ZI=; fh=kfhEa0yq30nvGTzFPP1zawlSoLTryr3g7woN/9lNEak=; b=X8pWfXVyZrwPugwsujpiwIYUXEJHdHss8RwPdWuAKqi75sOf3OCLtiCQL/aiRp9blt PlnPp+DR5qa8ILW9XbstJGLft8E0m4DOTZ4y5fTz/XG9T1nhD3MFvarUzr6TUCwKcIDG CbJ+zYeHvMyv3sN9sdXy9D4iCvoF6rWcSF0dl3EyA/7Tzq70/QgrtAw2UAwG2G2w+05V lZDWA4965sD5KsD08x8oU0knGvtQksOmuUiUZxfolNcGlGkX1czmxgFwGYvua46d3y2T XTW5xH1LhFr7Xq/t6Ir6/iutbRPJsGFIiaNlVy/fi7URRSOccuJyip7F8GEKcNpJ/lHl OXDQ==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=FnWGGf4h; spf=pass (google.com: domain of srinuvasan.a@siemens.com designates 185.136.65.226 as permitted sender) smtp.mailfrom=srinuvasan.a@siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Received: from mta-65-226.siemens.flowmailer.net (mta-65-226.siemens.flowmailer.net. [185.136.65.226]) by gmr-mx.google.com with ESMTPS id 586e51a60fabf-277abb716f3si58199fac.2.2024.08.29.23.13.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Aug 2024 23:13:37 -0700 (PDT) Received-SPF: pass (google.com: domain of srinuvasan.a@siemens.com designates 185.136.65.226 as permitted sender) client-ip=185.136.65.226; Received: by mta-65-226.siemens.flowmailer.net with ESMTPSA id 20240830061336bc332b103355a134df for ; Fri, 30 Aug 2024 08:13:36 +0200 X-Patchwork-Original-From: "srinuvasan.a via isar-users" From: "srinuvasan.a" To: isar-users@googlegroups.com Cc: jan.kiszka@siemens.com, Srinuvasan A Subject: [PATCH] sdk-files/files/relocate-sdk.sh: find only ELF executable before apply patchelf Date: Fri, 30 Aug 2024 11:43:53 +0530 Message-Id: <20240830061353.841518-1-srinuvasan.a@siemens.com> MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-1324425:519-21489:flowmailer X-Original-Sender: srinuvasan.a@siemens.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=FnWGGf4h; spf=pass (google.com: domain of srinuvasan.a@siemens.com designates 185.136.65.226 as permitted sender) smtp.mailfrom=srinuvasan.a@siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com X-Original-From: srinuvasan.a@siemens.com Reply-To: srinuvasan.a@siemens.com Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-Spam-Status: No, score=-4.9 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,RCVD_IN_RP_CERTIFIED,RCVD_IN_RP_RNBL,RCVD_IN_RP_SAFE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= From: Srinuvasan A With the present implementation find statemnt return the regular executable files under bin,sbin and usr/lib/gcc* which contains the script files as well. Actually we are tuning interp and rpath only for ELF executable, hence added additional condition in the find statement to return only ELF executable. With this change we are avoiding unncessarily checking the interpreter for non ELF executable files. Signed-off-by: Srinuvasan A --- meta/recipes-devtools/sdk-files/files/relocate-sdk.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/recipes-devtools/sdk-files/files/relocate-sdk.sh b/meta/recipes-devtools/sdk-files/files/relocate-sdk.sh index 82f63b30..e02e71f4 100755 --- a/meta/recipes-devtools/sdk-files/files/relocate-sdk.sh +++ b/meta/recipes-devtools/sdk-files/files/relocate-sdk.sh @@ -27,7 +27,7 @@ fi echo -n "Adjusting path of SDK to '${new_sdkroot}'... " -for binary in $(find ${sdkroot}/usr/bin ${sdkroot}/usr/sbin ${sdkroot}/usr/lib/gcc* -executable -type f); do +for binary in $(find ${sdkroot}/usr/bin ${sdkroot}/usr/sbin ${sdkroot}/usr/lib/gcc* -executable -type f -exec file {} \; | grep ELF | awk -F ':' '{ print $1 }'); do interpreter=$(patchelf --print-interpreter ${binary} 2>/dev/null) oldpath=${interpreter%/lib*/ld-linux*} interpreter=${interpreter#${oldpath}}