This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: PATCH: PR ld/4409: --unresolved-symbols=ignore-all issues on ia64
On Tue, Jul 03, 2007 at 07:57:52PM +0200, Andreas Schwab wrote:
> "H.J. Lu" <hjl@lucon.org> writes:
>
> > --- binutils/ld/testsuite/ld-ia64/error3.d.error 2007-07-03 09:43:00.000000000 -0700
> > +++ binutils/ld/testsuite/ld-ia64/error3.d 2007-07-03 09:43:17.000000000 -0700
> > @@ -0,0 +1,7 @@
> > +#source: error1.s
> > +#ld: -pie -shared
> > +#readelf: -s
> > +
> > +#...
> > +[ ]+[0-9]+:[ ]+[0]+[ ]+0[ ]+NOTYPE[ ]+GLOBAL DEFAULT[ ]+UND[ ]+foo
> > +#pass
> > --- binutils/ld/testsuite/ld-ia64/error4.d.error 2007-07-03 09:56:43.000000000 -0700
> > +++ binutils/ld/testsuite/ld-ia64/error4.d 2007-07-03 10:23:18.000000000 -0700
> > @@ -0,0 +1,3 @@
> > +#source: error1.s
> > +#ld: -shared -pie
> > +#error: .*undefined reference to `foo'
>
> The order of arguments should not change the behaviour. The combination
> of -shared with -pie should be an error instead.
>
Now the question is what linker should do when 2 exclusive options,
like:
-shared, -Bshareable Create a shared library
-pie, --pic-executable Create a position independent executable
are given at the same time. Linker can issue an error or let the
last one wins. I am OK with either choice. What do people perfer?
Whatever we do, we should be consistent.
H.J.