| 314 | } |
| 315 | |
| 316 | bool |
| 317 | Util::isStaticallyLinked(const char *filename) |
| 318 | { |
| 319 | bool isElf, is32bitElf; |
| 320 | char pathname[PATH_MAX]; |
| 321 | |
| 322 | expandPathname(filename, pathname, sizeof(pathname)); |
| 323 | elfType(pathname, &isElf, &is32bitElf); |
| 324 | |
| 325 | int version = 2; |
| 326 | string cmd; |
| 327 | do { |
| 328 | cmd = ld_linux_so_path(version, is32bitElf); |
| 329 | version++; |
| 330 | } while (!jalib::Filesystem::FileExists(cmd) && version < 10); |
| 331 | |
| 332 | cmd = cmd + " --verify " + pathname + " > /dev/null"; |
| 333 | |
| 334 | // FIXME: When tested on dmtcp/test/pty.c, 'ld.so -verify' returns |
| 335 | // nonzero status. Why is this? It's dynamically linked. |
| 336 | if (isElf && safeSystem(cmd.c_str())) { |
| 337 | return true; |
| 338 | } |
| 339 | return false; |
| 340 | } |
| 341 | |
| 342 | static string |
| 343 | getScreenDir() |
nothing calls this directly
no test coverage detected