RISC-V: _init and _fini vs array variants

Florian Weimer fweimer@redhat.com
Fri Jun 22 13:35:00 GMT 2018


RISC-V doesn't have _init and _fini, it seems.  At least the glibc code 
avoids calling these functions for main programs even if they are defined.

Are they simply undefined, or are they defined and repeated in the array?

Could we use a weak reference in generic code to simplify things?

I also notice that the dynamic loader, for shared objects, still looks 
for DT_INIT and DT_FINI.  Presumably, this is harmless because they are 
never present on RISC-V?

Thanks,
Florian



More information about the Libc-alpha mailing list