[Bug c/87482] Clarify behaviour of resolvers with parameters in for __attribute__((ifunc))

joseph at codesourcery dot com gcc-bugzilla@gcc.gnu.org
Mon Oct 1 22:51:00 GMT 2018


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87482

--- Comment #3 from joseph at codesourcery dot com <joseph at codesourcery dot com> ---
I expect it's valid to use (void) if that particular IFUNC resolver 
doesn't use the HWCAP information passed, even if the HWCAP information is 
passed to resolvers on that architecture.  And I wouldn't assume resolvers 
are necessarily consistent about which integer type of a given size is 
used - the AArch64 glibc dynamic linker uses uint64_t, for example, but a 
user could well use (unsigned) long int or (unsigned) long long int rather 
than exactly matching what the dynamic linker uses.  (Using a narrower 
integer type if you only care about low bits of the HWCAP is riskier, 
depending on what the ABI says about high bits of the register passing 
such a narrower integer argument.)


More information about the Gcc-bugs mailing list