[Lldb-commits] [PATCH] D19480: Fix ARM attribute parsing for Android after rL267291

Renato Golin via lldb-commits lldb-commits at lists.llvm.org
Mon Apr 25 07:17:48 PDT 2016


rengolin added a comment.

In http://reviews.llvm.org/D19480#410620, @tberghammer wrote:

> Both executables and shared libraries are containing ARM Attributes what contains the information about soft-float vs hard-float. I am not sure how accurate it is as in theory you can link together an object file compiled with soft float with a one compiled with hard float but most likely we can trust it to be good enough.


That's only true if one doesn't depend on the other, and only if you can guarantee that hard-float library functions will only be called using AAPCS_VFP and soft-float library functions will only be called with AAPCS.

This is not the kind of guarantee one can do easily. Nor it is recommended that one does so. If Android applications can guarantee that by having two different ABIs for Android specific and user specific, this could work in theory.

> The problem is that currently this information is not stored in the llvm::Triple so if the Environment part of the Triple is set to Android then the information is lost. I can try to recover the data from the architecture flags but I am not convinced that it is always possible and considering that the same executable can contain soft-float and hard-float code on Android we have to treat them as compatible architectures at some point.


The information is not lost, because "Android EABI" is always soft-float, and by definition, you should not be linking hard-float objects with soft-float ones.

Can you elaborate which case you can reach that improbably scenario?

cheers,
--renato


http://reviews.llvm.org/D19480





More information about the lldb-commits mailing list