| ... | ... | @@ -198,7 +198,6 @@ pub const ElfDynLib = struct { |
| 198 | 198 | // - DT_RUNPATH of the calling binary is not used as a search path |
| 199 | 199 | // - /etc/ld.so.cache is not read |
| 200 | 200 | fn resolveFromName(io: Io, path_or_name: []const u8, LD_LIBRARY_PATH: ?[]const u8) !Io.File { |
| 201 | | // If filename contains a slash ("/"), then it is interpreted as a (relative or absolute) pathname |
| 202 | 201 | if (std.mem.findScalarPos(u8, path_or_name, 0, '/')) |_| { |
| 203 | 202 | return Io.Dir.cwd().openFile(io, path_or_name, .{}); |
| 204 | 203 | } |
| ... | ... | @@ -214,9 +213,10 @@ pub const ElfDynLib = struct { |
| 214 | 213 | } |
| 215 | 214 | } |
| 216 | 215 | |
| 217 | | // Lastly the directories /lib and /usr/lib are searched (in this exact order) |
| 218 | 216 | if (resolveFromParent(io, "/lib", path_or_name)) |file| return file; |
| 217 | if (resolveFromParent(io, "/lib64", path_or_name)) |file| return file; |
| 219 | 218 | if (resolveFromParent(io, "/usr/lib", path_or_name)) |file| return file; |
| 219 | if (resolveFromParent(io, "/usr/lib64", path_or_name)) |file| return file; |
| 220 | 220 | return error.FileNotFound; |
| 221 | 221 | } |
| 222 | 222 | |