]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
util/grub.d/10_hurd.in: Find proper ld.so on 64-bit systems
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Tue, 23 Jan 2024 20:47:56 +0000 (21:47 +0100)
committerDaniel Kiper <daniel.kiper@oracle.com>
Thu, 25 Jan 2024 17:24:35 +0000 (18:24 +0100)
The 64-bit ABI defines ld.so to be /lib/ld-x86-64.so.1.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
util/grub.d/10_hurd.in

index 7d1e463910475084fb406659cd9e256ecdfbb0b7..f9c394ecb1c824e934970f870cb7649de1889e54 100644 (file)
@@ -91,7 +91,14 @@ if ${at_least_one} ; then : ; else
   exit 0
 fi
 
-if ${all_of_them} && test -e /lib/ld.so.1 ; then : ; else
+if test -e '/lib/ld.so.1' ; then
+  LD_SO=/lib/ld.so.1
+fi
+if test -e '/lib/ld-x86-64.so.1' ; then
+  LD_SO=/lib/ld-x86-64.so.1
+fi
+
+if ${all_of_them} && test -n "$LD_SO" ; then : ; else
   gettext "Some Hurd stuff found, but not enough to boot." >&2
   echo >&2
   exit 1
@@ -210,7 +217,7 @@ EOF
                        $host_ports \\
                        --exec-server-task='\${exec-task}' -T typed '\${root}' \\
                        '\$(fs-task=task-create)' $resume_task
-       module          /lib/ld.so.1 exec /hurd/exec '\$(exec-task=task-create)'
+       module          $LD_SO exec /hurd/exec '\$(exec-task=task-create)'
 }
 EOF