[oe-commits] [openembedded-core] 25/28: relocate_sdk: fixed .gccrelocprefix section handling

git at git.openembedded.org git at git.openembedded.org
Sat Mar 26 08:04:34 UTC 2016


rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 7484a9c4956f60fced49b8168c86ea87cf8a17a3
Author: Wenlin Kang <wenlin.kang at windriver.com>
AuthorDate: Wed Mar 23 16:35:48 2016 +0800

    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 at windriver.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 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))

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list