A possible way to link integer only library with hard float-abi app?
Wed Dec 11 09:35:00 GMT 2013
Instructions in the library and hard float-abi app are all supported
by my target. And there is no floating point function call between
those two parts. So the final ELF file by linking them together should
be OK to run on my target. But such link is prevented by linker
because the integer only library is soft float-abi and the app is hard
float-abi. I know the softfp float-abi can work here. But I do need
hard float-abi for my app. I then checked the linker code and found
that if integer only library has attribute (Tag_ABI_FP_number_model ==
0), such check won't be happen, so library and app can be linked.
I am wondering if it is possible to enhance gcc to check whether the
current file uses floating point, if there is no floating point at
all, then set the Tag_ABI_FP_number_model of object file to zero.
Does this make sense? If so, where should I start? Please help.
More information about the Gcc-help