Currently it uses a path like %p/../.. which does not work in some setups (e.g. with symbolic links and etc).
test/tools/llvm-readobj/program-headers.test is doing the same thing, so you should look at that one too.
Please prefix the commit description with [llvm-readobj]
Use test/tools/llvm-readobj/Inputs/phdrs-elf.exe-x86_64 so that the start will be non-zero, which is what the original patch was fixing.