summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorWenlin Kang <wenlin.kang@windriver.com>2016-03-23 16:35:48 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-03-28 15:55:50 +0100
commitc3c793b4286367b7050c8ec92fb90a1a9f85a89a (patch)
treec3053f2807629ad2a305d389152933d5d99f474a /scripts
parentcc97d5760100415ed22fa329e8962e5f37b8d741 (diff)
downloadpoky-c3c793b4286367b7050c8ec92fb90a1a9f85a89a.tar.gz
relocate_sdk: fixed .gccrelocprefix section handling
When fixing paths for .gccrelocprefix section, it will corrupt the next entry during updating the current one if "new_prefix" length is more than "DEFAULT_INSTALL_DIR", this problem is obvious on the code, but it's only found when install sdk onto a net file system. (From OE-Core rev: c43192c46bb1759bf6909190b89d3b60918777c5) Signed-off-by: Wenlin Kang <wenlin.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/relocate_sdk.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/scripts/relocate_sdk.py b/scripts/relocate_sdk.py
index 992db5c47d..ceca1f2563 100755
--- a/scripts/relocate_sdk.py
+++ b/scripts/relocate_sdk.py
@@ -166,6 +166,7 @@ def change_dl_sysdirs():
166 while (offset + 4096) <= sh_size: 166 while (offset + 4096) <= sh_size:
167 path = f.read(4096) 167 path = f.read(4096)
168 new_path = old_prefix.sub(new_prefix, path) 168 new_path = old_prefix.sub(new_prefix, path)
169 new_path = new_path.rstrip(b("\0"))
169 # pad with zeros 170 # pad with zeros
170 new_path += b("\0") * (4096 - len(new_path)) 171 new_path += b("\0") * (4096 - len(new_path))
171 #print "Changing %s to %s at %s" % (str(path), str(new_path), str(offset)) 172 #print "Changing %s to %s at %s" % (str(path), str(new_path), str(offset))