diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/relocate_sdk.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/scripts/relocate_sdk.py b/scripts/relocate_sdk.py index b2dd258c34..992db5c47d 100755 --- a/scripts/relocate_sdk.py +++ b/scripts/relocate_sdk.py | |||
@@ -161,7 +161,18 @@ def change_dl_sysdirs(): | |||
161 | # write it back | 161 | # write it back |
162 | f.seek(sh_offset) | 162 | f.seek(sh_offset) |
163 | f.write(new_ldsocache_path) | 163 | f.write(new_ldsocache_path) |
164 | 164 | elif name == b(".gccrelocprefix"): | |
165 | offset = 0 | ||
166 | while (offset + 4096) <= sh_size: | ||
167 | path = f.read(4096) | ||
168 | new_path = old_prefix.sub(new_prefix, path) | ||
169 | # pad with zeros | ||
170 | new_path += b("\0") * (4096 - len(new_path)) | ||
171 | #print "Changing %s to %s at %s" % (str(path), str(new_path), str(offset)) | ||
172 | # write it back | ||
173 | f.seek(sh_offset + offset) | ||
174 | f.write(new_path) | ||
175 | offset = offset + 4096 | ||
165 | if sysdirs != "" and sysdirslen != "": | 176 | if sysdirs != "" and sysdirslen != "": |
166 | paths = sysdirs.split(b("\0")) | 177 | paths = sysdirs.split(b("\0")) |
167 | sysdirs = b("") | 178 | sysdirs = b("") |