winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
March 2019
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
1097 discussions
Start a n
N
ew thread
Jacek Caban : mshtml: Don't store NSContainer in nsWineURI.
by Alexandre Julliard
06 Mar '19
06 Mar '19
Module: wine Branch: master Commit: 842207e260a446140d92565d4550af9d7a520c79 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=842207e260a446140d92565d…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Mar 6 12:46:56 2019 +0100 mshtml: Don't store NSContainer in nsWineURI. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mshtml/nsio.c | 59 +++++++++--------------------------------------------- 1 file changed, 9 insertions(+), 50 deletions(-) diff --git a/dlls/mshtml/nsio.c b/dlls/mshtml/nsio.c index 63038d2..d818889 100644 --- a/dlls/mshtml/nsio.c +++ b/dlls/mshtml/nsio.c @@ -57,7 +57,6 @@ struct nsWineURI { LONG ref; - NSContainer *container; windowref_t *window_ref; nsChannelBSC *channel_bsc; IUri *uri; @@ -157,7 +156,7 @@ static HRESULT combine_url(IUri *base_uri, const WCHAR *rel_url, IUri **ret) return hres; } -static nsresult create_nsuri(IUri*,HTMLOuterWindow*,NSContainer*,const char*,nsWineURI**); +static nsresult create_nsuri(IUri*,HTMLOuterWindow*,const char*,nsWineURI**); static const char *debugstr_nsacstr(const nsACString *nsstr) { @@ -305,7 +304,7 @@ HRESULT load_nsuri(HTMLOuterWindow *window, nsWineURI *uri, nsIInputStream *post if(window->uri_nofrag) { nsWineURI *referrer_uri; - nsres = create_nsuri(window->uri_nofrag, window, window->doc_obj ? window->doc_obj->nscontainer : NULL, NULL, &referrer_uri); + nsres = create_nsuri(window->uri_nofrag, window, NULL, &referrer_uri); if(NS_SUCCEEDED(nsres)) { nsres = nsIDocShellLoadInfo_SetReferrer(load_info, (nsIURI*)&referrer_uri->nsIFileURL_iface); assert(nsres == NS_OK); @@ -330,20 +329,6 @@ HRESULT load_nsuri(HTMLOuterWindow *window, nsWineURI *uri, nsIInputStream *post return S_OK; } -static void set_uri_nscontainer(nsWineURI *This, NSContainer *nscontainer) -{ - if(This->container) { - if(This->container == nscontainer) - return; - TRACE("Changing %p -> %p\n", This->container, nscontainer); - nsIWebBrowserChrome_Release(&This->container->nsIWebBrowserChrome_iface); - } - - if(nscontainer) - nsIWebBrowserChrome_AddRef(&nscontainer->nsIWebBrowserChrome_iface); - This->container = nscontainer; -} - static void set_uri_window(nsWineURI *This, HTMLOuterWindow *window) { if(This->window_ref) { @@ -356,9 +341,6 @@ static void set_uri_window(nsWineURI *This, HTMLOuterWindow *window) if(window) { windowref_addref(window->window_ref); This->window_ref = window->window_ref; - - if(window->doc_obj) - set_uri_nscontainer(This, window->doc_obj->nscontainer); }else { This->window_ref = NULL; } @@ -1115,22 +1097,8 @@ static nsresult NSAPI nsChannel_AsyncOpen(nsIHttpChannel *iface, nsIStreamListen if(This->uri->is_doc_uri) { window = get_channel_window(This); - if(window) { + if(window) set_uri_window(This->uri, window); - }else if(This->uri->container) { - BOOL b; - - /* nscontainer->doc should be NULL which means navigation to a new window */ - if(This->uri->container->doc) - FIXME("nscontainer->doc = %p\n", This->uri->container->doc); - - nsres = before_async_open(This, This->uri->container, &b); - if(NS_FAILED(nsres)) - return nsres; - if(b) - FIXME("Navigation not cancelled\n"); - return NS_ERROR_UNEXPECTED; - } } if(!window) { @@ -2356,8 +2324,6 @@ static nsrefcnt NSAPI nsURI_Release(nsIFileURL *iface) if(!ref) { if(This->window_ref) windowref_release(This->window_ref); - if(This->container) - nsIWebBrowserChrome_Release(&This->container->nsIWebBrowserChrome_iface); if(This->uri) IUri_Release(This->uri); if(This->uri_builder) @@ -2860,7 +2826,7 @@ static nsresult NSAPI nsURI_Clone(nsIFileURL *iface, nsIURI **_retval) return NS_ERROR_UNEXPECTED; nsres = create_nsuri(This->uri, This->window_ref ? This->window_ref->window : NULL, - This->container, This->origin_charset, &wine_uri); + This->origin_charset, &wine_uri); if(NS_FAILED(nsres)) { WARN("create_nsuri failed: %08x\n", nsres); return nsres; @@ -3042,7 +3008,7 @@ static nsresult NSAPI nsURI_CloneIgnoreRef(nsIFileURL *iface, nsIURI **_retval) if(!uri) return NS_ERROR_FAILURE; - nsres = create_nsuri(uri, This->window_ref ? This->window_ref->window : NULL, This->container, + nsres = create_nsuri(uri, This->window_ref ? This->window_ref->window : NULL, This->origin_charset, &wine_uri); IUri_Release(uri); if(NS_FAILED(nsres)) { @@ -3438,7 +3404,7 @@ static const nsIStandardURLVtbl nsStandardURLVtbl = { nsStandardURL_SetDefaultPort }; -static nsresult create_nsuri(IUri *iuri, HTMLOuterWindow *window, NSContainer *container, +static nsresult create_nsuri(IUri *iuri, HTMLOuterWindow *window, const char *origin_charset, nsWineURI **_retval) { nsWineURI *ret; @@ -3453,7 +3419,6 @@ static nsresult create_nsuri(IUri *iuri, HTMLOuterWindow *window, NSContainer *c ret->ref = 1; ret->is_mutable = TRUE; - set_uri_nscontainer(ret, container); set_uri_window(ret, window); IUri_AddRef(iuri); @@ -3481,8 +3446,7 @@ HRESULT create_doc_uri(HTMLOuterWindow *window, IUri *iuri, nsWineURI **ret) nsWineURI *uri; nsresult nsres; - nsres = create_nsuri(iuri, window, window->doc_obj ? window->doc_obj->nscontainer : NULL, - NULL, &uri); + nsres = create_nsuri(iuri, window, NULL, &uri); if(NS_FAILED(nsres)) return E_FAIL; @@ -3533,7 +3497,7 @@ HRESULT create_redirect_nschannel(const WCHAR *url, nsChannel *orig_channel, nsC if(orig_channel->uri->window_ref) window = orig_channel->uri->window_ref->window; - nsres = create_nsuri(iuri, window, NULL, NULL, &uri); + nsres = create_nsuri(iuri, window, NULL, &uri); IUri_Release(iuri); if(NS_FAILED(nsres)) return E_FAIL; @@ -3909,7 +3873,7 @@ static nsresult NSAPI nsIOServiceHook_NewURI(nsIIOServiceHook *iface, const nsAC if(FAILED(hres)) return NS_SUCCESS_DEFAULT_ACTION; - nsres = create_nsuri(urlmon_uri, window, NULL, NULL, &wine_uri); + nsres = create_nsuri(urlmon_uri, window, NULL, &wine_uri); IUri_Release(urlmon_uri); if(base_wine_uri) nsIFileURL_Release(&base_wine_uri->nsIFileURL_iface); @@ -4025,11 +3989,6 @@ nsresult on_start_uri_open(NSContainer *nscontainer, nsIURI *uri, cpp_bool *_ret if(!wine_uri->is_doc_uri) { wine_uri->is_doc_uri = TRUE; - if(!wine_uri->container) { - nsIWebBrowserChrome_AddRef(&nscontainer->nsIWebBrowserChrome_iface); - wine_uri->container = nscontainer; - } - if(nscontainer->doc) *_retval = translate_url(nscontainer->doc, wine_uri); }
1
0
0
0
Paul Gofman : ntdll: Mark 'float_status' as input operand in save_fpu().
by Alexandre Julliard
06 Mar '19
06 Mar '19
Module: wine Branch: master Commit: bd9cdb3b65dcb07cd6ae645b9d9ce8f6f0d1383e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=bd9cdb3b65dcb07cd6ae645b…
Author: Paul Gofman <gofmanp(a)gmail.com> Date: Wed Mar 6 14:09:33 2019 +0300 ntdll: Mark 'float_status' as input operand in save_fpu(). Signed-off-by: Paul Gofman <gofmanp(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/signal_i386.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c index f1deb1c..053c87d 100644 --- a/dlls/ntdll/signal_i386.c +++ b/dlls/ntdll/signal_i386.c @@ -879,7 +879,7 @@ static inline void save_fpu( CONTEXT *context ) memcpy(&float_status, &context->FloatSave, sizeof(float_status)); float_status.StatusWord &= float_status.ControlWord | 0xffffff80; - __asm__ __volatile__( "fldenv %0" : "=m" (float_status) ); + __asm__ __volatile__( "fldenv %0" : : "m" (float_status) ); #endif }
1
0
0
0
Michael Stefaniuc : msacm32: Remove redundant not-NULL check (coccinellery ).
by Alexandre Julliard
06 Mar '19
06 Mar '19
Module: wine Branch: master Commit: a3af167373b9fd21e74a556a08ca90acfba0fb9b URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a3af167373b9fd21e74a556a…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Wed Mar 6 00:02:32 2019 +0100 msacm32: Remove redundant not-NULL check (coccinellery). Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Andrew Eikum <aeikum(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msacm32/driver.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dlls/msacm32/driver.c b/dlls/msacm32/driver.c index e0c5fdd..13187b2 100644 --- a/dlls/msacm32/driver.c +++ b/dlls/msacm32/driver.c @@ -600,8 +600,7 @@ MMRESULT WINAPI acmDriverOpen(PHACMDRIVER phad, HACMDRIVERID hadid, DWORD fdwOpe return MMSYSERR_NOERROR; gotError: WARN("failed: ret = %08x\n", ret); - if (pad && !pad->hDrvr) - HeapFree(MSACM_hHeap, 0, pad); + HeapFree(MSACM_hHeap, 0, pad); return ret; }
1
0
0
0
Alexandre Julliard : winebuild: Specify the correct linker emulation for Windows platforms.
by Alexandre Julliard
06 Mar '19
06 Mar '19
Module: wine Branch: master Commit: b9c5bac673aa1a4c4e6fcb6ef65f2ce3e04db021 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b9c5bac673aa1a4c4e6fcb6e…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Mar 6 10:40:23 2019 +0100 winebuild: Specify the correct linker emulation for Windows platforms. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tools/winebuild/utils.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/winebuild/utils.c b/tools/winebuild/utils.c index fa9169b..beff2ab 100644 --- a/tools/winebuild/utils.c +++ b/tools/winebuild/utils.c @@ -449,6 +449,9 @@ struct strarray get_ld_command(void) case PLATFORM_FREEBSD: strarray_add( &args, "-m", (force_pointer_size == 8) ? "elf_x86_64_fbsd" : "elf_i386_fbsd", NULL ); break; + case PLATFORM_WINDOWS: + strarray_add( &args, "-m", (force_pointer_size == 8) ? "i386pep" : "i386pe", NULL ); + break; default: switch(target_cpu) {
1
0
0
0
Alexandre Julliard : winebuild: Don' t use underscore prefix on 64-bit Windows.
by Alexandre Julliard
06 Mar '19
06 Mar '19
Module: wine Branch: master Commit: 4f266a88c0b9455c6be961a12404edeb66e0ba7f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=4f266a88c0b9455c6be961a1…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Mar 6 10:40:13 2019 +0100 winebuild: Don't use underscore prefix on 64-bit Windows. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tools/winebuild/utils.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tools/winebuild/utils.c b/tools/winebuild/utils.c index 87761c2..fa9169b 100644 --- a/tools/winebuild/utils.c +++ b/tools/winebuild/utils.c @@ -1039,8 +1039,10 @@ const char *asm_name( const char *sym ) switch (target_platform) { - case PLATFORM_APPLE: case PLATFORM_WINDOWS: + if (target_cpu != CPU_x86) return sym; + /* fall through */ + case PLATFORM_APPLE: if (sym[0] == '.' && sym[1] == 'L') return sym; free( buffer ); buffer = strmake( "_%s", sym ); @@ -1061,7 +1063,7 @@ const char *func_declaration( const char *func ) return ""; case PLATFORM_WINDOWS: free( buffer ); - buffer = strmake( ".def _%s; .scl 2; .type 32; .endef", func ); + buffer = strmake( ".def %s%s; .scl 2; .type 32; .endef", target_cpu == CPU_x86 ? "_" : "", func ); break; default: free( buffer ); @@ -1164,7 +1166,8 @@ const char *asm_globl( const char *func ) buffer = strmake( "\t.globl _%s\n\t.private_extern _%s\n_%s:", func, func, func ); break; case PLATFORM_WINDOWS: - buffer = strmake( "\t.globl _%s\n_%s:", func, func ); + buffer = strmake( "\t.globl %s%s\n%s%s:", target_cpu == CPU_x86 ? "_" : "", func, + target_cpu == CPU_x86 ? "_" : "", func ); break; default: buffer = strmake( "\t.globl %s\n\t.hidden %s\n%s:", func, func, func );
1
0
0
0
Alexandre Julliard : winebuild: Add a helper for generating data directories.
by Alexandre Julliard
06 Mar '19
06 Mar '19
Module: wine Branch: master Commit: 7d41cde73f56bd363bc354d9960290f6ca0ee14c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7d41cde73f56bd363bc354d9…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Mar 6 10:37:12 2019 +0100 winebuild: Add a helper for generating data directories. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tools/winebuild/spec32.c | 59 +++++++++++++++++++----------------------------- 1 file changed, 23 insertions(+), 36 deletions(-) diff --git a/tools/winebuild/spec32.c b/tools/winebuild/spec32.c index ee38702..7b4d661 100644 --- a/tools/winebuild/spec32.c +++ b/tools/winebuild/spec32.c @@ -138,6 +138,21 @@ static void get_arg_string( ORDDEF *odp, char str[MAX_ARGUMENTS + 1] ) strcpy( str + i, "I" ); } +static void output_data_directories( const char *names[16] ) +{ + int i; + + for (i = 0; i < 16; i++) + { + if (names[i]) + { + output_rva( "%s", names[i] ); + output( "\t.long %s_end - %s\n", names[i], names[i] ); + } + else output( "\t.long 0,0\n" ); + } +} + /******************************************************************* * build_args_string */ @@ -546,6 +561,7 @@ void output_module( DLLSPEC *spec ) { int machine = 0; unsigned int page_size = get_page_size(); + const char *data_dirs[16] = { NULL }; /* Reserve some space for the PE header */ @@ -650,43 +666,14 @@ void output_module( DLLSPEC *spec ) output( "\t.long 0\n" ); /* LoaderFlags */ output( "\t.long 16\n" ); /* NumberOfRvaAndSizes */ - if (spec->base <= spec->limit) /* DataDirectory[IMAGE_DIRECTORY_ENTRY_EXPORT] */ - { - output_rva( ".L__wine_spec_exports" ); - output( "\t.long .L__wine_spec_exports_end-.L__wine_spec_exports\n" ); - } - else - output( "\t.long 0,0\n" ); + if (spec->base <= spec->limit) + data_dirs[0] = ".L__wine_spec_exports"; /* DataDirectory[IMAGE_DIRECTORY_ENTRY_EXPORT] */ + if (has_imports()) + data_dirs[1] = ".L__wine_spec_imports"; /* DataDirectory[IMAGE_DIRECTORY_ENTRY_IMPORT] */ + if (spec->nb_resources) + data_dirs[2] = ".L__wine_spec_resources"; /* DataDirectory[IMAGE_DIRECTORY_ENTRY_RESOURCE] */ - if (has_imports()) /* DataDirectory[IMAGE_DIRECTORY_ENTRY_IMPORT] */ - { - output_rva( ".L__wine_spec_imports" ); - output( "\t.long .L__wine_spec_imports_end-.L__wine_spec_imports\n" ); - } - else - output( "\t.long 0,0\n" ); - - if (spec->nb_resources) /* DataDirectory[IMAGE_DIRECTORY_ENTRY_RESOURCE] */ - { - output_rva( ".L__wine_spec_resources" ); - output( "\t.L__wine_spec_resources_end-.L__wine_spec_resources\n" ); - } - else - output( "\t.long 0,0\n" ); - - output( "\t.long 0,0\n" ); /* DataDirectory[3] */ - output( "\t.long 0,0\n" ); /* DataDirectory[4] */ - output( "\t.long 0,0\n" ); /* DataDirectory[5] */ - output( "\t.long 0,0\n" ); /* DataDirectory[6] */ - output( "\t.long 0,0\n" ); /* DataDirectory[7] */ - output( "\t.long 0,0\n" ); /* DataDirectory[8] */ - output( "\t.long 0,0\n" ); /* DataDirectory[9] */ - output( "\t.long 0,0\n" ); /* DataDirectory[10] */ - output( "\t.long 0,0\n" ); /* DataDirectory[11] */ - output( "\t.long 0,0\n" ); /* DataDirectory[12] */ - output( "\t.long 0,0\n" ); /* DataDirectory[13] */ - output( "\t.long 0,0\n" ); /* DataDirectory[14] */ - output( "\t.long 0,0\n" ); /* DataDirectory[15] */ + output_data_directories( data_dirs ); output( "\n\t%s\n", get_asm_string_section() ); output( "%s\n", asm_globl("__wine_spec_file_name") );
1
0
0
0
Alexandre Julliard : winebuild: Add a helper for generating RVA pointers.
by Alexandre Julliard
06 Mar '19
06 Mar '19
Module: wine Branch: master Commit: 7555fd57e3956d7cfc0fa5a43b87bd7d20101087 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7555fd57e3956d7cfc0fa5a4…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Mar 6 10:13:45 2019 +0100 winebuild: Add a helper for generating RVA pointers. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tools/winebuild/build.h | 2 ++ tools/winebuild/import.c | 9 +++------ tools/winebuild/res32.c | 6 ++++-- tools/winebuild/spec32.c | 31 ++++++++++++++++++------------- tools/winebuild/utils.c | 22 ++++++++++++++++++++++ 5 files changed, 49 insertions(+), 21 deletions(-) diff --git a/tools/winebuild/build.h b/tools/winebuild/build.h index e76a87a..44fa317 100644 --- a/tools/winebuild/build.h +++ b/tools/winebuild/build.h @@ -248,6 +248,8 @@ extern int output( const char *format, ... ) __attribute__ ((__format__ (__printf__, 1, 2))); extern void output_cfi( const char *format, ... ) __attribute__ ((__format__ (__printf__, 1, 2))); +extern void output_rva( const char *format, ... ) + __attribute__ ((__format__ (__printf__, 1, 2))); extern void spawn( struct strarray array ); extern struct strarray find_tool( const char *name, const char * const *names ); extern struct strarray get_as_command(void); diff --git a/tools/winebuild/import.c b/tools/winebuild/import.c index 5c4de1c..984bffd 100644 --- a/tools/winebuild/import.c +++ b/tools/winebuild/import.c @@ -722,14 +722,11 @@ static void output_immediate_imports(void) j = 0; LIST_FOR_EACH_ENTRY( import, &dll_imports, struct import, entry ) { - output( "\t.long .L__wine_spec_import_data_names+%d-.L__wine_spec_rva_base\n", /* OriginalFirstThunk */ - j * get_ptr_size() ); + output_rva( ".L__wine_spec_import_data_names + %d", j * get_ptr_size() ); /* OriginalFirstThunk */ output( "\t.long 0\n" ); /* TimeDateStamp */ output( "\t.long 0\n" ); /* ForwarderChain */ - output( "\t.long .L__wine_spec_import_name_%s-.L__wine_spec_rva_base\n", /* Name */ - import->c_name ); - output( "\t.long .L__wine_spec_import_data_ptrs+%d-.L__wine_spec_rva_base\n", /* FirstThunk */ - j * get_ptr_size() ); + output_rva( ".L__wine_spec_import_name_%s", import->c_name ); /* Name */ + output_rva( ".L__wine_spec_import_data_ptrs + %d", j * get_ptr_size() ); /* FirstThunk */ j += import->nb_imports + 1; } output( "\t.long 0\n" ); /* OriginalFirstThunk */ diff --git a/tools/winebuild/res32.c b/tools/winebuild/res32.c index b20dfb4..16e5c65 100644 --- a/tools/winebuild/res32.c +++ b/tools/winebuild/res32.c @@ -476,8 +476,10 @@ void output_resources( DLLSPEC *spec ) /* dump the resource data entries */ for (i = 0, res = spec->resources; i < spec->nb_resources; i++, res++) - output( "\t.long .L__wine_spec_res_%d-.L__wine_spec_rva_base,%u,0,0\n", - i, res->data_size ); + { + output_rva( ".L__wine_spec_res_%d", i ); + output( "\t.long %u,0,0\n", res->data_size ); + } /* dump the name strings */ diff --git a/tools/winebuild/spec32.c b/tools/winebuild/spec32.c index 69b6d2f..ee38702 100644 --- a/tools/winebuild/spec32.c +++ b/tools/winebuild/spec32.c @@ -378,15 +378,15 @@ void output_exports( DLLSPEC *spec ) output( "\t.long 0\n" ); /* Characteristics */ output( "\t.long 0\n" ); /* TimeDateStamp */ output( "\t.long 0\n" ); /* MajorVersion/MinorVersion */ - output( "\t.long .L__wine_spec_exp_names-.L__wine_spec_rva_base\n" ); /* Name */ + output_rva( ".L__wine_spec_exp_names" ); /* Name */ output( "\t.long %u\n", spec->base ); /* Base */ output( "\t.long %u\n", nr_exports ); /* NumberOfFunctions */ output( "\t.long %u\n", spec->nb_names ); /* NumberOfNames */ - output( "\t.long .L__wine_spec_exports_funcs-.L__wine_spec_rva_base\n" ); /* AddressOfFunctions */ + output_rva( ".L__wine_spec_exports_funcs " ); /* AddressOfFunctions */ if (spec->nb_names) { - output( "\t.long .L__wine_spec_exp_name_ptrs-.L__wine_spec_rva_base\n" ); /* AddressOfNames */ - output( "\t.long .L__wine_spec_exp_ordinals-.L__wine_spec_rva_base\n" ); /* AddressOfNameOrdinals */ + output_rva( ".L__wine_spec_exp_name_ptrs" ); /* AddressOfNames */ + output_rva( ".L__wine_spec_exp_ordinals" ); /* AddressOfNameOrdinals */ } else { @@ -440,7 +440,7 @@ void output_exports( DLLSPEC *spec ) output( "\n.L__wine_spec_exp_name_ptrs:\n" ); for (i = 0; i < spec->nb_names; i++) { - output( "\t.long .L__wine_spec_exp_names+%u-.L__wine_spec_rva_base\n", namepos ); + output_rva( ".L__wine_spec_exp_names + %u", namepos ); namepos += strlen(spec->names[i]->name) + 1; } @@ -636,8 +636,7 @@ void output_module( DLLSPEC *spec ) output( "\t.short %u,%u\n", /* Major/MinorSubsystemVersion */ spec->subsystem_major, spec->subsystem_minor ); output( "\t.long 0\n" ); /* Win32VersionValue */ - output( "\t.long %s-.L__wine_spec_rva_base\n", /* SizeOfImage */ - asm_name("_end") ); + output_rva( "%s", asm_name("_end") ); /* SizeOfImage */ output( "\t.long %u\n", page_size ); /* SizeOfHeaders */ output( "\t.long 0\n" ); /* CheckSum */ output( "\t.short 0x%04x\n", /* Subsystem */ @@ -652,20 +651,26 @@ void output_module( DLLSPEC *spec ) output( "\t.long 16\n" ); /* NumberOfRvaAndSizes */ if (spec->base <= spec->limit) /* DataDirectory[IMAGE_DIRECTORY_ENTRY_EXPORT] */ - output( "\t.long .L__wine_spec_exports-.L__wine_spec_rva_base," - ".L__wine_spec_exports_end-.L__wine_spec_exports\n" ); + { + output_rva( ".L__wine_spec_exports" ); + output( "\t.long .L__wine_spec_exports_end-.L__wine_spec_exports\n" ); + } else output( "\t.long 0,0\n" ); if (has_imports()) /* DataDirectory[IMAGE_DIRECTORY_ENTRY_IMPORT] */ - output( "\t.long .L__wine_spec_imports-.L__wine_spec_rva_base," - ".L__wine_spec_imports_end-.L__wine_spec_imports\n" ); + { + output_rva( ".L__wine_spec_imports" ); + output( "\t.long .L__wine_spec_imports_end-.L__wine_spec_imports\n" ); + } else output( "\t.long 0,0\n" ); if (spec->nb_resources) /* DataDirectory[IMAGE_DIRECTORY_ENTRY_RESOURCE] */ - output( "\t.long .L__wine_spec_resources-.L__wine_spec_rva_base," - ".L__wine_spec_resources_end-.L__wine_spec_resources\n" ); + { + output_rva( ".L__wine_spec_resources" ); + output( "\t.L__wine_spec_resources_end-.L__wine_spec_resources\n" ); + } else output( "\t.long 0,0\n" ); diff --git a/tools/winebuild/utils.c b/tools/winebuild/utils.c index 63be3af..87761c2 100644 --- a/tools/winebuild/utils.c +++ b/tools/winebuild/utils.c @@ -1107,6 +1107,28 @@ void output_cfi( const char *format, ... ) va_end( valist ); } +/* output an RVA pointer */ +void output_rva( const char *format, ... ) +{ + va_list valist; + + va_start( valist, format ); + switch (target_platform) + { + case PLATFORM_WINDOWS: + output( "\t.rva " ); + vfprintf( output_file, format, valist ); + fputc( '\n', output_file ); + break; + default: + output( "\t.long " ); + vfprintf( output_file, format, valist ); + output( " - .L__wine_spec_rva_base\n" ); + break; + } + va_end( valist ); +} + /* output the GNU note for non-exec stack */ void output_gnu_stack_note(void) {
1
0
0
0
Alexandre Julliard : winebuild: Add a helper for decorating stdcall function names.
by Alexandre Julliard
06 Mar '19
06 Mar '19
Module: wine Branch: master Commit: ef9bda4c960204c81882f53792ee3e83729024c0 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ef9bda4c960204c81882f537…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Mar 6 10:12:55 2019 +0100 winebuild: Add a helper for decorating stdcall function names. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tools/winebuild/build.h | 1 + tools/winebuild/import.c | 2 +- tools/winebuild/spec32.c | 10 ++-------- tools/winebuild/utils.c | 15 +++++++++++++++ 4 files changed, 19 insertions(+), 9 deletions(-) diff --git a/tools/winebuild/build.h b/tools/winebuild/build.h index fe92522..e76a87a 100644 --- a/tools/winebuild/build.h +++ b/tools/winebuild/build.h @@ -268,6 +268,7 @@ extern DLLSPEC *alloc_dll_spec(void); extern void free_dll_spec( DLLSPEC *spec ); extern char *make_c_identifier( const char *str ); extern const char *get_stub_name( const ORDDEF *odp, const DLLSPEC *spec ); +extern const char *get_link_name( const ORDDEF *odp ); extern int get_cpu_from_name( const char *name ); extern unsigned int get_alignment(unsigned int align); extern unsigned int get_page_size(void); diff --git a/tools/winebuild/import.c b/tools/winebuild/import.c index 2816c65..5c4de1c 100644 --- a/tools/winebuild/import.c +++ b/tools/winebuild/import.c @@ -498,7 +498,7 @@ static char *create_undef_symbols_file( DLLSPEC *spec ) ORDDEF *odp = &spec->entry_points[i]; if (odp->type == TYPE_STUB || odp->type == TYPE_ABS || odp->type == TYPE_VARIABLE) continue; if (odp->flags & FLAG_FORWARD) continue; - output( "\t%s %s\n", get_asm_ptr_keyword(), asm_name(odp->link_name) ); + output( "\t%s %s\n", get_asm_ptr_keyword(), asm_name( get_link_name( odp ))); } for (j = 0; j < extra_ld_symbols.count; j++) output( "\t%s %s\n", get_asm_ptr_keyword(), asm_name(extra_ld_symbols.str[j]) ); diff --git a/tools/winebuild/spec32.c b/tools/winebuild/spec32.c index 80124f0..69b6d2f 100644 --- a/tools/winebuild/spec32.c +++ b/tools/winebuild/spec32.c @@ -419,7 +419,7 @@ void output_exports( DLLSPEC *spec ) } else { - output( "\t%s %s\n", get_asm_ptr_keyword(), asm_name(odp->link_name) ); + output( "\t%s %s\n", get_asm_ptr_keyword(), asm_name( get_link_name( odp ))); } break; case TYPE_STUB: @@ -977,15 +977,9 @@ void output_def_file( DLLSPEC *spec, int include_private ) int at_param = get_args_size( odp ); if (!kill_at && target_cpu == CPU_x86) output( "@%d", at_param ); if (odp->flags & FLAG_FORWARD) - { output( "=%s", odp->link_name ); - } else if (strcmp(name, odp->link_name)) /* try to reduce output */ - { - output( "=%s", odp->link_name ); - if (!kill_at && target_cpu == CPU_x86 && !(odp->flags & FLAG_THISCALL)) - output( "@%d", at_param ); - } + output( "=%s", get_link_name( odp )); break; } default: diff --git a/tools/winebuild/utils.c b/tools/winebuild/utils.c index 06c3d39..63be3af 100644 --- a/tools/winebuild/utils.c +++ b/tools/winebuild/utils.c @@ -894,6 +894,21 @@ const char *get_stub_name( const ORDDEF *odp, const DLLSPEC *spec ) return buffer; } +/* return the stdcall-decorated name for an entry point */ +const char *get_link_name( const ORDDEF *odp ) +{ + static char *buffer; + + if (!kill_at && target_platform == PLATFORM_WINDOWS && target_cpu == CPU_x86 && + odp->type == TYPE_STDCALL && !(odp->flags & FLAG_THISCALL)) + { + free( buffer ); + buffer = strmake( "%s@%u", odp->link_name, get_args_size( odp )); + return buffer; + } + return odp->link_name; +} + /* parse a cpu name and return the corresponding value */ int get_cpu_from_name( const char *name ) {
1
0
0
0
Alexandre Julliard : winebuild: Output the module filename along with the stub data.
by Alexandre Julliard
06 Mar '19
06 Mar '19
Module: wine Branch: master Commit: a3229faf59d9e562a5eb1e73cd38a21183978d72 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a3229faf59d9e562a5eb1e73…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Mar 6 10:10:49 2019 +0100 winebuild: Output the module filename along with the stub data. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tools/winebuild/import.c | 45 ++++++++++++++++----------------------------- tools/winebuild/spec32.c | 1 - 2 files changed, 16 insertions(+), 30 deletions(-) diff --git a/tools/winebuild/import.c b/tools/winebuild/import.c index 6ab7765..2816c65 100644 --- a/tools/winebuild/import.c +++ b/tools/winebuild/import.c @@ -1187,14 +1187,14 @@ static void output_external_link_imports( DLLSPEC *spec ) void output_stubs( DLLSPEC *spec ) { const char *name, *exp_name; - int i, count; + int i; if (!has_stubs( spec )) return; output( "\n/* stub functions */\n\n" ); output( "\t.text\n" ); - for (i = count = 0; i < spec->nb_entry_points; i++) + for (i = 0; i < spec->nb_entry_points; i++) { ORDDEF *odp = &spec->entry_points[i]; if (odp->type != TYPE_STUB) continue; @@ -1231,7 +1231,6 @@ void output_stubs( DLLSPEC *spec ) { output( "\tleal .L%s_string-1b(%%eax),%%ecx\n", name ); output( "\tmovl %%ecx,4(%%esp)\n" ); - count++; } else output( "\tmovl $%d,4(%%esp)\n", odp->ordinal ); @@ -1241,10 +1240,7 @@ void output_stubs( DLLSPEC *spec ) else { if (exp_name) - { output( "\tmovl $.L%s_string,4(%%esp)\n", name ); - count++; - } else output( "\tmovl $%d,4(%%esp)\n", odp->ordinal ); output( "\tmovl $.L__wine_spec_file_name,(%%esp)\n" ); @@ -1256,10 +1252,7 @@ void output_stubs( DLLSPEC *spec ) output_cfi( ".cfi_adjust_cfa_offset 8" ); output( "\tleaq .L__wine_spec_file_name(%%rip),%%rdi\n" ); if (exp_name) - { output( "leaq .L%s_string(%%rip),%%rsi\n", name ); - count++; - } else output( "\tmovq $%d,%%rsi\n", odp->ordinal ); output( "\tcall %s\n", asm_name("__wine_spec_unimplemented_stub") ); @@ -1269,24 +1262,19 @@ void output_stubs( DLLSPEC *spec ) output( "\tadd r0,PC\n"); output( "\tldr r1,2f+4\n"); output( "1:" ); - if (exp_name) - { - output( "\tadd r1,PC\n"); - count++; - } + if (exp_name) output( "\tadd r1,PC\n"); output( "\tbl %s\n", asm_name("__wine_spec_unimplemented_stub") ); output( "2:\t.long .L__wine_spec_file_name-1b\n" ); if (exp_name) output( "\t.long .L%s_string-2b\n", name ); else output( "\t.long %u\n", odp->ordinal ); break; case CPU_ARM64: - output( "\tadrp x0, %s\n", asm_name("__wine_spec_file_name") ); - output( "\tadd x0, x0, #:lo12:%s\n", asm_name("__wine_spec_file_name") ); + output( "\tadrp x0, .L__wine_spec_file_name\n" ); + output( "\tadd x0, x0, #:lo12:.L__wine_spec_file_name\n" ); if (exp_name) { output( "\tadrp x1, .L%s_string\n", name ); output( "\tadd x1, x1, #:lo12:.L%s_string\n", name ); - count++; } else output( "\tmov x1, %u\n", odp->ordinal ); @@ -1301,20 +1289,19 @@ void output_stubs( DLLSPEC *spec ) output_function_size( name ); } - if (count) + output( "\t%s\n", get_asm_string_section() ); + output( ".L__wine_spec_file_name:\n" ); + output( "\t%s \"%s\"\n", get_asm_string_keyword(), spec->file_name ); + for (i = 0; i < spec->nb_entry_points; i++) { - output( "\t%s\n", get_asm_string_section() ); - for (i = 0; i < spec->nb_entry_points; i++) + ORDDEF *odp = &spec->entry_points[i]; + if (odp->type != TYPE_STUB) continue; + exp_name = odp->name ? odp->name : odp->export_name; + if (exp_name) { - ORDDEF *odp = &spec->entry_points[i]; - if (odp->type != TYPE_STUB) continue; - exp_name = odp->name ? odp->name : odp->export_name; - if (exp_name) - { - name = get_stub_name( odp, spec ); - output( ".L%s_string:\n", name ); - output( "\t%s \"%s\"\n", get_asm_string_keyword(), exp_name ); - } + name = get_stub_name( odp, spec ); + output( ".L%s_string:\n", name ); + output( "\t%s \"%s\"\n", get_asm_string_keyword(), exp_name ); } } } diff --git a/tools/winebuild/spec32.c b/tools/winebuild/spec32.c index 0547ba2..80124f0 100644 --- a/tools/winebuild/spec32.c +++ b/tools/winebuild/spec32.c @@ -685,7 +685,6 @@ void output_module( DLLSPEC *spec ) output( "\n\t%s\n", get_asm_string_section() ); output( "%s\n", asm_globl("__wine_spec_file_name") ); - output( ".L__wine_spec_file_name:\n" ); output( "\t%s \"%s\"\n", get_asm_string_keyword(), spec->file_name ); if (target_platform == PLATFORM_APPLE) output( "\t.lcomm %s,4\n", asm_name("_end") );
1
0
0
0
Alexandre Julliard : winebuild: Rename BuildSpec32File() for consistency.
by Alexandre Julliard
06 Mar '19
06 Mar '19
Module: wine Branch: master Commit: 0cdab409adef2fe2e36b7ea47d313af20573df3e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0cdab409adef2fe2e36b7ea4…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Mar 6 10:10:30 2019 +0100 winebuild: Rename BuildSpec32File() for consistency. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tools/winebuild/build.h | 3 +-- tools/winebuild/main.c | 2 +- tools/winebuild/spec32.c | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/tools/winebuild/build.h b/tools/winebuild/build.h index d7b46a6..fe92522 100644 --- a/tools/winebuild/build.h +++ b/tools/winebuild/build.h @@ -299,6 +299,7 @@ extern void output_exports( DLLSPEC *spec ); extern int load_res32_file( const char *name, DLLSPEC *spec ); extern void output_resources( DLLSPEC *spec ); extern void output_bin_resources( DLLSPEC *spec, unsigned int start_rva ); +extern void output_spec32_file( DLLSPEC *spec ); extern void output_fake_module( DLLSPEC *spec ); extern void output_def_file( DLLSPEC *spec, int include_private ); extern void load_res16_file( const char *name, DLLSPEC *spec ); @@ -311,8 +312,6 @@ extern void output_fake_module16( DLLSPEC *spec16 ); extern void output_res_o_file( DLLSPEC *spec ); extern void output_asm_relays16(void); -extern void BuildSpec32File( DLLSPEC *spec ); - extern void add_16bit_exports( DLLSPEC *spec32, DLLSPEC *spec16 ); extern int parse_spec_file( FILE *file, DLLSPEC *spec ); extern int parse_def_file( FILE *file, DLLSPEC *spec ); diff --git a/tools/winebuild/main.c b/tools/winebuild/main.c index 7769641..d7bc39f 100644 --- a/tools/winebuild/main.c +++ b/tools/winebuild/main.c @@ -645,7 +645,7 @@ int main(int argc, char **argv) output_spec16_file( spec ); break; case SPEC_WIN32: - BuildSpec32File( spec ); + output_spec32_file( spec ); break; default: assert(0); } diff --git a/tools/winebuild/spec32.c b/tools/winebuild/spec32.c index 89f33c8..0547ba2 100644 --- a/tools/winebuild/spec32.c +++ b/tools/winebuild/spec32.c @@ -695,11 +695,11 @@ void output_module( DLLSPEC *spec ) /******************************************************************* - * BuildSpec32File + * output_spec32_file * * Build a Win32 C file from a spec file. */ -void BuildSpec32File( DLLSPEC *spec ) +void output_spec32_file( DLLSPEC *spec ) { needs_get_pc_thunk = 0; resolve_imports( spec );
1
0
0
0
← Newer
1
...
78
79
80
81
82
83
84
...
110
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
Results per page:
10
25
50
100
200