2000-06-23 22:15:35 +02:00
|
|
|
/*
|
|
|
|
* Copyright 1993 Robert J. Amstadt
|
|
|
|
* Copyright 1995 Martin von Loewis
|
|
|
|
* Copyright 1995, 1996, 1997 Alexandre Julliard
|
|
|
|
* Copyright 1997 Eric Youngdale
|
|
|
|
* Copyright 1999 Ulrich Weigand
|
2002-03-10 00:29:33 +01:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
2006-05-18 14:49:52 +02:00
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
2000-06-23 22:15:35 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __WINE_BUILD_H
|
|
|
|
#define __WINE_BUILD_H
|
|
|
|
|
2002-04-25 23:40:56 +02:00
|
|
|
#ifndef __WINE_CONFIG_H
|
|
|
|
# error You must include config.h to use this header
|
|
|
|
#endif
|
2001-11-06 21:57:11 +01:00
|
|
|
|
2000-06-23 22:15:35 +02:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
2002-03-11 06:09:02 +01:00
|
|
|
#include <string.h>
|
2000-06-23 22:15:35 +02:00
|
|
|
|
2009-04-09 20:58:43 +02:00
|
|
|
#ifndef max
|
|
|
|
#define max(a,b) (((a) > (b)) ? (a) : (b))
|
|
|
|
#endif
|
|
|
|
#ifndef min
|
|
|
|
#define min(a,b) (((a) < (b)) ? (a) : (b))
|
|
|
|
#endif
|
|
|
|
|
2019-06-17 09:24:45 +02:00
|
|
|
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
|
|
|
|
|
2000-06-23 22:15:35 +02:00
|
|
|
typedef enum
|
|
|
|
{
|
2000-11-26 05:31:48 +01:00
|
|
|
TYPE_VARIABLE, /* variable */
|
2003-08-27 04:20:44 +02:00
|
|
|
TYPE_PASCAL, /* pascal function (Win16) */
|
2000-06-23 22:15:35 +02:00
|
|
|
TYPE_ABS, /* absolute value (Win16) */
|
|
|
|
TYPE_STUB, /* unimplemented stub */
|
|
|
|
TYPE_STDCALL, /* stdcall function (Win32) */
|
|
|
|
TYPE_CDECL, /* cdecl function (Win32) */
|
|
|
|
TYPE_VARARGS, /* varargs function (Win32) */
|
|
|
|
TYPE_EXTERN, /* external symbol (Win32) */
|
|
|
|
TYPE_NBTYPES
|
|
|
|
} ORD_TYPE;
|
|
|
|
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
SPEC_WIN16,
|
|
|
|
SPEC_WIN32
|
|
|
|
} SPEC_TYPE;
|
|
|
|
|
2010-08-30 12:06:19 +02:00
|
|
|
enum arg_type
|
|
|
|
{
|
|
|
|
ARG_WORD, /* 16-bit word */
|
|
|
|
ARG_SWORD, /* 16-bit signed word */
|
|
|
|
ARG_SEGPTR, /* segmented pointer */
|
|
|
|
ARG_SEGSTR, /* segmented pointer to Ansi string */
|
|
|
|
ARG_LONG, /* long */
|
|
|
|
ARG_PTR, /* pointer */
|
|
|
|
ARG_STR, /* pointer to Ansi string */
|
|
|
|
ARG_WSTR, /* pointer to Unicode string */
|
2010-08-30 12:40:53 +02:00
|
|
|
ARG_INT64, /* 64-bit integer */
|
|
|
|
ARG_INT128, /* 128-bit integer */
|
|
|
|
ARG_FLOAT, /* 32-bit float */
|
|
|
|
ARG_DOUBLE, /* 64-bit float */
|
2010-08-30 12:06:19 +02:00
|
|
|
ARG_MAXARG = ARG_DOUBLE
|
|
|
|
};
|
|
|
|
|
|
|
|
#define MAX_ARGUMENTS 32
|
|
|
|
|
2000-06-23 22:15:35 +02:00
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
int n_values;
|
2017-02-02 05:23:53 +01:00
|
|
|
unsigned int *values;
|
2000-06-23 22:15:35 +02:00
|
|
|
} ORD_VARIABLE;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
2011-05-03 12:49:15 +02:00
|
|
|
int nb_args;
|
2017-12-07 11:14:02 +01:00
|
|
|
int args_str_offset;
|
2010-08-30 12:06:19 +02:00
|
|
|
enum arg_type args[MAX_ARGUMENTS];
|
2000-06-23 22:15:35 +02:00
|
|
|
} ORD_FUNCTION;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
2005-09-21 13:10:54 +02:00
|
|
|
unsigned short value;
|
2000-06-23 22:15:35 +02:00
|
|
|
} ORD_ABS;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
ORD_TYPE type;
|
|
|
|
int ordinal;
|
2019-03-20 11:49:38 +01:00
|
|
|
int hint;
|
2000-11-26 05:31:48 +01:00
|
|
|
int lineno;
|
|
|
|
int flags;
|
2002-07-28 19:54:31 +02:00
|
|
|
char *name; /* public name of this function */
|
|
|
|
char *link_name; /* name of the C symbol to link to */
|
|
|
|
char *export_name; /* name exported under for noname exports */
|
2000-06-23 22:15:35 +02:00
|
|
|
union
|
|
|
|
{
|
|
|
|
ORD_VARIABLE var;
|
|
|
|
ORD_FUNCTION func;
|
|
|
|
ORD_ABS abs;
|
|
|
|
} u;
|
|
|
|
} ORDDEF;
|
|
|
|
|
2004-02-11 07:41:01 +01:00
|
|
|
typedef struct
|
|
|
|
{
|
2006-04-18 20:49:29 +02:00
|
|
|
char *src_name; /* file name of the source spec file */
|
2004-02-11 07:41:01 +01:00
|
|
|
char *file_name; /* file name of the dll */
|
|
|
|
char *dll_name; /* internal name of the dll */
|
2016-03-22 07:06:27 +01:00
|
|
|
char *c_name; /* internal name of the dll, as a C-compatible identifier */
|
2004-02-11 07:41:01 +01:00
|
|
|
char *init_func; /* initialization routine */
|
2009-03-04 14:08:23 +01:00
|
|
|
char *main_module; /* main Win32 module for Win16 specs */
|
2004-02-11 07:41:01 +01:00
|
|
|
SPEC_TYPE type; /* type of dll (Win16/Win32) */
|
|
|
|
int base; /* ordinal base */
|
|
|
|
int limit; /* ordinal limit */
|
|
|
|
int stack_size; /* exe stack size */
|
|
|
|
int heap_size; /* exe heap size */
|
|
|
|
int nb_entry_points; /* number of used entry points */
|
|
|
|
int alloc_entry_points; /* number of allocated entry points */
|
|
|
|
int nb_names; /* number of entry points with names */
|
2005-03-18 15:04:07 +01:00
|
|
|
unsigned int nb_resources; /* number of resources */
|
2004-03-25 01:40:52 +01:00
|
|
|
int characteristics; /* characteristics for the PE header */
|
2006-12-07 20:51:49 +01:00
|
|
|
int dll_characteristics;/* DLL characteristics for the PE header */
|
2004-03-25 01:40:52 +01:00
|
|
|
int subsystem; /* subsystem id */
|
|
|
|
int subsystem_major; /* subsystem version major number */
|
|
|
|
int subsystem_minor; /* subsystem version minor number */
|
2004-02-11 07:41:01 +01:00
|
|
|
ORDDEF *entry_points; /* dll entry points */
|
|
|
|
ORDDEF **names; /* array of entry point names (points into entry_points) */
|
|
|
|
ORDDEF **ordinals; /* array of dll ordinals (points into entry_points) */
|
|
|
|
struct resource *resources; /* array of dll resources (format differs between Win16/Win32) */
|
|
|
|
} DLLSPEC;
|
|
|
|
|
2005-06-27 13:23:24 +02:00
|
|
|
enum target_cpu
|
|
|
|
{
|
2013-03-08 21:35:13 +01:00
|
|
|
CPU_x86, CPU_x86_64, CPU_POWERPC, CPU_ARM, CPU_ARM64, CPU_LAST = CPU_ARM64
|
2005-06-27 13:23:24 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
enum target_platform
|
|
|
|
{
|
2009-10-05 02:24:57 +02:00
|
|
|
PLATFORM_UNSPECIFIED,
|
|
|
|
PLATFORM_APPLE,
|
|
|
|
PLATFORM_FREEBSD,
|
|
|
|
PLATFORM_SOLARIS,
|
|
|
|
PLATFORM_WINDOWS
|
2005-06-27 13:23:24 +02:00
|
|
|
};
|
|
|
|
|
2009-02-04 19:31:54 +01:00
|
|
|
extern char *target_alias;
|
2005-06-27 13:23:24 +02:00
|
|
|
extern enum target_cpu target_cpu;
|
|
|
|
extern enum target_platform target_platform;
|
|
|
|
|
2010-08-02 12:07:53 +02:00
|
|
|
struct strarray
|
|
|
|
{
|
|
|
|
const char **str;
|
|
|
|
unsigned int count;
|
|
|
|
unsigned int max;
|
|
|
|
};
|
|
|
|
|
2000-11-26 05:31:48 +01:00
|
|
|
/* entry point flags */
|
2019-06-21 12:08:44 +02:00
|
|
|
#define FLAG_NORELAY 0x0001 /* don't use relay debugging for this function */
|
|
|
|
#define FLAG_NONAME 0x0002 /* don't export function by name */
|
|
|
|
#define FLAG_RET16 0x0004 /* function returns a 16-bit value */
|
|
|
|
#define FLAG_RET64 0x0008 /* function returns a 64-bit value */
|
|
|
|
#define FLAG_REGISTER 0x0010 /* use register calling convention */
|
|
|
|
#define FLAG_PRIVATE 0x0020 /* function is private (cannot be imported) */
|
|
|
|
#define FLAG_ORDINAL 0x0040 /* function should be imported by ordinal */
|
|
|
|
#define FLAG_THISCALL 0x0080 /* use thiscall calling convention */
|
|
|
|
#define FLAG_FASTCALL 0x0100 /* use fastcall calling convention */
|
|
|
|
#define FLAG_IMPORT 0x0200 /* export is imported from another module */
|
|
|
|
|
|
|
|
#define FLAG_FORWARD 0x1000 /* function is a forwarded name */
|
|
|
|
#define FLAG_EXT_LINK 0x2000 /* function links to an external symbol */
|
|
|
|
#define FLAG_EXPORT32 0x4000 /* 32-bit export in 16-bit spec file */
|
|
|
|
|
|
|
|
#define FLAG_CPU(cpu) (0x10000 << (cpu))
|
2009-11-19 16:44:08 +01:00
|
|
|
#define FLAG_CPU_MASK (FLAG_CPU(CPU_LAST + 1) - FLAG_CPU(0))
|
2013-01-16 00:43:01 +01:00
|
|
|
#define FLAG_CPU_WIN64 (FLAG_CPU(CPU_x86_64) | FLAG_CPU(CPU_ARM64))
|
2009-08-24 12:49:07 +02:00
|
|
|
#define FLAG_CPU_WIN32 (FLAG_CPU_MASK & ~FLAG_CPU_WIN64)
|
2008-12-08 17:07:50 +01:00
|
|
|
|
2000-12-16 00:04:40 +01:00
|
|
|
#define MAX_ORDINALS 65535
|
2000-06-23 22:15:35 +02:00
|
|
|
|
2009-04-09 20:58:43 +02:00
|
|
|
/* some Windows constants */
|
|
|
|
|
|
|
|
#define IMAGE_FILE_RELOCS_STRIPPED 0x0001 /* No relocation info */
|
|
|
|
#define IMAGE_FILE_EXECUTABLE_IMAGE 0x0002
|
|
|
|
#define IMAGE_FILE_LINE_NUMS_STRIPPED 0x0004
|
|
|
|
#define IMAGE_FILE_LOCAL_SYMS_STRIPPED 0x0008
|
|
|
|
#define IMAGE_FILE_AGGRESIVE_WS_TRIM 0x0010
|
|
|
|
#define IMAGE_FILE_LARGE_ADDRESS_AWARE 0x0020
|
|
|
|
#define IMAGE_FILE_16BIT_MACHINE 0x0040
|
|
|
|
#define IMAGE_FILE_BYTES_REVERSED_LO 0x0080
|
|
|
|
#define IMAGE_FILE_32BIT_MACHINE 0x0100
|
|
|
|
#define IMAGE_FILE_DEBUG_STRIPPED 0x0200
|
|
|
|
#define IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP 0x0400
|
|
|
|
#define IMAGE_FILE_NET_RUN_FROM_SWAP 0x0800
|
|
|
|
#define IMAGE_FILE_SYSTEM 0x1000
|
|
|
|
#define IMAGE_FILE_DLL 0x2000
|
|
|
|
#define IMAGE_FILE_UP_SYSTEM_ONLY 0x4000
|
|
|
|
#define IMAGE_FILE_BYTES_REVERSED_HI 0x8000
|
|
|
|
|
|
|
|
#define IMAGE_DLLCHARACTERISTICS_NX_COMPAT 0x0100
|
|
|
|
|
|
|
|
#define IMAGE_SUBSYSTEM_NATIVE 1
|
|
|
|
#define IMAGE_SUBSYSTEM_WINDOWS_GUI 2
|
|
|
|
#define IMAGE_SUBSYSTEM_WINDOWS_CUI 3
|
2010-11-08 18:52:12 +01:00
|
|
|
#define IMAGE_SUBSYSTEM_WINDOWS_CE_GUI 9
|
2009-04-09 20:58:43 +02:00
|
|
|
|
2000-06-23 22:15:35 +02:00
|
|
|
/* global functions */
|
|
|
|
|
2003-09-19 02:19:16 +02:00
|
|
|
#ifndef __GNUC__
|
|
|
|
#define __attribute__(X)
|
|
|
|
#endif
|
|
|
|
|
2008-09-30 14:54:32 +02:00
|
|
|
#ifndef DECLSPEC_NORETURN
|
|
|
|
# if defined(_MSC_VER) && (_MSC_VER >= 1200) && !defined(MIDL_PASS)
|
|
|
|
# define DECLSPEC_NORETURN __declspec(noreturn)
|
|
|
|
# else
|
|
|
|
# define DECLSPEC_NORETURN __attribute__((noreturn))
|
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
2000-06-23 22:15:35 +02:00
|
|
|
extern void *xmalloc (size_t size);
|
|
|
|
extern void *xrealloc (void *ptr, size_t size);
|
|
|
|
extern char *xstrdup( const char *str );
|
|
|
|
extern char *strupper(char *s);
|
2005-05-06 17:54:41 +02:00
|
|
|
extern int strendswith(const char* str, const char* end);
|
2010-08-02 10:11:23 +02:00
|
|
|
extern char *strmake(const char* fmt, ...) __attribute__((__format__ (__printf__, 1, 2 )));
|
2016-03-19 05:10:09 +01:00
|
|
|
extern struct strarray strarray_fromstring( const char *str, const char *delim );
|
2010-08-02 12:07:53 +02:00
|
|
|
extern void strarray_add( struct strarray *array, ... );
|
|
|
|
extern void strarray_addv( struct strarray *array, char * const *argv );
|
2016-03-25 07:32:22 +01:00
|
|
|
extern void strarray_addall( struct strarray *array, struct strarray args );
|
2008-09-30 14:54:32 +02:00
|
|
|
extern DECLSPEC_NORETURN void fatal_error( const char *msg, ... )
|
2003-09-19 02:19:16 +02:00
|
|
|
__attribute__ ((__format__ (__printf__, 1, 2)));
|
2008-09-30 14:54:32 +02:00
|
|
|
extern DECLSPEC_NORETURN void fatal_perror( const char *msg, ... )
|
2003-09-19 02:19:16 +02:00
|
|
|
__attribute__ ((__format__ (__printf__, 1, 2)));
|
|
|
|
extern void error( const char *msg, ... )
|
|
|
|
__attribute__ ((__format__ (__printf__, 1, 2)));
|
|
|
|
extern void warning( const char *msg, ... )
|
|
|
|
__attribute__ ((__format__ (__printf__, 1, 2)));
|
2006-08-11 20:41:29 +02:00
|
|
|
extern int output( const char *format, ... )
|
|
|
|
__attribute__ ((__format__ (__printf__, 1, 2)));
|
2010-04-11 12:01:01 +02:00
|
|
|
extern void output_cfi( const char *format, ... )
|
2019-03-06 10:13:45 +01:00
|
|
|
__attribute__ ((__format__ (__printf__, 1, 2)));
|
|
|
|
extern void output_rva( const char *format, ... )
|
2010-04-11 12:01:01 +02:00
|
|
|
__attribute__ ((__format__ (__printf__, 1, 2)));
|
2016-03-19 05:10:09 +01:00
|
|
|
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);
|
|
|
|
extern struct strarray get_ld_command(void);
|
2009-02-04 19:31:54 +01:00
|
|
|
extern const char *get_nm_command(void);
|
2013-03-04 17:21:16 +01:00
|
|
|
extern void cleanup_tmp_files(void);
|
2005-09-19 17:24:13 +02:00
|
|
|
extern char *get_temp_file_name( const char *prefix, const char *suffix );
|
2006-08-11 20:41:29 +02:00
|
|
|
extern void output_standard_file_header(void);
|
2002-08-01 20:34:12 +02:00
|
|
|
extern FILE *open_input_file( const char *srcdir, const char *name );
|
|
|
|
extern void close_input_file( FILE *file );
|
2019-03-04 14:31:48 +01:00
|
|
|
extern void open_output_file(void);
|
|
|
|
extern void close_output_file(void);
|
2019-03-04 14:46:02 +01:00
|
|
|
extern char *open_temp_output_file( const char *suffix );
|
2006-08-11 20:41:29 +02:00
|
|
|
extern void dump_bytes( const void *buffer, unsigned int size );
|
2004-02-17 21:36:16 +01:00
|
|
|
extern int remove_stdcall_decoration( char *name );
|
2005-09-21 12:22:28 +02:00
|
|
|
extern void assemble_file( const char *src_file, const char *obj_file );
|
2004-02-17 21:36:16 +01:00
|
|
|
extern DLLSPEC *alloc_dll_spec(void);
|
|
|
|
extern void free_dll_spec( DLLSPEC *spec );
|
2016-03-22 07:06:27 +01:00
|
|
|
extern char *make_c_identifier( const char *str );
|
2005-09-21 12:57:04 +02:00
|
|
|
extern const char *get_stub_name( const ORDDEF *odp, const DLLSPEC *spec );
|
2019-03-06 10:12:55 +01:00
|
|
|
extern const char *get_link_name( const ORDDEF *odp );
|
2015-03-04 09:25:06 +01:00
|
|
|
extern int get_cpu_from_name( const char *name );
|
2005-06-27 13:23:24 +02:00
|
|
|
extern unsigned int get_alignment(unsigned int align);
|
|
|
|
extern unsigned int get_page_size(void);
|
2005-09-07 15:31:37 +02:00
|
|
|
extern unsigned int get_ptr_size(void);
|
2010-08-30 12:06:19 +02:00
|
|
|
extern unsigned int get_args_size( const ORDDEF *odp );
|
2005-06-27 20:59:54 +02:00
|
|
|
extern const char *asm_name( const char *func );
|
2005-06-27 13:23:24 +02:00
|
|
|
extern const char *func_declaration( const char *func );
|
2005-09-15 20:48:39 +02:00
|
|
|
extern const char *asm_globl( const char *func );
|
2005-09-07 15:31:37 +02:00
|
|
|
extern const char *get_asm_ptr_keyword(void);
|
2005-06-29 22:18:58 +02:00
|
|
|
extern const char *get_asm_string_keyword(void);
|
2019-03-13 10:51:24 +01:00
|
|
|
extern const char *get_asm_export_section(void);
|
2005-12-18 10:45:01 +01:00
|
|
|
extern const char *get_asm_rodata_section(void);
|
2019-03-13 10:51:24 +01:00
|
|
|
extern const char *get_asm_rsrc_section(void);
|
2005-09-14 21:18:05 +02:00
|
|
|
extern const char *get_asm_string_section(void);
|
2006-08-11 20:41:29 +02:00
|
|
|
extern void output_function_size( const char *name );
|
|
|
|
extern void output_gnu_stack_note(void);
|
2001-02-13 03:06:38 +01:00
|
|
|
|
2005-05-06 17:54:41 +02:00
|
|
|
extern void add_import_dll( const char *name, const char *filename );
|
|
|
|
extern void add_delayed_import( const char *name );
|
2005-08-19 13:28:56 +02:00
|
|
|
extern void add_extra_ld_symbol( const char *name );
|
2005-08-25 13:41:05 +02:00
|
|
|
extern void read_undef_symbols( DLLSPEC *spec, char **argv );
|
2010-01-16 15:50:27 +01:00
|
|
|
extern void resolve_imports( DLLSPEC *spec );
|
|
|
|
extern int is_undefined( const char *name );
|
2005-09-08 13:35:19 +02:00
|
|
|
extern int has_imports(void);
|
2006-08-11 20:41:29 +02:00
|
|
|
extern void output_get_pc_thunk(void);
|
2009-02-24 18:02:15 +01:00
|
|
|
extern void output_module( DLLSPEC *spec );
|
2006-08-11 20:41:29 +02:00
|
|
|
extern void output_stubs( DLLSPEC *spec );
|
|
|
|
extern void output_imports( DLLSPEC *spec );
|
2009-12-30 11:51:19 +01:00
|
|
|
extern void output_import_lib( DLLSPEC *spec, char **argv );
|
2009-02-24 18:02:15 +01:00
|
|
|
extern void output_exports( DLLSPEC *spec );
|
2004-02-11 07:41:01 +01:00
|
|
|
extern int load_res32_file( const char *name, DLLSPEC *spec );
|
2006-08-11 20:41:29 +02:00
|
|
|
extern void output_resources( DLLSPEC *spec );
|
2009-08-14 14:16:38 +02:00
|
|
|
extern void output_bin_resources( DLLSPEC *spec, unsigned int start_rva );
|
2019-03-06 10:10:30 +01:00
|
|
|
extern void output_spec32_file( DLLSPEC *spec );
|
2009-08-14 14:16:38 +02:00
|
|
|
extern void output_fake_module( DLLSPEC *spec );
|
2019-03-20 12:33:14 +01:00
|
|
|
extern void output_def_file( DLLSPEC *spec, int include_stubs );
|
2004-02-11 07:41:01 +01:00
|
|
|
extern void load_res16_file( const char *name, DLLSPEC *spec );
|
2006-08-11 20:41:29 +02:00
|
|
|
extern void output_res16_data( DLLSPEC *spec );
|
2009-08-15 11:21:38 +02:00
|
|
|
extern void output_bin_res16_data( DLLSPEC *spec );
|
2009-02-24 17:47:09 +01:00
|
|
|
extern void output_res16_directory( DLLSPEC *spec );
|
2009-08-15 11:21:38 +02:00
|
|
|
extern void output_bin_res16_directory( DLLSPEC *spec, unsigned int data_offset );
|
2009-02-24 18:02:15 +01:00
|
|
|
extern void output_spec16_file( DLLSPEC *spec );
|
2009-08-14 14:16:38 +02:00
|
|
|
extern void output_fake_module16( DLLSPEC *spec16 );
|
2009-05-30 21:39:50 +02:00
|
|
|
extern void output_res_o_file( DLLSPEC *spec );
|
2010-01-16 15:58:48 +01:00
|
|
|
extern void output_asm_relays16(void);
|
2000-06-23 22:15:35 +02:00
|
|
|
|
2009-02-24 18:02:15 +01:00
|
|
|
extern void add_16bit_exports( DLLSPEC *spec32, DLLSPEC *spec16 );
|
2004-02-17 21:36:16 +01:00
|
|
|
extern int parse_spec_file( FILE *file, DLLSPEC *spec );
|
|
|
|
extern int parse_def_file( FILE *file, DLLSPEC *spec );
|
2000-06-23 22:15:35 +02:00
|
|
|
|
2009-08-14 13:22:26 +02:00
|
|
|
/* buffer management */
|
|
|
|
|
|
|
|
extern int byte_swapped;
|
|
|
|
extern const char *input_buffer_filename;
|
|
|
|
extern const unsigned char *input_buffer;
|
|
|
|
extern size_t input_buffer_pos;
|
|
|
|
extern size_t input_buffer_size;
|
2009-08-14 13:26:09 +02:00
|
|
|
extern unsigned char *output_buffer;
|
|
|
|
extern size_t output_buffer_pos;
|
|
|
|
extern size_t output_buffer_size;
|
2009-08-14 13:22:26 +02:00
|
|
|
|
|
|
|
extern void init_input_buffer( const char *file );
|
2009-08-14 13:26:09 +02:00
|
|
|
extern void init_output_buffer(void);
|
|
|
|
extern void flush_output_buffer(void);
|
2009-08-14 13:22:26 +02:00
|
|
|
extern unsigned char get_byte(void);
|
|
|
|
extern unsigned short get_word(void);
|
|
|
|
extern unsigned int get_dword(void);
|
2009-08-14 13:26:09 +02:00
|
|
|
extern void put_data( const void *data, size_t size );
|
|
|
|
extern void put_byte( unsigned char val );
|
|
|
|
extern void put_word( unsigned short val );
|
|
|
|
extern void put_dword( unsigned int val );
|
|
|
|
extern void put_qword( unsigned int val );
|
|
|
|
extern void put_pword( unsigned int val );
|
|
|
|
extern void align_output( unsigned int align );
|
2009-08-14 13:22:26 +02:00
|
|
|
|
2000-06-23 22:15:35 +02:00
|
|
|
/* global variables */
|
|
|
|
|
|
|
|
extern int current_line;
|
|
|
|
extern int UsePIC;
|
2003-03-18 06:30:54 +01:00
|
|
|
extern int nb_errors;
|
2002-03-21 02:38:53 +01:00
|
|
|
extern int display_warnings;
|
2002-12-12 05:06:28 +01:00
|
|
|
extern int kill_at;
|
2005-09-21 12:22:28 +02:00
|
|
|
extern int verbose;
|
2006-04-18 20:49:29 +02:00
|
|
|
extern int link_ext_symbols;
|
2009-01-15 21:17:51 +01:00
|
|
|
extern int force_pointer_size;
|
2010-04-11 12:07:44 +02:00
|
|
|
extern int unwind_tables;
|
2019-06-17 09:24:25 +02:00
|
|
|
extern int unix_lib;
|
2000-06-23 22:15:35 +02:00
|
|
|
|
2002-08-01 20:34:12 +02:00
|
|
|
extern char *input_file_name;
|
2005-03-15 16:42:32 +01:00
|
|
|
extern char *spec_file_name;
|
2006-08-11 20:41:29 +02:00
|
|
|
extern FILE *output_file;
|
2000-06-23 22:15:35 +02:00
|
|
|
extern const char *output_file_name;
|
|
|
|
|
2016-03-19 05:22:30 +01:00
|
|
|
extern struct strarray lib_path;
|
2016-03-19 05:10:09 +01:00
|
|
|
extern struct strarray as_command;
|
|
|
|
extern struct strarray cc_command;
|
|
|
|
extern struct strarray ld_command;
|
|
|
|
extern struct strarray nm_command;
|
2011-04-27 19:45:11 +02:00
|
|
|
extern char *cpu_option;
|
2018-11-05 20:20:25 +01:00
|
|
|
extern char *fpu_option;
|
2015-12-13 21:01:19 +01:00
|
|
|
extern char *arch_option;
|
2017-12-08 11:55:30 +01:00
|
|
|
extern const char *float_abi_option;
|
2014-02-12 12:57:27 +01:00
|
|
|
extern int thumb_mode;
|
2016-03-22 09:59:30 +01:00
|
|
|
extern int needs_get_pc_thunk;
|
2004-10-08 23:11:18 +02:00
|
|
|
|
2000-06-23 22:15:35 +02:00
|
|
|
#endif /* __WINE_BUILD_H */
|