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

C++ -fno-weak with template instantiations


The documentation for "-fno-weak" still states that:

Do not use weak symbol support, even if it is provided by the linker.
By default, G++ will use weak symbols if they are available.  This
option exists only for testing, and should not be used by end-users;
it will result in inferior code and has no benefits.  This option may
be removed in a future release of G++.

However, this option is indispensible when generating relocatable
objects (ld -r) which need to have "strong" definitions of template
class method instantiations so that they bind to the right symbols local
to the relocatable object when finally linked into an executable.

Are there any plans to remove "-fno-weak"? If so, please consider this
case as a valuable user of this feature.

Thanks

- Bhavesh



Bhavesh P. Davda | Distinguished Member of Technical Staff | Avaya |
1300 West 120th Avenue | B3-B03 | Westminster, CO 80234 | U.S.A. |
Voice/Fax: 303.538.4438 | bhavesh@avaya.com


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