def METHOD_NAME(fake_elf):
    elf_file = fake_elf("fake_elf-bad-patchelf")
    # The base_path does not matter here as there are not files to
    # be crawled for.
    elf_patcher = elf.Patcher(dynamic_linker="/lib/fake-ld", root_path=Path("/fake"))
    with pytest.raises(errors.PatcherError) as raised:
        elf_patcher.patch(elf_file=elf_file)
    assert raised.value.path == Path("fake_elf-bad-patchelf")
    assert raised.value.code == 1