diff options
author | Wenlin Kang <wenlin.kang@windriver.com> | 2016-03-23 16:35:48 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-03-28 15:54:51 +0100 |
commit | c43192c46bb1759bf6909190b89d3b60918777c5 (patch) | |
tree | 9ee77b42f9bf62367767ab35dcbaa68ea3fd0f1e | |
parent | 351064e9c5deb6411c8a0d40ebd4fd4f83299d4e (diff) | |
download | openembedded-core-c43192c46bb1759bf6909190b89d3b60918777c5.tar.gz openembedded-core-c43192c46bb1759bf6909190b89d3b60918777c5.tar.bz2 openembedded-core-c43192c46bb1759bf6909190b89d3b60918777c5.zip |
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.
Signed-off-by: Wenlin Kang <wenlin.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-x | scripts/relocate_sdk.py | 1 |
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(): 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)) |