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; Wed, 04 Sep 2024 03:58:06 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-qv1-f62.google.com (mail-qv1-f62.google.com [209.85.219.62]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 4841w4G1000433 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 4 Sep 2024 03:58:05 +0200 Received: by mail-qv1-f62.google.com with SMTP id 6a1803df08f44-6c3580b7cf5sf53914456d6.3 for ; Tue, 03 Sep 2024 18:58:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1725415078; x=1726019878; darn=ilbers.de; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-sender:mime-version :subject:references:in-reply-to:message-id:to:from:date:sender:from :to:cc:subject:date:message-id:reply-to; bh=8N7jyjUT9JZC847T/wEDuOcoIR2DxmW3qr5o+s3qTRI=; b=MSPVnbm65OBUBmBHpWq6JVa4FVnVbYpprMHj6Fk8/qVXgNqTzcpc+EUjeJ9NOwVTdj 9qcR3TMtc+hm1DFIPguFexOhjjN6oUPIBDhW36cCXUhxpRNlbJCr8lkfPdNct0ndvy5V 4xNeU3TEd1lyL9/2Z5EbaqHoIZ0Cfq/F4ouk7klXMKDb53S3QU4CzB88gUoGsdobFMx6 t1We2ouPvTGj9acZpRVzrn4ZBVaaW0ftmMU2o/YmO424d+Ek3gVI7Zb1BIuqulnmghhT xj9MryGNEUvU7DTlJzxEDVIrFhNE6m+EtnqQrt7VJzKk6iSeOPGneQEFMMQ1HfCFMEL4 8bMw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725415078; x=1726019878; darn=ilbers.de; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-sender:mime-version :subject:references:in-reply-to:message-id:to:from:date:from:to:cc :subject:date:message-id:reply-to; bh=8N7jyjUT9JZC847T/wEDuOcoIR2DxmW3qr5o+s3qTRI=; b=k0K5Zo5a1ro/7j989WgULQyXTK422/XwRAMqBuLR496IUlxmyGIFhphjWHYYMiOpvX Y6zRUxyEQBgZslwO9ipVq+ulwkpxsYDT9Psle/tFpnU5CmjBXh2V26i6oDsDDVrg1rlo pR0rRyn4+kG7+3QIbiRz/Y2pmCAsONDml49nSUaRfRdERZWbWe+dziWlWO7g8JWwvs9t RIB8NLRH8O8G5rvUx3RXQczrAaZyPv4qHRj9P2SEZGoKTM52l+w7fO3S1ozdYvWQtsTr ah/KBxINmW/k+9twHaFP3utwpZtnGwU2PRYDePOkGazzHIS6tOkJyNKmRJzRHsUxSp6c e1oA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725415078; x=1726019878; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-sender:mime-version:subject:references:in-reply-to :message-id:to:from:date:x-beenthere:x-gm-message-state:sender:from :to:cc:subject:date:message-id:reply-to; bh=8N7jyjUT9JZC847T/wEDuOcoIR2DxmW3qr5o+s3qTRI=; b=Is0awo9+VGSmZheADeLA34mg706gMBI+T/YPe1JIdkLQU8WDNeiO4qMujGW+LEqHWq Fd1ddPWdNZRxe1yBi36lp1bsH+ah0rZHgYswGNqemK65jjBjxuj4xlDjPtDsznQxpJTY NQObaSKg/NTsbI2w1/iu4rcspnSOzO2nsQXGmvIx31G+mNFfIMBR9CGGfo3XXvo39VMX B4x/h5ZjkauX74LFAfj/zEJi4v9Zpe8tmxK0ZLiKeMKXvFKcuZ0lw+Iy9owyGKUCVoQX KB/NtFgQosj139kIE5UBnKgF0an7Zj4EekMq0qNtvgec/MK9nEhRUf9aTFSEPniVo5ra jiVQ== Sender: isar-users@googlegroups.com X-Forwarded-Encrypted: i=1; AJvYcCXz4kFNxMH5pi84+abNiIk9wI5isLNOl3MZPBNWfpLEuhL5A0kpyM8PRtd3Y0ARhSs/4JJN@ilbers.de X-Gm-Message-State: AOJu0YwkZ/jDueUdmoWksRcEVKrCQ+0rNtEdKobSFkXBeyvnB9goJ2Pq 4QbuvGq2Wsc247fB54lHUB4hj9mldr47noybyp/QFCySNCoIqd+p X-Google-Smtp-Source: AGHT+IE90DRmWMMaNd+Ao11lrccfCNQt/GZ3WFXX9geF/BO/rNFPyb+uM1zJD6ERYW53cRvP3cIZKg== X-Received: by 2002:a05:6214:4607:b0:6c3:6371:411e with SMTP id 6a1803df08f44-6c3637143b1mr124555696d6.19.1725415078269; Tue, 03 Sep 2024 18:57:58 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:ad4:5ca1:0:b0:6c3:62ce:cbb9 with SMTP id 6a1803df08f44-6c5167f2a10ls6262866d6.0.-pod-prod-01-us; Tue, 03 Sep 2024 18:57:57 -0700 (PDT) X-Received: by 2002:a05:620a:4409:b0:79e:fcb8:815c with SMTP id af79cd13be357-7a80426a574mr2274485185a.54.1725415077324; Tue, 03 Sep 2024 18:57:57 -0700 (PDT) Date: Tue, 3 Sep 2024 18:57:56 -0700 (PDT) From: Srinuvasan Arjunan To: isar-users Message-Id: <6504fd75-8f8e-414b-818d-bbcd7724b07fn@googlegroups.com> In-Reply-To: References: <20240830061353.841518-1-srinuvasan.a@siemens.com> <87190d5e-7741-43ce-9a91-9bf7f4278496@siemens.com> Subject: Re: [PATCH] sdk-files/files/relocate-sdk.sh: find only ELF executable before apply patchelf MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_496456_1072533688.1725415076049" X-Original-Sender: srinuvasanasv@gmail.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: NRqSJftb5/kD ------=_Part_496456_1072533688.1725415076049 Content-Type: multipart/alternative; boundary="----=_Part_496457_359234218.1725415076049" ------=_Part_496457_359234218.1725415076049 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Friday, August 30, 2024 at 12:08:18=E2=80=AFPM UTC+5:30 Srinuvasan Arjun= an wrote: On Fri, Aug 30, 2024 at 11:59=E2=80=AFAM 'Jan Kiszka' via isar-users < isar-...@googlegroups.com> wrote: On 30.08.24 08:13, srinuv...@siemens.com wrote: > From: Srinuvasan A >=20 > 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. >=20 > Actually we are tuning interp and rpath only for ELF executable, hence > added additional condition in the find statement to return only ELF > executable. >=20 > With this change we are avoiding unncessarily checking the interpreter > for non ELF executable files. >=20 "unnecessarily" Just for clarity: Is this an optimization or a bug fix? Thanks, Jan This is the optimization i would say Thanks, Srinu=20 > Signed-off-by: Srinuvasan A > --- > meta/recipes-devtools/sdk-files/files/relocate-sdk.sh | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/meta/recipes-devtools/sdk-files/files/relocate-sdk.sh=20 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 > =20 > echo -n "Adjusting path of SDK to '${new_sdkroot}'... " > =20 > -for binary in $(find ${sdkroot}/usr/bin ${sdkroot}/usr/sbin=20 ${sdkroot}/usr/lib/gcc* -executable -type f); do > +for binary in $(find ${sdkroot}/usr/bin ${sdkroot}/usr/sbin=20 ${sdkroot}/usr/lib/gcc* -executable -type f -exec file {} \; | grep ELF |= =20 awk -F ':' '{ print $1 }'); do > interpreter=3D$(patchelf --print-interpreter ${binary} 2>/dev/null) > oldpath=3D${interpreter%/lib*/ld-linux*} > interpreter=3D${interpreter#${oldpath}} --=20 Siemens AG, Technology Linux Expert Center --=20 You received this message because you are subscribed to the Google Groups= =20 "isar-users" group. To unsubscribe from this group and stop receiving emails from it, send an= =20 email to isar-users+...@googlegroups.com. To view this discussion on the web visit=20 https://groups.google.com/d/msgid/isar-users/87190d5e-7741-43ce-9a91-9bf7f4= 278496%40siemens.com . Hello All, Can you please merge this changes if no objection. Many thanks, Srinu=20 --=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/6504fd75-8f8e-414b-818d-bbcd7724b07fn%40googlegroups.com. ------=_Part_496457_359234218.1725415076049 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

On Friday, August 30, 2024 at 12:08:18= =E2=80=AFPM UTC+5:30 Srinuvasan Arjunan wrote:
On Fri, Aug 30, 2= 024 at 11:59=E2=80=AFAM 'Jan Kiszka' via isar-users <isar-...@googlegroups.com> wrote:
On 30.08.24 08:13, sr= inuv...@siemens.com wrote:
> From: Srinuvasan A <srinuv...@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 optimization i would say

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

> Signed-off-by: Srinuvasan A <srinuv..= .@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 ':'= '{ 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 "= isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to isar-users+...@googlegroups.com.<= br /> To view this discussion on the web visit https://groups.google.com/d/ms= gid/isar-users/87190d5e-7741-43ce-9a91-9bf7f4278496%40siemens.com.

=C2=A0 =C2=A0 = =C2=A0 Hello All,

=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 Can you please merge this changes if no objection.

<= /div>
Many thanks,
Srinu=C2=A0

--
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.google.com/d/msg= id/isar-users/6504fd75-8f8e-414b-818d-bbcd7724b07fn%40googlegroups.com.=
------=_Part_496457_359234218.1725415076049-- ------=_Part_496456_1072533688.1725415076049--