relocate_sdk.py: new interpreter string was not '\0' terminated

The problem: SDK binaries were not properly relocated when the SDK
was installed into a path that had a length less than the default one.
Apparently, there were two problems here: the padding was done wrong
(the size of one program header table entry was used instead of the
program section size) and the new padded string was not used at all.

[YOCTO #3655]

(From OE-Core rev: 0b4287dae51f7a4175c0ad3cadbec6cdf0b43866)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Laurentiu Palcu
2013-01-07 15:07:04 +02:00
committed by Richard Purdie
parent 5dc116295f
commit acb6a67773

View File

@@ -89,8 +89,8 @@ def change_interpreter():
if p_type == 3:
# PT_INTERP section
f.seek(p_offset)
dl_path = new_dl_path + "\0" * (e_phentsize - len(new_dl_path))
f.write(new_dl_path)
dl_path = new_dl_path + "\0" * (p_filesz - len(new_dl_path))
f.write(dl_path)
break
def change_dl_sysdirs():