AMD64 has a single MS-Win calling convention, so provide an empty __stdcall.
Centralize the definition to make it easier to change.
This commit is contained in:
parent
dece8164ee
commit
a4464dd7ea
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=124504
@ -75,7 +75,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <compat/ndis/cfg_var.h>
|
||||
#include <dev/if_ndis/if_ndisvar.h>
|
||||
|
||||
#define __stdcall __attribute__((__stdcall__))
|
||||
#define NDIS_DUMMY_PATH "\\\\some\\bogus\\path"
|
||||
|
||||
__stdcall static void ndis_status_func(ndis_handle, ndis_status,
|
||||
|
@ -408,6 +408,20 @@ struct image_patch_table {
|
||||
|
||||
typedef struct image_patch_table image_patch_table;
|
||||
|
||||
/*
|
||||
* Note: Windows uses the _stdcall calling convention. This means
|
||||
* that the callback functions provided in the function table must
|
||||
* be declared using __attribute__((__stdcall__)), otherwise the
|
||||
* Windows code will likely screw up the %esp register and cause
|
||||
* us to jump to an invalid address when it returns.
|
||||
*/
|
||||
|
||||
#ifdef __amd64__
|
||||
#define __stdcall
|
||||
#else
|
||||
#define __stdcall __attribute__((__stdcall__))
|
||||
#endif
|
||||
|
||||
__BEGIN_DECLS
|
||||
extern int pe_get_dos_header(vm_offset_t, image_dos_header *);
|
||||
extern int pe_is_nt_image(vm_offset_t);
|
||||
|
@ -55,11 +55,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <compat/ndis/hal_var.h>
|
||||
#include <compat/ndis/ntoskrnl_var.h>
|
||||
|
||||
#ifdef __amd64__
|
||||
#define __stdcall
|
||||
#else
|
||||
#define __stdcall __attribute__((__stdcall__))
|
||||
#endif
|
||||
#define FUNC void(*)(void)
|
||||
|
||||
__stdcall static void hal_stall_exec_cpu(uint32_t);
|
||||
|
@ -100,7 +100,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <compat/ndis/cfg_var.h>
|
||||
#include <dev/if_ndis/if_ndisvar.h>
|
||||
|
||||
#define __stdcall __attribute__((__stdcall__))
|
||||
#define FUNC void(*)(void)
|
||||
|
||||
static struct mtx *ndis_interlock;
|
||||
|
@ -60,7 +60,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <compat/ndis/ndis_var.h>
|
||||
#include <compat/ndis/ntoskrnl_var.h>
|
||||
|
||||
#define __stdcall __attribute__((__stdcall__))
|
||||
#define __regparm __attribute__((regparm(3)))
|
||||
|
||||
#define FUNC void(*)(void)
|
||||
|
@ -575,12 +575,6 @@ pe_functbl_match(functbl, name)
|
||||
* Note that there are actually two copies of the jump table: one
|
||||
* copy is left alone. In a .SYS file, the jump tables are usually
|
||||
* merged into the INIT segment.
|
||||
*
|
||||
* Note: Windows uses the _stdcall calling convention. This means
|
||||
* that the callback functions provided in the function table must
|
||||
* be declared using __attribute__((__stdcall__)), otherwise the
|
||||
* Windows code will likely screw up the %esp register and cause
|
||||
* us to jump to an invalid address when it returns.
|
||||
*/
|
||||
|
||||
int
|
||||
|
Loading…
Reference in New Issue
Block a user