[committed] Testsuite changes re HP-UX weak support

John David Anglin dave@hiauly1.hia.nrc.ca
Tue Mar 8 03:24:00 GMT 2005


> On Mon, 7 Mar 2005, John David Anglin wrote:
> 
> > The change to g++.dg/warn/weak1.C to skip the test on hppa*-*-hpux*
> > is a known issue with the weak support on this target.  The other
> 
> Is it then considered that this is a limitation of the system on HPPA 
> HP-UX (so the test should be skipped as not applicable there) but a bug in 
> GCC on IA64 HP-UX (so the test should run, whether as FAIL or XFAIL)?  
> Because (bug 19887) the test fails the same way on both.  If it's the same 
> linker issue which is a known property of HP-UX then skipping on *-*-hpux* 
> would seem more appropriate.

As I noted in the comment, the HPPA dynamic loader doesn't allow
unsatisfied symbols in the main application.  It's possible to build
an application on hppa64 using the +allowunstats ld option.  However,
it will not run successfully due to the dynamic loader issue (I haven't
tried a static executable).  I know the same is true for secondary
definition symbols using the 32-bit linker.  I had previously hacked
a version of the linker to allow building a final executable with
unsats and hit the same problem with the dynamic loader.  I suspect
both the 32 and 64-bit linkers are using similar code.  Don't know
about ia64 but it may well have the same problem.

I consider the problem a system limitation rather than a GCC bug.
That said, the HP assemblers for the PA don't support weak.  Most
HP compilers generate binaries directly and there is minimal
documentation regarding the capability of the linker and dynamic
loader.  We could stop using weak.  The available one-only support
seems adequate for C++.  On the otherhand, we have had the 32-bit
weak support since 3.3 and the 64-bit weak support since 3.0.

The following fail on hppa2.0w is another limitation of secondary
definition symbols:

FAIL: gcc.dg/special/weak-1.c execution test

In this case, the HP linker choses a secondary definition over
a primary definition.  I think there should be a bug report to HP
on this one.  It would also be nice if the HP weak support was
compatible with the ELF specification.

I originally tried XFAILing the test but it still failed, so I changed
to skipping it.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)



More information about the Gcc-patches mailing list