Date: Sun, 27 Dec 1998 13:13:30 -0500 From: Ian Lance Taylor <ian@cygnus.com> To: kaleb@ics.com Cc: hackers@FreeBSD.ORG, bug-gnu-utils@gnu.org Subject: Re: ld (bfd): wrong function names for ELF shared library DT_{INIT,FINI} Message-ID: <199812271813.NAA29995@subrogation.cygnus.com> In-Reply-To: <36865D18.1CFBAE39@ics.com> (kaleb@ics.com)
next in thread | previous in thread | raw e-mail | index | archive | help
Date: Sun, 27 Dec 1998 11:15:21 -0500 From: "Kaleb S. KEITHLEY" <kaleb@ics.com> The ELF specification says that the names of the DT_{INIT,FINI} functions in shared libraries are named .init() and .fini(), not _init() and _fini(). No, it discusses section names, not symbol names. The ELF spec does not say how the DT_INIT and DT_FINI tags should be set. In general, the ELF spec describes how to execute an ELF object, not how to create one. That is, it specifies kernel behaviour, not linker behaviour. The original SVR4 linker automatically used _init and _fini for DT_INIT and DT_FINI. The GNU linker is compatible. Other ELF based linkers, such as the Irix 6 linker, act differently. See the print editions of the System V ABI (where ELF is defined) or http://www.sco.com/developer/gabi/ch4.sheader.html#special_sections for more information. Read it again. It's talking about section names. The symbol names _init and _fini conventionally appear in crti.o on SVR4 systems, and serve to indicate the start of the .init and .fini sections. Ian To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199812271813.NAA29995>