This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug middle-end/24827] FAIL: gcc.dg/attr-weakref-1.c



------- Comment #6 from dave at hiauly1 dot hia dot nrc dot ca  2005-11-19 02:36 -------
Subject: Re:  FAIL: gcc.dg/attr-weakref-1.c

> Does this target actually support weak declarations?  It appears to me that it
> only does when the assembler supports .weak, but even then, the linker will
> object to undefined weak symbols, which is something this test relies on.  I
> suppose we'd have to mark it as an XFAIL on hpux, or use some alternate
> dg-require to indicate we need the ability to refer to undefined weak symbols.

I started looking at the weakref failures in GAS in order to see whether
this feature should be disabled in the assembler.

One issue that I see is weak local symbols.  These are being emitted
by GAS under linux and they cause testsuite fails under HP-UX as they
come out as global under HP-UX.  Weak local symbols are impossible on
the HP-UX SOM port and probably on the 64-bit ELF port.  On the SOM
port, the secondary definition symbols used for weak symbols are always
global in scope.  It would seem to me that GAS doesn't have to emit
undefined weak local symbols, and defined weak local symbols should
just be local.  If that were possible, it would definitely improve
the usefulness of weak references under HP-UX.  However, undefined
weak references with global scope will always be a problem under HP-UX.

I've tried in the past to see if it's possible to support undefined
weak symbols.  While it's possible to suppress the linker error, the
dynamic loader generates an error when it encounters an undefined
symbol.  As far as I know, there's no way to suppress this error.

Dave


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24827


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