On Friday, August 30, 2024 at 12:08:18 PM UTC+5:30 Srinuvasan Arjunan wrote:
On 30.08.24 08:13, srinuv...@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
This is the optimization i would say
Thanks,
Srinu
> Signed-off-by: Srinuvasan A <srinuv...@siemens.com>
> ---
> 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}}
--
Siemens AG, Technology
Linux Expert Center
Hello All,
Can you please merge this changes if no objection.
Many thanks,
Srinu