[yocto] [prelink-cross][patch] Fix ifunc on x86_64 x32

Mark Hatle mark.hatle at windriver.com
Fri Dec 9 09:36:36 PST 2016


Thanks.  I try to get this merged soon.

--Mark

On 12/9/16 11:34 AM, Andrew Stubbs wrote:
> Hi Mark,
> 
> The ifunc1, ifunc2, and ifunc3 tests currently fail on x86_64 x32 ABI 
> because the testcase crashes at runtime. The testcases run fine when not 
> prelinked.
> 
> In the case of ifunc1, the test tries to call the "lib2t2" function 
> directly, instead of using it as an indirect call, which leads to the 
> testcase aborting. In real code this would not cause an immediate crash, 
> but presumably would lead to undefined behaviour.
> 
> The attached patch fixes the problem by converting R_X86_64_32 conflict 
> relocations to R_X86_64_IRELATIVE (in the same way as R_X86_64_64 
> relocations are).
> 
> I've tested this with the cross_prelink branch and a suitably configured 
> cross-toolchain. I expect it would be fine on the master branch also, 
> but I can't test that.
> 
> Andrew Stubbs
> Mentor Graphics/CodeSourcery
> 




More information about the yocto mailing list