#define IFUNC_RESOLVER_A(attr, name) __attribute__((returns_nonnull)) (* __attribute__(attr) _ifun__ ## name (void)) // When the ifunc resolver wants to return a function pointer that has attributes on it, the attribute inner list (e.g. `(returns_nonnull, const, nonnull)') can be provided as the first argument
#define IFUNC_RESOLVER_A(attr, name) __attribute__((returns_nonnull)) (* __attribute__(attr) _IFUNC_PREFIX(name) /*_ifun__ ## name*/ (void)) // When the ifunc resolver wants to return a function pointer that has attributes on it, the attribute inner list (e.g. `(returns_nonnull, const, nonnull)') can be provided as the first argument
// If failure to create new fd was caused by `ENOSYS`, it is not available.
// If failure to create new fd was caused by `ENOSYS`, it is not available.
if(fd<0&&errno==ENOSYS)
if(fd<0&&errno==ENOSYS)
@ -52,9 +53,12 @@ int _has_memfd_secret() {
returnok;
returnok;
}
}
intIFUNC_DEF(memfd_secret,(unsignedint));
/// Set as IFUNC target for systems with `memfd_secret()` support enabled.
/// Set as IFUNC target for systems with `memfd_secret()` support enabled.
__attribute__((visibility("hidden")))//XXX: `hidden` is the "can only be accessed outside .so from returned internal function pointer", right? and `internal` is "can *never* be accessed outside of .so"? (TODO: Check. Idk if this is the other way around.)