]> code.ossystems Code Review - openembedded-core.git/commitdiff
relocate_sdk.py: skip debug files from relocation
authorNikunj Kela <nkela@cisco.com>
Tue, 14 Feb 2017 18:15:28 +0000 (18:15 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 8 Mar 2017 11:13:47 +0000 (11:13 +0000)
Debug files only have debug symbols hence don't need
to be relocated. Relocation script throws errors when
run on the debug files. This change skips these files
that have zero size.

(From OE-Core rev: 132e8bfd499c713eb63075fd6380317b60f0bd27)

Signed-off-by: Nikunj Kela <nkela@cisco.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Ross Burton <ross.burton@intel.com>
scripts/relocate_sdk.py

index e47b4d916ed5a396d82a8c4e05b7eb0fa786a816..c752fa2c6192c9246dce89bf5c68244d54482e9a 100755 (executable)
@@ -103,6 +103,8 @@ def change_interpreter(elf_file_name):
                fname.startswith(b("/lib32/")) or fname.startswith(b("/usr/lib32/")) or \
                fname.startswith(b("/usr/lib32/")) or fname.startswith(b("/usr/lib64/")):
                 break
+            if p_filesz == 0:
+                break
             if (len(new_dl_path) >= p_filesz):
                 print("ERROR: could not relocate %s, interp size = %i and %i is needed." \
                     % (elf_file_name, p_memsz, len(new_dl_path) + 1))