This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
RISC-V: _init and _fini vs array variants
- From: Florian Weimer <fweimer at redhat dot com>
- To: GNU C Library <libc-alpha at sourceware dot org>, Binutils <binutils at sourceware dot org>
- Cc: DJ Delorie <dj at redhat dot com>
- Date: Fri, 22 Jun 2018 15:35:42 +0200
- Subject: RISC-V: _init and _fini vs array variants
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