This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch i386 windows]: Fix weak-symbol support for 64-bit windows target
On Fri, Nov 5, 2010 at 5:36 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Fri, Nov 5, 2010 at 4:01 PM, Kai Tietz <ktietz70@googlemail.com> wrote:
>> 2010/11/5 Richard Henderson <rth@redhat.com>:
>>> On 11/04/2010 12:57 PM, Kai Tietz wrote:
>>>> Here is the updated patch for x64 weak symbols (for static libraries).
>>>> Prior patch misused the UNSPEC_GOTPCREL for expressing a pc-relative
>>>> only. I added for this to i386.md the new UNSPEC_PCREL and added
>>>> necessary checks to i386.c for handling new pic_address more correct.
>>>>
>>>> Tested for x86_64-w64-mingw32. Ok for apply?
>>>
>>> For 4.7, I'd like to investigate removing the flag_pic hack which
>>> is causing some of this ugliness.
>>
>> Agreed.
>>
>>> But for the purposes of 4.6 this patch is ok.
>>
>> Committed at revision 166382.
>>
>
> This patch is bogus. See:
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46326
>
Did you mean
if (GET_CODE (x) != CONST
|| GET_CODE (XEXP (x, 0)) != UNSPEC
|| (XINT (XEXP (x, 0), 1) != UNSPEC_GOTPCREL
&& XINT (XEXP (x, 0), 1) != UNSPEC_PCREL)
|| !MEM_P (orig_x))
return ix86_delegitimize_tls_address (orig_x);
--
H.J.