Evan Green a29bb320a1
riscv: Enable multi-arg ifunc resolvers
RISC-V is apparently the first architecture to pass more than one
argument to ifunc resolvers. The helper macros in libc-symbols.h,
__ifunc_resolver(), __ifunc(), and __ifunc_hidden(), are incompatible
with this. These macros have an "arg" (non-final) parameter that
represents the parameter signature of the ifunc resolver. The result is
an inability to pass the required comma through in a single preprocessor
argument.

Rearrange the __ifunc_resolver() macro to be variadic, and pass the
types as those variable parameters. Move the guts of __ifunc() and
__ifunc_hidden() into new macros, __ifunc_args(), and
__ifunc_args_hidden(), that pass the variable arguments down through to
__ifunc_resolver(). Then redefine __ifunc() and __ifunc_hidden(), which
are used in a bunch of places, to simply shuffle the arguments down into
__ifunc_args[_hidden]. Finally, define a riscv-ifunc.h header, which
provides convenience macros to those looking to write ifunc selectors
that use both arguments.

Signed-off-by: Evan Green <evan@rivosinc.com>
Reviewed-by: Florian Weimer <fweimer@redhat.com>
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
2024-03-01 07:14:59 -08:00
..
2021-06-22 12:09:52 -03:00
2023-05-01 19:33:21 +02:00
2021-06-15 10:42:11 -03:00
2021-06-15 10:42:11 -03:00
2017-04-07 07:45:53 -04:00
2024-02-01 11:02:01 +00:00
2021-07-22 18:38:04 +05:30
2021-09-15 22:57:35 +00:00
2021-06-30 08:43:37 +02:00
2023-10-24 12:30:59 +02:00
2023-05-01 09:08:59 -04:00
2019-05-02 11:42:51 +02:00
2023-10-24 12:30:59 +02:00
2019-10-09 17:48:41 -03:00
2024-01-03 12:07:14 +00:00
2024-02-01 11:02:01 +00:00
2024-02-01 11:02:01 +00:00
2021-06-30 08:43:37 +02:00
2019-11-06 09:20:52 -03:00
2024-02-01 11:02:01 +00:00