From mboxrd@z Thu Jan 1 00:00:00 1970 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:38:26 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-yb1-f183.google.com (mail-yb1-f183.google.com [209.85.219.183]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 47U6cO2S006116 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 30 Aug 2024 08:38:24 +0200 Received: by mail-yb1-f183.google.com with SMTP id 3f1490d57ef6-e11703f1368sf2140903276.1 for ; Thu, 29 Aug 2024 23:38:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1724999898; cv=pass; d=google.com; s=arc-20240605; b=aqf2Mmsmc4Ta+Qg91rAYMJfCdrQI4ACrGcPEgNNKoy4wFh3B2MmaMZo3tbOJO0sbQC PYbOx9IKgajC0Vem2A8HKSBxj0HTLVh3ikNrm5DddkzxhXkiL13t84ZKhADSd/pCwqo7 QxQq4qZvR2SqdgFT476QCuwNaOCELfJ/5/ViahU8ieCs7RZENXgxVhSd4Xdo+5NDzXJK ADGNtsGAhWL3radsfwjzna6C1ONZ9oK5MsBjy2vQJ61u0BLq6jWLleLg1U7b2qjYyy/7 o5vmAmelQnzjZNA7iyLuK8F5Frp25F3DSd3SJTLky28DuT+t7zEGBebmIpPX2go7av5E 1KYA== 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:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:sender:dkim-signature :dkim-signature; bh=s0pyN5bNpEwiVJmQ2pdC5WQoSmR+bUFOENw+jSm2Asw=; fh=s2emUW/3SdN2mzsJVqUmBWA4NkJboME0JF2kaqM09tE=; b=DQwEfZ6vZ0dKFroqmedwpSB4mabAfdvt4Wq9Eq6GxH7rDykEg4++eg4yRVzwB63l2j VDrul64jVVcq3bpcy2kpBfc+0bV6ZavnbBdIY3ftthIEDy1tkr25U0MpfTINS4qg3qZH lpa+5TUbTA7eJJ/HaWuOo550JGhX4Lvf6cf+CQ5NEyAk0NT4Jgu7Vk0kkIYm7pmWQA07 jYCSEt5HPtViuxmCwH5hxIWlz9EzoxYPnd7SVvLJnoOmDiDMq7IUEJjjyJS1Pn//QFLd D18NmVk/mQ+CLG/PoOCqCaf3EfsyeiyqIVQ+utIbHYvfgC79A40in1CrlS7mLnQ+qTYq wQ6Q==; darn=ilbers.de ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=h5UQ2aML; spf=pass (google.com: domain of srinuvasanasv@gmail.com designates 2607:f8b0:4864:20::92f as permitted sender) smtp.mailfrom=srinuvasanasv@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=pass header.i=@googlegroups.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1724999898; x=1725604698; darn=ilbers.de; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:sender:from:to:cc:subject:date:message-id :reply-to; bh=s0pyN5bNpEwiVJmQ2pdC5WQoSmR+bUFOENw+jSm2Asw=; b=JLWhDE1/z97sc1CJX/KUGeCrMf/dz7KwLIye5bn4q2lj4tTnZn/TJIJrZNC4AzByf/ qare1O1PuRl1TokTEAosNjIURKzyI5M7vE0hJWHND82XQwS8+tdhWCmfpKrqCjmKgJJZ s0I5//7qgi+jh0geX0f63GRg3ig1642nnASJeF1rZk/fQ1BnxdYKyR6i1aIYFW588Q+5 Fq/VKFrnIhusnLaUcrR0x1YQNFAp+2GRMmzY9Mmu1WR4d4H26FE66n5VSq441ZmDfuOI 3PygMM+VY7hsqgz5qbNNVDzoq/AFdVL/QhE1Ns4XPHYIWgOvboJ4Vx+MnuXgDDacAN9j JZoQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724999898; x=1725604698; darn=ilbers.de; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:from:to:cc:subject:date:message-id:reply-to; bh=s0pyN5bNpEwiVJmQ2pdC5WQoSmR+bUFOENw+jSm2Asw=; b=FN8+vIsOLqYqQ7rps6qVfSbVRwZb+4rQlse9koMUfpmRem70rCzKut6wgRbOVzbvLJ bMDDsyDNnZRH2N58fz7VCPZfueC2zynEwDAX1+rOfseQ4PMMv3Hs4KT8Qz2tu18dAgtt spbnafTpNt+UAilN08XfVzfXkxKID8XjBdyfyjCU6xac4FE8EmukYabkSb+jiJxkfCzN V5k+k0gOiwdOzo+3EoqxHdEW1tDz5gOQyBZLRYJKeVTRpXMqvIIPKwutQaSOmzelLjEB RcvW8SBDY2Ip8P9tTm3uVen56sAN3iDfd1DEkT6JEGWy0PDjE7BNlbmEyxJDCLtNQAVf y1IQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724999898; x=1725604698; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :x-beenthere:x-gm-message-state:sender:from:to:cc:subject:date :message-id:reply-to; bh=s0pyN5bNpEwiVJmQ2pdC5WQoSmR+bUFOENw+jSm2Asw=; b=QJ+ED7rtqWd3PWMpbiywDmPYGuNlGfCWJa89eAAdHAOxpffgSAqHu4cIWJ6Sp6viFs aH1q4rTIUoWFOVoUgA4qlz9hnajihZRYHcAtLblmOp1OaxxtBAG3Lx6EIr6DlYNF0Mky LkKbJEu4MnCBmmtevgihouUBpPWO4HsvPrxdT464GuYiCQM9NRo8tvZZbvcMKIKUzD2R CdT1Gs4frqZpHz6JoAoGko+wggHT0+r2lqdu2vjf/3VQmwo7aU5udytb26LwCnFseuo6 hc9EJHjQ2QUeCVCtRH6G9RpCF1H6yDyZvVNZd++LwvcJQr/6UJxJOXH7vBrDkfxyj8Ye ZkMA== Sender: isar-users@googlegroups.com X-Forwarded-Encrypted: i=2; AJvYcCWuGQfmUCXU4FkMATcPRRhchqrgFH6BQrNRrFtbeCyMapp4YoQlv8V7kWu44O5vNJy/1NvY@ilbers.de X-Gm-Message-State: AOJu0YxIiMiLD6PLLhmYDx1Mw/lrtMWDhFG2krLAr65cWW8C9ZZ9wIVM MEazfoaEHbrWgy8QAYkNgGSygng7GitHE94CTEOI8PMschNUmf53 X-Google-Smtp-Source: AGHT+IG4JiDB/Hm3yxslU+f25rMeT+JEr8oOlMQidxIaT4DKa1kb7TgFKT0rE5xBt/cjLKy3aiqr2Q== X-Received: by 2002:a05:6902:2613:b0:e16:69b5:ef66 with SMTP id 3f1490d57ef6-e1a7a1cce59mr1261601276.54.1724999898395; Thu, 29 Aug 2024 23:38:18 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6902:1547:b0:e16:3642:2a73 with SMTP id 3f1490d57ef6-e1a582643acls1213030276.2.-pod-prod-04-us; Thu, 29 Aug 2024 23:38:17 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUMMSzneNw1lGRH0O6eeXd9SlVKkEtUwCPcm58h4joqekTm6DeuuILvuq4c93ZI7P4dpA2GVM5M0JPC@googlegroups.com X-Received: by 2002:a05:690c:5701:b0:6ad:dedf:f005 with SMTP id 00721157ae682-6d41908133emr7456317b3.17.1724999897527; Thu, 29 Aug 2024 23:38:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1724999897; cv=none; d=google.com; s=arc-20160816; b=GvJTD71UjosNNANNyOcH3ERBHcKEdcW3kvZAkCjBWqnFPGnpsQ6QoNhzuTTdYUiT1T hbClKZWZjhVpfQ29+DPTXMFAMlSL21c+VMRJkObvK8SoKjWC0Ofeukv7n2h+GYiJYUN6 mT8ESpwND5t3c4U9nBPnQGYzWchmMd2NC1yhX9KjxnwBv+ZB5cqI1RaoY2jnNagxhzHY 4d/8/TuTRGBCRpNWKPl1COJH7mryyD4r419VBYMDTwvUAmyRV/QwzKqRH6WsFmYwSO5R Or2mRp2Q93y5IN+OO9YwpTPXV7b2ltQILhy//LzZJCtkQLQUpqRTuR9Au7vER8/0wAHv XIFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=B7otsk38ahQ+KcqqF3tOjcgWp5WgMD2H0+WW4XM+GSE=; fh=RJkKqM68i7rMiRsenVuJzHrNwW+5P+n3MHyA4SrBHk0=; b=tpldEB0nyPa43VnNhxVqidLCiv4bhsqb6l5T/eUAHLYpxuNHsFj9AiR9tsuahQsS7d hujc9rlEGychB/Pka3+gWlLdAzDEWc9Rw1vYQgqooatrdz2brADQEjMzFyCqKhnfIx+5 BxmVSTVUX30a3IH7yKe5hz4f5j1RfOoHeOtlDT1Sut4mO6XEdhdh4Vkuhlbuv/ZeTNZV QXGOI7FyAZxj+Uf+vbqmBVZgZf486cL74bzL79UU5WW6EnlWP2G3oGZqIoeMvd7lnDpB MvtV7007BTBgNbgdwCk/41s3rOnjOaRUOmp2P1UZgh+qXd1qcWetitRA1xG3EWxdGCNs JCEA==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=h5UQ2aML; spf=pass (google.com: domain of srinuvasanasv@gmail.com designates 2607:f8b0:4864:20::92f as permitted sender) smtp.mailfrom=srinuvasanasv@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=pass header.i=@googlegroups.com Received: from mail-ua1-x92f.google.com (mail-ua1-x92f.google.com. [2607:f8b0:4864:20::92f]) by gmr-mx.google.com with ESMTPS id 6a1803df08f44-6c340ca6947si1307796d6.7.2024.08.29.23.38.17 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 29 Aug 2024 23:38:17 -0700 (PDT) Received-SPF: pass (google.com: domain of srinuvasanasv@gmail.com designates 2607:f8b0:4864:20::92f as permitted sender) client-ip=2607:f8b0:4864:20::92f; Received: by mail-ua1-x92f.google.com with SMTP id a1e0cc1a2514c-842fdb1afb1so432133241.1 for ; Thu, 29 Aug 2024 23:38:17 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCUxgx0rnINoiN4FqgUkTbjm6oqxgOohO1EAccQRSo8k59iudbF6h6kwsS4tFUvuti6454cNe05PYLTC@googlegroups.com X-Received: by 2002:a05:6102:dcb:b0:49a:4992:e1d8 with SMTP id ada2fe7eead31-49a5afa1f6fmr5432321137.31.1724999896864; Thu, 29 Aug 2024 23:38:16 -0700 (PDT) MIME-Version: 1.0 References: <20240830061353.841518-1-srinuvasan.a@siemens.com> <87190d5e-7741-43ce-9a91-9bf7f4278496@siemens.com> In-Reply-To: <87190d5e-7741-43ce-9a91-9bf7f4278496@siemens.com> From: Srinuvasan Arjunan Date: Fri, 30 Aug 2024 12:08:05 +0530 Message-ID: Subject: Re: [PATCH] sdk-files/files/relocate-sdk.sh: find only ELF executable before apply patchelf To: Jan Kiszka Cc: srinuvasan.a@siemens.com, isar-users@googlegroups.com Content-Type: multipart/alternative; boundary="000000000000171ca50620e0d6d9" X-Original-Sender: srinuvasanasv@gmail.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=h5UQ2aML; spf=pass (google.com: domain of srinuvasanasv@gmail.com designates 2607:f8b0:4864:20::92f as permitted sender) smtp.mailfrom=srinuvasanasv@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=pass header.i=@googlegroups.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.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,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-TUID: lv8zzvAyHh8r --000000000000171ca50620e0d6d9 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Aug 30, 2024 at 11:59=E2=80=AFAM 'Jan Kiszka' via isar-users < isar-users@googlegroups.com> wrote: > On 30.08.24 08:13, srinuvasan.a@siemens.com wrote: > > From: Srinuvasan A > > > > With the present implementation find statemnt return the regular > > "statement" > > > 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. > > > > "unnecessarily" > > Just for clarity: Is this an optimization or a bug fix? > > Thanks, > Jan > This is the optimization i would say Thanks, Srinu > > > 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=3D$(patchelf --print-interpreter ${binary} 2>/dev/nul= l) > > oldpath=3D${interpreter%/lib*/ld-linux*} > > interpreter=3D${interpreter#${oldpath}} > > -- > Siemens AG, Technology > Linux Expert Center > > -- > You received this message because you are subscribed to the Google Groups > "isar-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to isar-users+unsubscribe@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/isar-users/87190d5e-7741-43ce-9a91-9bf7= f4278496%40siemens.com > . > --=20 You received this message because you are subscribed to the Google Groups "= isar-users" group. To unsubscribe from this group and stop receiving emails from it, send an e= mail to isar-users+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/= isar-users/CAB2Z2nO4-yCgWHXTHmawptvi89cuYPGj6%2BA2nxAOsy488_cWXw%40mail.gma= il.com. --000000000000171ca50620e0d6d9 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Fri, Aug 30, 2024 at 11:59=E2=80= =AFAM 'Jan Kiszka' via isar-users <isar-users@googlegroups.com> wrote:
On 30.08.24 08:13, srinuvasan.a@siemens.com= wrote:
> From: Srinuvasan A <srinuvasan.a@siemens.com>
>
> With the present implementation find statemnt return the regular

"statement"

> 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.
>

"unnecessarily"

Just for clarity: Is this an optimization or a bug fix?

Thanks,
Jan

=C2=A0 =C2=A0This is the optimizati= on i would say

=C2=A0 =C2=A0Thanks,
=C2= =A0 =C2=A0 Srinu=C2=A0

> Signed-off-by: Srinuvasan A <srinuvasan.a@siemens.com>
> ---
>=C2=A0 meta/recipes-devtools/sdk-files/files/relocate-sdk.sh | 2 +-
>=C2=A0 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/recipes-devtools/sdk-files/files/relocate-sdk.sh b/m= eta/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
>=C2=A0
>=C2=A0 echo -n "Adjusting path of SDK to '${new_sdkroot}'.= .. "
>=C2=A0
> -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 = 9;:' '{ print $1 }'); do
>=C2=A0 =C2=A0 =C2=A0 =C2=A0interpreter=3D$(patchelf --print-interpreter= ${binary} 2>/dev/null)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0oldpath=3D${interpreter%/lib*/ld-linux*}
>=C2=A0 =C2=A0 =C2=A0 =C2=A0interpreter=3D${interpreter#${oldpath}}

--
Siemens AG, Technology
Linux Expert Center

--
You received this message because you are subscribed to the Google Groups &= quot;isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to isar-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/isar-= users/87190d5e-7741-43ce-9a91-9bf7f4278496%40siemens.com.

--
You received this message because you are subscribed to the Google Groups &= quot;isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to isar-use= rs+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.go= ogle.com/d/msgid/isar-users/CAB2Z2nO4-yCgWHXTHmawptvi89cuYPGj6%2BA2nxAOsy48= 8_cWXw%40mail.gmail.com.
--000000000000171ca50620e0d6d9--