Hi guys,
I just posted this in gnu.gcc.help a while ago, but google reveals this is where I should have posted on a first instace!
Basically, I compiled a chain for arm-elf last week (bleeding edge versions of all), been writing some code for it, and I'm now wondering if the following could be possible:
Say I want function `foo' to be accessible at link-time for both, armv6 and armv7, being both in the same library.
For this I would write two different functions which I guess would get in depending on what is being defined due to the `-mcpu' command-line option, either `__ARM_ARCH_6M__' or `__ARM_ARCH_7M__' in this case.
Skiming through the docs, it seems I could use the attribute `ifunc ("resolver")', or also the `target' attribute.
But I guess both of them require specific support for each target arch, which seems not to be the case for ARM's as I get something along the lines of "this is not supported on this machine".
Is there anyway this can be done in a "proffesional" way, yet having same name for both versions of the functions?
Thanks,
Eduardo.