mirror of
https://github.com/NixOS/patchelf.git
synced 2025-10-24 03:12:49 +08:00
Merge branch 'skip-missing' of https://github.com/ttuegel/patchelf
This commit is contained in:
@@ -836,11 +836,18 @@ void ElfFile<ElfFileParamNames>::rewriteHeaders(Elf_Addr phdrAddress)
|
||||
/* no idea if this makes sense, but it was needed for some
|
||||
program */
|
||||
if (!shdr) shdr = findSection2(".rel.got");
|
||||
if (!shdr) error("cannot find .rel.dyn or .rel.got");
|
||||
/* some programs have neither section, but this doesn't seem
|
||||
to be a problem */
|
||||
if (!shdr) continue;
|
||||
dyn->d_un.d_ptr = shdr->sh_addr;
|
||||
}
|
||||
else if (d_tag == DT_RELA) {
|
||||
Elf_Shdr * shdr = findSection2(".rela.dyn");
|
||||
/* some programs lack this section, but it doesn't seem to
|
||||
be a problem */
|
||||
if (!shdr) continue;
|
||||
dyn->d_un.d_ptr = shdr->sh_addr;
|
||||
}
|
||||
else if (d_tag == DT_RELA)
|
||||
dyn->d_un.d_ptr = findSection(".rela.dyn").sh_addr; /* PPC Linux */
|
||||
else if (d_tag == DT_VERNEED)
|
||||
dyn->d_un.d_ptr = findSection(".gnu.version_r").sh_addr;
|
||||
else if (d_tag == DT_VERSYM)
|
||||
|
Reference in New Issue
Block a user