Re: Re: [ODBC] Re: [PATCHES] Fix for ODBC closeu

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, PostgreSQL odbc list <pgsql-odbc(at)postgresql(dot)org>, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Re: [ODBC] Re: [PATCHES] Fix for ODBC closeu
Date: 2001-02-10 11:31:12
Message-ID: 200102101131.GAA12417@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-odbc pgsql-patches

> > > Bruce Momjian writes:
> > >
> > > > I have applied the following patch to properly exit ODBC. I also
> > > > patched the ODBC makefile so it links under BSD/OS. The -Bsymbolic
> > > > under BSD/OS is very harsh under BSD/OS, requiring all symbols even in
> > > > libc and crt1.o to be resolved before creating the shared library.
> > >
> > > The -Bsymbolic switch is the same on all platforms that have it. You can
> > > link without it, but then you won't actually be able to use the ODBC
> > > driver. It seems like you need to link in a few other libraries to
> > > resolve all symbols.
> >
> > OK, if this is true on all platforms, why isn't -lc needed?
> >
>
> And if -lc is somehow done by default with ld -Bsymbolic, how do I deal
> with a link that accesses crt1.o startup symbols, like environ and
> __progname?
>

OK, the following fixes the link on BSDI, while allowing -Bsymbolic. I
have to explicitly include -R crt1.o to be used to resolve symbols, but
not to be linked in. Without -R, I get undefined 'main' which makes
sense.

I am still confused why other OS's work, unless -lc is assumed by ld,
and their libc's have no crt1.o references.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

Attachment Content-Type Size
unknown_filename text/plain 854 bytes

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2001-02-10 11:53:36 Open 7.1 items
Previous Message Bruce Momjian 2001-02-10 10:57:56 Re: [ODBC] Re: [PATCHES] Fix for ODBC closeu

Browse pgsql-odbc by date

  From Date Subject
Next Message Peter Eisentraut 2001-02-10 11:53:44 Re: [PATCHES] Fix for ODBC close
Previous Message Bruce Momjian 2001-02-10 10:57:56 Re: [ODBC] Re: [PATCHES] Fix for ODBC closeu

Browse pgsql-patches by date

  From Date Subject
Next Message Peter Eisentraut 2001-02-10 11:53:44 Re: [PATCHES] Fix for ODBC close
Previous Message Bruce Momjian 2001-02-10 10:57:56 Re: [ODBC] Re: [PATCHES] Fix for ODBC closeu