[elbe-devel] [PATCH] Prevent SDK segfault for amd64 targets
Torben Hohn
torben.hohn at linutronix.de
Wed Mar 17 11:19:05 CET 2021
On Mon, Mar 15, 2021 at 03:26:07PM +0100, bage at linutronix.de wrote:
> From: Bastian Germann <bage at linutronix.de>
>
> The cross compiler in a SDK generated for amd64 based on Debian buster
> segfaults on execution. Skip elf-patching the rpath in unnecessary cases.
Please be more specific:
All executables in an SDK generated for amd64 based on Debian Buster
segfault on execution. Skip elf-patching the rpath of ld-linux.so.
>
> Fixes #292.
>
> Co-developed-by: Olivier Dion <dion at linutronix.de>
> Signed-off-by: Bastian Germann <bage at linutronix.de>
> Tested-by: Christian Teklenborg <chris at linutronix.de>
with the suggested more specific commit log:
Reviewed-by: Torben Hohn <torben.hohn at linutronix.de>
> ---
> elbepack/makofiles/toolchain-shar-extract.sh.mako | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/elbepack/makofiles/toolchain-shar-extract.sh.mako b/elbepack/makofiles/toolchain-shar-extract.sh.mako
> index 7b3acdbf9..6e07edba6 100644
> --- a/elbepack/makofiles/toolchain-shar-extract.sh.mako
> +++ b/elbepack/makofiles/toolchain-shar-extract.sh.mako
> @@ -355,7 +355,11 @@ done
> # do not skip the interpreter, and do not handle target_executable
> # files yet.
> for exe in $target_elf_files; do
> - \$PATCHELF --set-rpath $native_sysroot/usr/lib/${real_multimach_target_sys}/:$native_sysroot/lib/${real_multimach_target_sys}/:$native_sysroot/usr/lib:$native_sysroot/lib \$exe
> + if [ "${target_elfcode}" = "x86-64" -a \`readlink -f \$exe\` == \`readlink -f $dl_path\` ]; then
> + echo SKIP \$exe
> + else
> + \$PATCHELF --set-rpath $native_sysroot/usr/lib/${real_multimach_target_sys}/:$native_sysroot/lib/${real_multimach_target_sys}/:$native_sysroot/usr/lib:$native_sysroot/lib \$exe
> + fi
> done
>
> for exe in $ascii_so_files; do
> --
> 2.30.2
>
> _______________________________________________
> elbe-devel mailing list
> elbe-devel at linutronix.de
> https://lists.linutronix.de/mailman/listinfo/elbe-devel
--
Torben Hohn
Linutronix GmbH | Bahnhofstrasse 3 | D-88690 Uhldingen-Mühlhofen
Phone: +49 7556 25 999 18; Fax.: +49 7556 25 999 99
Hinweise zum Datenschutz finden Sie hier (Informations on data privacy
can be found here): https://linutronix.de/kontakt/Datenschutz.php
Linutronix GmbH | Firmensitz (Registered Office): Uhldingen-Mühlhofen |
Registergericht (Registration Court): Amtsgericht Freiburg i.Br., HRB700
806 | Geschäftsführer (Managing Directors): Heinz Egger, Thomas Gleixner
More information about the elbe-devel
mailing list