duplicate symbols on HP-PA

John David Anglin dave@hiauly1.hia.nrc.ca
Fri Nov 17 09:23:00 GMT 2000


> 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)


More information about the Gcc mailing list