File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change 3
3
# Use of this source code is governed by a BSD-style license that can be
4
4
# found in the LICENSE file.
5
5
6
- set -eo pipefail
6
+ set -euo pipefail
7
7
umask 0022
8
8
9
9
OEM_MNT=" /usr/share/oem"
@@ -396,9 +396,20 @@ call_cgpt() {
396
396
397
397
# locate the dynamic linker
398
398
LDSO=
399
- for l in " ${INSTALL_MNT} " /lib* /ld-2.?? .so; do
399
+
400
+ # While glibc 2.33 has /lib64/ld-2.33.so, glibc 2.34 does not have
401
+ # that, but only /lib64/ld-linux-x86-64.so.2. So we should also check
402
+ # ld-linux-* as well.
403
+ #
404
+ # glibc 2.35 installs a symlink to the dynamic linker under
405
+ # /usr/bin/ld.so. Check this one too.
406
+ #
407
+ # Since we derive library path from the linker path, make sure we are
408
+ # dealing with the actual executable, not with a symlink. We do it by
409
+ # using realpath on the found file.
410
+ for l in " ${INSTALL_MNT} " /{,usr/}bin/ld.so " ${INSTALL_MNT} " /lib* /ld-2.?? .so " ${INSTALL_MNT} " /lib* /ld-linux-* .so.? ; do
400
411
if [[ -x " $l " ]]; then
401
- LDSO=" $l "
412
+ LDSO=$( realpath " $l " )
402
413
break
403
414
fi
404
415
done
You can’t perform that action at this time.
0 commit comments