Alexandre Julliard : ntdll: Mark function that are only called from assembly as hidden.

Alexandre Julliard julliard at winehq.org
Tue Jul 25 16:11:26 CDT 2017


Module: wine
Branch: master
Commit: 38d45cbcc820250c12139a14716ce24b24a9c9d3
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=38d45cbcc820250c12139a14716ce24b24a9c9d3

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue Jul 25 11:48:24 2017 +0200

ntdll: Mark function that are only called from assembly as hidden.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/ntdll/relay.c         | 17 +++++++++--------
 dlls/ntdll/resource.c      |  4 ++--
 dlls/ntdll/rtl.c           |  4 ++--
 dlls/ntdll/signal_i386.c   | 11 ++++++-----
 dlls/ntdll/signal_x86_64.c |  2 +-
 5 files changed, 20 insertions(+), 18 deletions(-)

diff --git a/dlls/ntdll/relay.c b/dlls/ntdll/relay.c
index 9ffe28a..30cb953 100644
--- a/dlls/ntdll/relay.c
+++ b/dlls/ntdll/relay.c
@@ -330,7 +330,8 @@ static void print_timestamp(void)
  *
  * stack points to the return address, i.e. the first argument is stack[1].
  */
-void * WINAPI relay_trace_entry( struct relay_descr *descr, unsigned int idx, const INT_PTR *stack )
+DECLSPEC_HIDDEN void * WINAPI relay_trace_entry( struct relay_descr *descr,
+                                                 unsigned int idx, const INT_PTR *stack )
 {
     WORD ordinal = LOWORD(idx);
     BYTE nb_args = LOBYTE(HIWORD(idx));
@@ -357,8 +358,8 @@ void * WINAPI relay_trace_entry( struct relay_descr *descr, unsigned int idx, co
 /***********************************************************************
  *           relay_trace_exit
  */
-void WINAPI relay_trace_exit( struct relay_descr *descr, unsigned int idx,
-                              const INT_PTR *stack, LONGLONG retval )
+DECLSPEC_HIDDEN void WINAPI relay_trace_exit( struct relay_descr *descr, unsigned int idx,
+                                              const INT_PTR *stack, LONGLONG retval )
 {
     WORD ordinal = LOWORD(idx);
     BYTE flags   = HIBYTE(HIWORD(idx));
@@ -480,9 +481,9 @@ __ASM_GLOBAL_FUNC( relay_call,
                    __ASM_CFI(".cfi_same_value %ebp\n\t")
                    "ret $12" )
 
-void WINAPI __regs_relay_call_regs( struct relay_descr *descr, unsigned int idx,
-                                    unsigned int orig_eax, unsigned int ret_addr,
-                                    CONTEXT *context )
+void WINAPI DECLSPEC_HIDDEN __regs_relay_call_regs( struct relay_descr *descr, unsigned int idx,
+                                                    unsigned int orig_eax, unsigned int ret_addr,
+                                                    CONTEXT *context )
 {
     WORD ordinal = LOWORD(idx);
     BYTE nb_args = LOBYTE(HIWORD(idx));
@@ -1063,7 +1064,7 @@ static void SNOOP_PrintArg(DWORD x)
     __ENDTRY
 }
 
-void WINAPI __regs_SNOOP_Entry( void **stack )
+void WINAPI DECLSPEC_HIDDEN __regs_SNOOP_Entry( void **stack )
 {
 	SNOOP_DLL *dll;
 	SNOOP_FUN *fun = (SNOOP_FUN *)((char *)stack[0] - 5);
@@ -1149,7 +1150,7 @@ void WINAPI __regs_SNOOP_Entry( void **stack )
 	DPRINTF(") ret=%08x\n",(DWORD)ret->origreturn);
 }
 
-void WINAPI __regs_SNOOP_Return( void **stack )
+void WINAPI DECLSPEC_HIDDEN __regs_SNOOP_Return( void **stack )
 {
 	SNOOP_RETURNENTRY *ret = (SNOOP_RETURNENTRY*)((char *)stack[0] - 5);
         SNOOP_FUN *fun = &ret->dll->funs[ret->ordinal];
diff --git a/dlls/ntdll/resource.c b/dlls/ntdll/resource.c
index 9635bb0..f542677 100644
--- a/dlls/ntdll/resource.c
+++ b/dlls/ntdll/resource.c
@@ -314,8 +314,8 @@ NTSTATUS WINAPI LdrFindResource_U( HMODULE hmod, const LDR_RESOURCE_INFO *info,
 
 /* don't penalize other platforms stuff needed on i386 for compatibility */
 #ifdef __i386__
-NTSTATUS WINAPI access_resource( HMODULE hmod, const IMAGE_RESOURCE_DATA_ENTRY *entry,
-                                 void **ptr, ULONG *size )
+NTSTATUS WINAPI DECLSPEC_HIDDEN access_resource( HMODULE hmod, const IMAGE_RESOURCE_DATA_ENTRY *entry,
+                                                 void **ptr, ULONG *size )
 #else
 static inline NTSTATUS access_resource( HMODULE hmod, const IMAGE_RESOURCE_DATA_ENTRY *entry,
                                         void **ptr, ULONG *size )
diff --git a/dlls/ntdll/rtl.c b/dlls/ntdll/rtl.c
index c309e10..b0ea413 100644
--- a/dlls/ntdll/rtl.c
+++ b/dlls/ntdll/rtl.c
@@ -1238,8 +1238,8 @@ PSLIST_ENTRY WINAPI RtlInterlockedPushListSListEx(PSLIST_HEADER list, PSLIST_ENT
  */
 #ifdef DEFINE_FASTCALL4_ENTRYPOINT
 DEFINE_FASTCALL4_ENTRYPOINT(RtlInterlockedPushListSList)
-PSLIST_ENTRY WINAPI __regs_RtlInterlockedPushListSList(PSLIST_HEADER list, PSLIST_ENTRY first,
-                                                       PSLIST_ENTRY last, ULONG count)
+PSLIST_ENTRY WINAPI DECLSPEC_HIDDEN __regs_RtlInterlockedPushListSList(PSLIST_HEADER list, PSLIST_ENTRY first,
+                                                                       PSLIST_ENTRY last, ULONG count)
 #else
 PSLIST_ENTRY WINAPI RtlInterlockedPushListSList(PSLIST_HEADER list, PSLIST_ENTRY first,
                                                 PSLIST_ENTRY last, ULONG count)
diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c
index 9d7b726..465ac1f 100644
--- a/dlls/ntdll/signal_i386.c
+++ b/dlls/ntdll/signal_i386.c
@@ -1467,8 +1467,9 @@ NTSTATUS WINAPI NtSetContextThread( HANDLE handle, const CONTEXT *context )
  * Note: we use a small assembly wrapper to save the necessary registers
  *       in case we are fetching the context of the current thread.
  */
-NTSTATUS CDECL __regs_NtGetContextThread( DWORD edi, DWORD esi, DWORD ebx, DWORD eflags,
-                                          DWORD ebp, DWORD retaddr, HANDLE handle, CONTEXT *context )
+NTSTATUS CDECL DECLSPEC_HIDDEN __regs_NtGetContextThread( DWORD edi, DWORD esi, DWORD ebx, DWORD eflags,
+                                                          DWORD ebp, DWORD retaddr, HANDLE handle,
+                                                          CONTEXT *context )
 {
     NTSTATUS ret;
     DWORD needed_flags = context->ContextFlags & ~CONTEXT_i386;
@@ -2644,8 +2645,8 @@ void __wine_enter_vm86( CONTEXT *context )
 /*******************************************************************
  *		RtlUnwind (NTDLL.@)
  */
-void WINAPI __regs_RtlUnwind( EXCEPTION_REGISTRATION_RECORD* pEndFrame, PVOID targetIp,
-                              PEXCEPTION_RECORD pRecord, PVOID retval, CONTEXT *context )
+void WINAPI DECLSPEC_HIDDEN __regs_RtlUnwind( EXCEPTION_REGISTRATION_RECORD* pEndFrame, PVOID targetIp,
+                                              PEXCEPTION_RECORD pRecord, PVOID retval, CONTEXT *context )
 {
     EXCEPTION_RECORD record;
     EXCEPTION_REGISTRATION_RECORD *frame, *dispatch;
@@ -2850,7 +2851,7 @@ __ASM_GLOBAL_FUNC(call_thread_func_wrapper,
 /***********************************************************************
  *           call_thread_func
  */
-void call_thread_func( LPTHREAD_START_ROUTINE entry, void *arg, void *frame )
+void DECLSPEC_HIDDEN call_thread_func( LPTHREAD_START_ROUTINE entry, void *arg, void *frame )
 {
     x86_thread_data()->exit_frame = frame;
     __TRY
diff --git a/dlls/ntdll/signal_x86_64.c b/dlls/ntdll/signal_x86_64.c
index c1919e8..ed43682 100644
--- a/dlls/ntdll/signal_x86_64.c
+++ b/dlls/ntdll/signal_x86_64.c
@@ -4061,7 +4061,7 @@ USHORT WINAPI RtlCaptureStackBackTrace( ULONG skip, ULONG count, PVOID *buffer,
 /***********************************************************************
  *           call_thread_func
  */
-void call_thread_func( LPTHREAD_START_ROUTINE entry, void *arg, void *frame )
+void DECLSPEC_HIDDEN call_thread_func( LPTHREAD_START_ROUTINE entry, void *arg, void *frame )
 {
     amd64_thread_data()->exit_frame = frame;
     __TRY




More information about the wine-cvs mailing list