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: revised x86_64-pc-mingw32 patch


Richard Henderson <rth@redhat.com> wrote on 22.03.2007 01:15:34:

> Try the following patch.  It fixes up the calling abi problems,
> and gives a stab at fixing the flag_pic sorts of problems.

Thanks, I am currently on to merge and test.

> I do have one question: can I assume that given
> 
>   extern int i;
>   int f(void) { return i; }
> 
> that "i" *cannot* be resolved from a dllimport?  If not,
> what does VC++ do with the generated code?

Yes the variable i can not be resolved by MS from a dllimport. If you 
would write
   extern __declspec(dllimport) int i;
   int f(void) { return i; }
than it is getting resolved.
If you use something like
   extern __declspec(dllimport) int i;
   int *my_i_ptr = &i;
   int f(void) { return *my_i_ptr; }

MS packs the initialization code for that into the pdata section and marks 
the initialization method within CRT$XCU (crt startup section executed by 
terminit) section, too.

I Noticed, that you disabled the TARGET_DEBUG_ARG if-case in funtion in 
init_cumulative_args. Was this by intension done ?

Regards,
 i.A. Kai Tietz

------------------------------------------------------------------------------------------
  OneVision Software Entwicklungs GmbH & Co. KG
  Dr.-Leo-Ritter-StraÃe 9 - 93049 Regensburg
  Tel: +49.(0)941.78004.0 - Fax: +49.(0)941.78004.489 - www.OneVision.com
  Commerzbank Regensburg - BLZ 750 400 62 - Konto 6011050
  Handelsregister: HRA 6744, Amtsgericht Regensburg
  KomplementÃrin: OneVision Software Entwicklungs Verwaltungs GmbH
  Dr.-Leo-Ritter-StraÃe 9 â 93049 Regensburg
  Handelsregister: HRB 8932, Amtsgericht Regensburg - GeschÃftsfÃhrer: 
Ulrike DÃhler, Manuela Kluger



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