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

RE: [Patch: mingw/cygwin] Don't strip '@' dangles from stdcall/fastcall dllimport references


On 13 July 2007 11:32, Danny Smith wrote:

> Kai Tietz
>  Friday, 13 July 2007 10:21 p.m.
>> 
>> 
>> "Dave Korn" <XXXXXXXX> wrote on 13.07.2007 12:15:40:
>> 
>>>  :)  I don't think you can use target flags like that.  Something more
>>> like (untested): 
>>> 
>>> 
>>> #undef  TARGET_STRIP_NAME_ENCODING
>>> #define TARGET_STRIP_NAME_ENCODING  i386_pe_strip_name_encoding_full
>>> 
>>> 
>>> /* Also strip the fastcall prefix and stdcall suffix.  */
>>> 
>>> const char *
>>> i386_pe_strip_name_encoding_full (const char *str)
>>> {
>>>   const char *p;
>>> -  const char *name = default_strip_name_encoding (str); +  const char
>>> *name; +
>>> +  if (!TARGET_64BIT)
>>> +    return name;
>>> +
>>> +  name = default_strip_name_encoding (str);
>>> 
>>>   /* Strip leading '@' on fastcall symbols.  */
>>>   if (*name == '@')
>>>     name++;
>> 
> That won't work, as is, because we still need a function that does a full
> strip on _WIN32 (ie, in i386_pe_unique_section) at least for backward
> compatibility 
> 
> But that shouldn't be too hard.


  Yeh, I was just trying to mechanically translate what you did with putting the redefinition of TARGET_STRIP_NAME_ENCODING inside #if TARGET_64BIT but I muffed it.  It should have been:

>>> +  if (!TARGET_64BIT)
>>> +    return default_strip_name_encoding (name);



    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....


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