Subject: ELF's _init and _fini symbols
To: None <current-users@netbsd.org>
From: Chris Jones <chris@cjones.org>
List: current-users
Date: 03/06/2000 12:34:16
I'm trying to build PostgreSQL with ODBC support, and the build
(eventually) gives me:
cc -shared -Wl,-soname -Wl,libpsqlodbc.so.0 -o .libs/libpsqlodbc.so.0.25 info.lo bind.lo columninfo.lo connection.lo convert.lo drvconn.lo environ.lo execute.lo lobj.lo misc.lo options.lo pgtypes.lo psqlodbc.lo qresult.lo results.lo socket.lo parse.lo statement.lo gpps.lo tuple.lo tuplelist.lo dlg_specific.lo
psqlodbc.lo: In function `_init':
psqlodbc.lo(.text+0x0): multiple definition of `_init'
/usr/lib/crtbeginS.o(.init+0x0): first defined here
/usr/bin/ld: Warning: size of symbol `_init' changed from 48 to 47 in psqlodbc.lo
psqlodbc.lo: In function `_fini':
psqlodbc.lo(.text+0x30): multiple definition of `_fini'
/usr/lib/crtbeginS.o(.fini+0x0): first defined here
/usr/bin/ld: Warning: size of symbol `_fini' changed from 29 to 10 in psqlodbc.lo
collect2: ld returned 1 exit status
So, _init and _fini are shared lib initialization functions, right?
Why can't the program define those? Does the ELF spec have something
to say about this business? The code in init() looks pretty
important, though fini() doesn't, FWIW.
Chris
--
-----------------------------------------------------chris@cjones.org
Chris Jones cjones@honors.montana.edu
Mad scientist at large
"Is this going to be a stand-up programming session, sir, or another bug hunt?"