This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: duplicate symbols on HP-PA
- To: Marco dot Franzen at thyron dot com
- Subject: Re: duplicate symbols on HP-PA
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- Date: Fri, 17 Nov 2000 12:23:32 -0500 (EST)
- Cc: law at redhat dot com, gcc-bugs at gcc dot gnu dot org, gcc at gcc dot gnu dot org
> My analysis is that weak does not work (reliably) on this platform:
> I get multiple copies of weak functions (at least sometimes),
> which want to use different copies of local static data.
> So we need to fold the data in addition to (or instead of) the attempt
> at folding the functions themselves.
As I think about this, multiple copies are not in itself a problem.
However, all references need to be folded to a unique copy. Both
the assembler and linker are involved in this process. The command
`objdump -d -r' can provide information about the relocation information
present in object modules. Possibly, the linker isn't seeing all the
references to weak procedures in a module and this results in the
multiple active copies.
It is relatively simple to build gcc on the pa without weak support.
Just turn off HAVE_GAS_WEAK in auto-host.h or edit out the last few lines
in config/pa/som.h. This doesn't fix the weak issue but it might give
you a compiler that works for your purpose.
Dave
--
J. David Anglin dave.anglin@nrc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)