Possible to use -fPIC and -fwhole-program together?
Kevin P. Fleming
kpfleming@digium.com
Tue Sep 1 12:24:00 GMT 2009
Ian Lance Taylor wrote:
> "Kevin P. Fleming" <kpfleming@digium.com> writes:
>
>> Is there some inherent reason why -fPIC and -fwhole-program are
>> incompatible for C++ code?
>
> No. This sounds like a bug.
>
>> If not, I'll try to produce a test case.
I've narrowed this down to only three functions; the relevant attribute
of these functions is that they are both exported (using
'externally_visible') *and* referenced from within the code being
compiled. If I comment out the internal references to these functions,
the relocations go back to being the normal -fPIC style relocations.
Hopefully a small sample will reproduce it as well.
--
Kevin P. Fleming
Digium, Inc. | Director of Software Technologies
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
skype: kpfleming | jabber: kpfleming@digium.com
Check us out at www.digium.com & www.asterisk.org
More information about the Gcc-help
mailing list