relocate_sdk.py: Fix corruption of sdk binaries
authorJason Wessel <jason.wessel@windriver.com>
Tue, 12 Feb 2013 11:08:21 +0000 (05:08 -0600)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 12 Feb 2013 13:11:21 +0000 (13:11 +0000)
commitdec11d73299cecf5a3017a55316e7a93238864e7
tree80cecbae63fbf1ac8643125351aaabc6fb9c3c15
parent00c1084d71f40f3abd931d010070f4c788053e23
relocate_sdk.py: Fix corruption of sdk binaries

There are two cases of corruption that the relocate_sdk.py was not correctly
dealing with.

1) SDK Extras should be left alone
   Extra external binaries included in an SDK that were linked against the
   host's version of /usr/lib/ld-so.so should not get a relocation applied.
   In the case that was discovered these were LSB compliant binaries that
   already worked on many hosts.

2) If the interp section is too small generate an error
   In the case of the qemu user code, it was using its own .ld file
   to link the executables which overrides the default in the nativesdk
   binutils.  This generated host executables which had a interp section
   that was too small to relocate.

   Now the relocate_sdk.py will print an error and continue on such that
   the error can be fixed by a developer without having to do the
   difficult task of debugging why it is crashing or not loading correctly.

(From OE-Core rev: 3752a9c6d772b39bbe04d62ef4d3527b4c7198c1)

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/relocate_sdk.py