| 293 | } |
| 294 | |
| 295 | static string |
| 296 | ld_linux_so_path(int version, bool is32bitElf = false) |
| 297 | { |
| 298 | char buf[80]; |
| 299 | |
| 300 | #if (defined(__x86_64__) || defined(__aarch64__) || defined(__riscv)) && !defined(CONFIG_M32) |
| 301 | if (is32bitElf) { |
| 302 | sprintf(buf, "/lib/ld-linux.so.%d", version); |
| 303 | } else { |
| 304 | sprintf(buf, ELF_INTERPRETER); |
| 305 | } |
| 306 | #else // if (defined(__x86_64__) || defined(__aarch64__)) && |
| 307 | // !defined(CONFIG_M32) |
| 308 | sprintf(buf, ELF_INTERPRETER); |
| 309 | #endif // if (defined(__x86_64__) || defined(__aarch64__)) && |
| 310 | // !defined(CONFIG_M32) |
| 311 | |
| 312 | string cmd = buf; |
| 313 | return cmd; |
| 314 | } |
| 315 | |
| 316 | bool |
| 317 | Util::isStaticallyLinked(const char *filename) |