This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: PR ld/5789: Linker doesn't check weak and hidden symbols


On Thu, Feb 28, 2008 at 3:33 PM, Alan Modra <amodra@bigpond.net.au> wrote:
> On Thu, Feb 28, 2008 at 07:02:57AM -0800, H.J. Lu wrote:
>  > On Thu, Feb 28, 2008 at 12:35 AM, Alan Modra <amodra@bigpond.net.au> wrote:
>  > > On Sat, Feb 23, 2008 at 04:11:11PM -0800, H.J. Lu wrote:
>  > >  >       PR ld/5789
>  > >  >       * elflink.c (_bfd_elf_symbol_refs_local_p): Always return true
>  > >  >       for hidden and local symbols.
>  > >
>  > >  HJ, I think this part of your change is correct, but it breaks the ld
>  > >  visibility tests.  Which means the tests are wrong and need fixing
>  > >  too.
>  >
>
> > I tried it on Linux/ia32, Linux/Intel64 and Linux/ia64. There are no
>  > testsuite failures in binutils.
>
>  I see these on powerpc-linux with gcc-3.4.5
>  FAIL: visibility (hidden_undef) (non PIC)
>  FAIL: visibility (hidden_undef) (non PIC, load offset)
>  FAIL: visibility (hidden_undef) (PIC main, non PIC so)
>

The expected linker behavior for those 3 tests is linker error
for hidden undefined symbols. Both ia64 and x86-64 linkers
have check PIC for shared library. They issue an error before
hidden undefined symbol is checked. That is why they are
marked as XFAIL.


H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]