John David Anglin - Re: PATCH: PR 29487 (original) (raw)

This is the mail archive of the gcc-patches@gcc.gnu.orgmailing 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]

The reason this change was made was for the benefit of functions explicitly declared weak; such functions may be replaced by the user at link-time, and we must therefore be conservative in making assumptions about them. The same is not true for COMDAT functions, since all COMDAT functions must be functionally equivalent.

I hope I haven't confused the issue by mentioning "COMDAT" functions. The implementation of "COMDAT" in the 32-bit HP-UX linker predates and differs somewhat from that used in ELF objects.

Within any given link with the HP 32-bit linker, the first instance of a COMDAT function is selected. Thus, if all COMDAT functions are not functionally equivalent, great care must be taken in the ordering of the object modules in a link.

When a link generates a shared object, COMDAT symbols are promoted to universal/global symbols in the library. This gives a user the oportunity to replace a library COMDAT function with one potentially providing different functionality. The stub table in the shared object allows this replacement. Exactly the same behavior is present for secondary symbols (SDEF) which are used for "weak" symbols in HP-UX 11.

I'll try the change ASAP.

Dave

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


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