Projects
Mega:24.03:SP1:Everything
chrpath
_service:tar_scm:chrpath-fix-mips-segfault.patch
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:tar_scm:chrpath-fix-mips-segfault.patch of Package chrpath
--- chrpath-0.18.orig/killrpath.c +++ chrpath-0.18/killrpath.c @@ -78,10 +78,26 @@ dynpos = 0; for (i = 0; DYNSS(i, d_tag) != DT_NULL; i++) { - if (is_e32()) + if (is_e32()) { ((Elf32_Dyn *)dyns)[dynpos] = ((Elf32_Dyn *)dyns)[i]; - else +#ifdef DT_MIPS_RLD_MAP_REL + /* DT_MIPS_RLD_MAP_REL is relative to the offset of the tag. + Adjust it consequently. */ + if (DYNSS(i, d_tag) == DT_MIPS_RLD_MAP_REL) + ((Elf32_Dyn *)dyns)[dynpos].d_un.d_val = + DO_SWAPU32(DYNSU(i, d_un.d_val) + + (i - dynpos) * sizeof(Elf32_Dyn)); +#endif + } else { ((Elf64_Dyn *)dyns)[dynpos] = ((Elf64_Dyn *)dyns)[i]; +#ifdef DT_MIPS_RLD_MAP_REL + /* Ditto */ + if (DYNSS(i, d_tag) == DT_MIPS_RLD_MAP_REL) + ((Elf64_Dyn *)dyns)[dynpos].d_un.d_val = + DO_SWAPU64(DYNSU(i, d_un.d_val) + + (i - dynpos) * sizeof(Elf64_Dyn)); +#endif + } if ( ! elf_dynpath_tag(DYNSS(i, d_tag)) ) dynpos++; }
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2