revised x86_64-pc-mingw32 patch
Kai Tietz
Kai.Tietz@onevision.com
Thu Mar 22 13:02:00 GMT 2007
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
More information about the Gcc-patches
mailing list