From dcc87c6800c2c399f625f831d9b6a15525b3e10e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Wed, 17 Nov 2021 14:51:39 +0100 Subject: [PATCH] shared/base-filesystem: add define for arm64 https://wiki.debian.org/ArchitectureSpecificsMemo: > arm64 aarch64-linux-gnu 64 AARCH64 /lib/ld-linux-aarch64.so.1 aarch64 aarch64 Fedora: $ ls -l /lib /lib64 lrwxrwxrwx. 1 root root 7 Jul 27 2020 /lib -> usr/lib lrwxrwxrwx. 1 root root 9 Jul 27 2020 /lib64 -> usr/lib64 $ ldd /bin/sh|grep ld /lib/ld-linux-aarch64.so.1 (0x0000ffff8c905000) $ ls -l /lib/ld-linux-aarch64.so.1 /lib64/ld-2.32.so lrwxrwxrwx. 1 root root 19 Jul 13 07:28 /lib/ld-linux-aarch64.so.1 -> ../lib64/ld-2.32.so -rwxr-xr-x. 1 root root 961248 Jul 13 07:56 /lib64/ld-2.32.so $ uname -r 5.14.16-101.fc33.aarch64 So we need both /lib and /lib64 to be present, even though the canonical linker path uses /lib. --- src/shared/base-filesystem.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/shared/base-filesystem.c b/src/shared/base-filesystem.c index 90fc5282a1f..a07cd22e7ed 100644 --- a/src/shared/base-filesystem.c +++ b/src/shared/base-filesystem.c @@ -46,6 +46,12 @@ static const BaseFilesystem table[] = { * create the symlink as needed should it be missing. We prefer doing this consistently with Debian's * multiarch logic, but support Fedora-style multilib too.*/ #if defined(__aarch64__) + /* aarch64 ELF ABI actually says dynamic loader is in /lib/, but Fedora puts it in /lib64/ anyway and + * just symlinks /lib/ld-linux-aarch64.so.1 to ../lib64/ld-linux-aarch64.so.1. For this to work + * correctly, /lib64/ must be symlinked to /usr/lib64/. */ + { "lib64", 0, "usr/lib/aarch64-linux-gnu\0" + "usr/lib64\0", "ld-linux-aarch64.so.1" }, +# define KNOW_LIB64_DIRS 1 #elif defined(__alpha__) #elif defined(__arc__) || defined(__tilegx__) #elif defined(__arm__) -- 2.47.3