[OE-core] [PATCH 1/2] relocate_sdk: fixed .gccrelocprefix section handling
Wenlin Kang
wenlin.kang at windriver.com
Wed Mar 23 08:35:48 UTC 2016
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.
Signed-off-by: Wenlin Kang <wenlin.kang at windriver.com>
---
scripts/relocate_sdk.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/scripts/relocate_sdk.py b/scripts/relocate_sdk.py
index 992db5c..ceca1f2 100755
--- a/scripts/relocate_sdk.py
+++ b/scripts/relocate_sdk.py
@@ -166,6 +166,7 @@ def change_dl_sysdirs():
while (offset + 4096) <= sh_size:
path = f.read(4096)
new_path = old_prefix.sub(new_prefix, path)
+ new_path = new_path.rstrip(b("\0"))
# pad with zeros
new_path += b("\0") * (4096 - len(new_path))
#print "Changing %s to %s at %s" % (str(path), str(new_path), str(offset))
--
1.9.1
More information about the Openembedded-core
mailing list