Commit Graph

619 Commits

Author SHA1 Message Date
Alexandre Julliard 99037aa9cc winebuild: Compute the resource offsets while building the resource tree. 2009-08-14 14:11:34 +02:00
Alexandre Julliard 47497cb26a winebuild: Add helper functions for writing binary data to a file. 2009-08-14 13:59:11 +02:00
Alexandre Julliard b935cc210c winebuild: Add helper functions for reading binary data from a file. 2009-08-14 13:59:10 +02:00
Marcus Meissner 051535961a winebuild: Added missing close. 2009-08-10 13:09:35 +02:00
Alexandre Julliard f0ea22ba87 winebuild: Dump resource data as dwords to reduce the output file size. 2009-07-09 12:54:16 +02:00
Alexandre Julliard 7798aed2cf winebuild: Don't try to output 32-bit resources when building a 16-bit wrapper dll. 2009-06-30 12:44:59 +02:00
Stefan Dösinger 07e835fffb winebuild: Open resource files in binary mode. 2009-06-26 12:01:27 +02:00
Alexandre Julliard 2189b101de winebuild: Enforce header size alignment when outputting resources. 2009-06-23 15:53:00 +02:00
Alexandre Julliard 6cf96bf940 winebuild: Add possibility to generate a global resource file without running it through windres. 2009-06-22 11:46:33 +02:00
Alexandre Julliard fec5f5cf1f winebuild: Implement a --large-address-aware flag. 2009-06-17 17:23:20 +02:00
Alexandre Julliard 873e027e01 winebuild: Add unwind annotations to all the generated functions for x86_64. 2009-06-16 14:26:51 +02:00
Alexandre Julliard e00b4582a1 winebuild: Properly restore %rax and %rbx in call_from_regs on x86_64. 2009-06-10 13:22:04 +02:00
Alexandre Julliard e112286366 winebuild: Add detection of duplicate resources. 2009-06-02 14:25:01 +02:00
Alexandre Julliard a328834f5b winebuild: Add a --resources mode that compiles multiple resource files into a single object. 2009-06-02 13:20:43 +02:00
Ken Thomases 0e0e918f0f winebuild: On Mac OS X, use -arch option to control output of "ld" and "as". 2009-05-04 12:51:38 +02:00
Alexandre Julliard 880d00fb43 winebuild: Use iretq on x86_64 to restore more system registers and flags. 2009-05-01 18:03:23 +02:00
Alexandre Julliard b374e7e36e winebuild: Don't include any Windows header to avoid data types dependencies. 2009-04-09 20:58:43 +02:00
Alexandre Julliard 89f6bc2ef4 winebuild: Hardcode the stack frame offsets instead of using the data structures. 2009-04-09 20:30:10 +02:00
Alexandre Julliard d71284f0b4 winebuild: Hardcode the i386 register context offsets instead of using the data structure. 2009-04-09 20:01:56 +02:00
Alexandre Julliard cdad788d33 winebuild: Skip non-functions when building the undefined exports file. 2009-03-25 13:27:27 +01:00
Alexandre Julliard e9ef9911d0 winebuild: Make sure main module is properly initialized. 2009-03-24 11:50:13 +01:00
James Hawkins 665a0424cd winebuild: Document the correlation of spec->ordinals and spec->limit with an assertion (Coverity 902). 2009-03-23 18:21:06 +01:00
Alexandre Julliard 49d2c208d8 winebuild: Ignore 16-bit absolute exports when checking for undefined symbols. 2009-03-04 14:08:35 +01:00
Alexandre Julliard a82ce66048 winebuild: Support the --main-module option for stand-alone 16-bit modules. 2009-03-04 14:08:23 +01:00
Alexandre Julliard fda642d075 winebuild: Don't output the relay table if no entry point needs it. 2009-03-04 14:07:49 +01:00
Alexandre Julliard b2575ebab6 winebuild: Don't prefix local symbols with an underscore. 2009-02-27 17:43:19 +01:00
Alexandre Julliard 5599ac22c7 winebuild: Add support for generating stand-alone 16-bit modules.
This is done by wrapping them inside an empty 32-bit module.
2009-02-26 13:22:47 +01:00
Alexandre Julliard ddc8941d1c winebuild: Allow the module entry point to be NULL. 2009-02-26 12:38:37 +01:00
Alexandre Julliard 445047a97e winebuild: Make the 16-bit DOS header a local symbol. 2009-02-26 12:38:37 +01:00
Alexandre Julliard dca163290d winebuild: Search for the as/ld/nm tools in the PATH under various names. 2009-02-04 19:37:13 +01:00
Alexandre Julliard 0e954b14eb winebuild: Append the correct options for as and ld when forcing a 32/64-bit build. 2009-02-04 19:33:49 +01:00
Alexandre Julliard d07f67acbc winebuild: Determine the appropriate as/ld/nm commands at the time they are needed. 2009-02-04 19:31:54 +01:00
Alexandre Julliard 07f77c4148 winebuild: Add -m32/-m64 options to allow 32/64-bit cross-compiles. 2009-01-15 21:17:51 +01:00
Alexandre Julliard 034a7f8849 winebuild: Add -b as a short option for --target for gcc compatibility. 2009-01-14 12:52:53 +01:00
Alexandre Julliard 465ddc51dc winebuild: Implement register entry points for x86_64. 2009-01-06 17:01:44 +01:00
Alexandre Julliard e31188d9da winebuild: Improve the calling sequence for register functions.
Pass parameters on the stack instead of retrieving them from the code
stream; this ensures that the code contains only valid instructions.
2009-01-06 12:51:18 +01:00
Alexandre Julliard 01722d6010 winebuild: Generate relay debugging thunks for x86_64. 2008-12-27 19:59:55 +01:00
Alexandre Julliard 913354e75b winebuild: Fix delay load code to preserve stack alignment and save the correct registers. 2008-12-27 19:58:42 +01:00
Alexandre Julliard 8a87aaa9d9 winebuild: Generate the __wine_call_from_32_regs function along with the 16-bit kernel routines. 2008-12-27 19:50:25 +01:00
Alexandre Julliard ce63574425 winebuild: Generate stub entry points for x86_64. 2008-12-16 12:20:30 +01:00
Alexandre Julliard fa616418ad winebuild: Make the cpu flag more generic to allow supporting a given entry point on multiple platforms. 2008-12-08 17:07:50 +01:00
Alexandre Julliard 9f1cf1c263 winebuild: Don't add stdcall decorations on non-x86 platforms. 2008-12-03 22:37:07 +01:00
Maarten Lankhorst 1fcc33451a winebuild: Use ms-abi for delayed load stubs. 2008-11-25 12:33:22 +01:00
Rob Shearman 8a6f1655d8 winebuild: Declare fatal_error and fatal_perror as non-returning functions. 2008-09-30 10:20:05 -05:00
Alexandre Julliard 1abf809099 winebuild: Generate MS-style imports using the OriginalFirstThunk field. 2008-09-04 21:52:58 +02:00
Alexandre Julliard b3ec2e5f95 makefiles: Recurse into all directories for install-lib and install-dev too. 2008-08-25 14:27:03 +02:00
Alexandre Julliard b24b2d584e winebuild: Don't put the PE header in the .init section on Solaris. 2008-07-22 13:26:45 +02:00
Alexandre Julliard a3f42116da winebuild: Add Solaris as a separate platform. 2008-07-22 13:26:30 +02:00
Simon Richter 238e1868b2 winebuild: Fix import stub on ppc.
The address calculation was wrong, as the addition of the lower 16 bits
is a signed addition, so if bit 15 is set, the upper 16 bits need to be
incremented by one (so the hi portion of the symbol always references
the symbol + 0x8000).
2008-06-02 12:33:47 +02:00
Simon Richter d1e277fb70 winebuild: Fix branch mnemonic on ppc. 2008-06-02 12:33:27 +02:00
Alexandre Julliard 0c214a7091 winebuild: Add support for 16-bit exe modules. 2008-03-03 15:19:53 +01:00
Alexandre Julliard 5625c6079e Get rid of the global thread.h header. 2008-03-01 11:57:00 +01:00
Dmitry Timoshkov cf94095eb7 winebuild: Add a couple of missing indentations in the generated asm files. 2008-01-23 11:31:43 +01:00
Austin English 90f89fa74d tools: Spelling fixes. 2008-01-18 12:52:09 +01:00
Alexandre Julliard aaf02c6f4a winebuild: Don't try to use the .init section on Mac OS. 2008-01-16 20:27:35 +01:00
Alexandre Julliard 538071ce7e winebuild: Reserve the space for the PE header in the .init section. 2008-01-16 17:51:59 +01:00
Michael Stefaniuc e94bcee53f winebuild: Remove duplicate declaration of variable 'j'. 2007-12-14 12:26:14 +01:00
Alexandre Julliard b462c20876 winebuild: Don't set the IMAGE_FILE_DLL flag on native modules. 2007-12-11 14:59:54 +01:00
Alexandre Julliard 195356c098 winebuild: Also optimize out imports that are only used for forwards. 2007-12-06 21:44:45 +01:00
Alexandre Julliard e6fe7341f5 winebuild: Improved checks for missing forward entry point targets. 2007-12-06 21:43:41 +01:00
Alexandre Julliard 32fc1acb1c winebuild: Print a warning when failing to import a data export. 2007-12-06 21:43:41 +01:00
Alexandre Julliard c32e02e48d winebuild: Add a few nops to stub entry points to make Safedisc happy. 2007-11-07 20:36:04 +01:00
Alexandre Julliard 3243311214 winebuild: Add a -ordinal flag for entry points that must be imported by ordinal but exported by name. 2007-10-26 12:47:40 +02:00
Dmitry Timoshkov 6614028cd0 winebuild: Add IMAGE_FILE_32BIT_MACHINE flag for a 32-bit build. 2007-09-10 15:29:46 +02:00
Alexandre Julliard 44c9758d05 ntdll: Move private data to make room in the TEB for the activation context data. 2007-07-19 16:56:10 +02:00
Dmitry Timoshkov bb15683818 winebuild: Mark builtin DLLs as IMAGE_FILE_LARGE_ADDRESS_AWARE on a 64-bit platform. 2007-05-29 14:00:30 +02:00
Alexandre Julliard 560113b743 winebuild: Set the IMAGE_FILE_EXECUTABLE_IMAGE flag for all modules. 2007-05-24 12:54:27 +02:00
Dmitry Timoshkov 2c59a95122 winebuild: Fix compilation warnings in 64-bit mode. 2007-05-21 15:55:38 +02:00
Rob Shearman 5fcc5d3f62 winebuild: Refer to strings used in generated stubs by symbol rather than by offset to avoid problems when the compiler aligns the strings by 2 or more bytes. 2007-04-25 12:44:16 +02:00
Dmitry Timoshkov d57872567d winebuild: Check if a given forward does exist in one of the imported dlls, fix a couple of problems detected. 2007-04-09 12:19:31 +02:00
Andrew Talbot 5df3ff13e7 winebuild: Replace inline static with static inline. 2007-03-17 20:05:12 +01:00
Joris Huizer c9f1452233 winebuild: sign-compare fixes. 2007-03-05 15:31:48 +01:00
Alexandre Julliard 7035aa5041 make_makefiles: Generate the top-level .gitignore file.
Add a PROGRAMS variable in some makefiles to make things easier.
2006-12-27 21:23:36 +01:00
Alexandre Julliard 662897e9d6 winebuild: Added --nxcompat option, and mark all modules as NX-compatible by default. 2006-12-07 20:51:49 +01:00
Alexandre Julliard 813ae10f33 winebuild: Check for illegal characters in entry point names. 2006-12-04 12:23:58 +01:00
Andrew Talbot 80294709c5 winebuild: Cast-qual warning fix. 2006-10-12 11:33:09 +02:00
Alexandre Julliard 32ab895e46 makefiles: Generate the dependencies line to avoid some code duplication. 2006-09-14 09:38:16 +02:00
Andrew Talbot 0235b1bf26 winebuild: Cast-qual warnings fix. 2006-08-23 12:00:22 +02:00
Alexandre Julliard 715804999e winebuild: Added output() function to properly deal with write errors. 2006-08-11 20:41:29 +02:00
Alexandre Julliard 2886e9b0e8 makefiles: Use make dependencies to create installation directories.
This avoids a lot of redundant calls to mkinstalldirs.
2006-08-07 17:48:18 +02:00
Ge van Geldorp 7a15278504 winebuild: Save registers which might contain parameters for the function to be called. 2006-07-11 17:16:06 +02:00
Ge van Geldorp 2a8b31d162 winebuild: Reserve enough space for null function pointer. 2006-07-11 12:40:01 +02:00
Alexandre Julliard cc2b3b48e6 Take advantage of the recursive nature of .gitignore for Makefile entries.
Prefix other entries with '/' to make them non-recursive.
2006-07-10 20:47:54 +02:00
Alexandre Julliard d489a0a312 winebuild: Get rid of the data16 prefix, it shouldn't be needed anymore and causes warnings. 2006-06-19 21:16:50 +02:00
Alexandre Julliard fb15dabdcd winebuild: Fix a few printf format warnings by casting size_t. 2006-06-13 14:14:59 +02:00
Jonathan Ernst 360a3f9142 Update the address of the Free Software Foundation. 2006-05-23 14:11:13 +02:00
Alexandre Julliard 88bf4d61c3 winebuild: Disable linking to external symbols by default. 2006-04-18 20:49:29 +02:00
Alexandre Julliard 02a9bc0094 winebuild: Fixed index in module table for delayed imports. 2006-04-18 11:23:49 +02:00
Alexandre Julliard 392933149b winebuild: Remove a no longer necessary movzwl instruction.
This could cause broken relays to be generated depending on the order
of the entry points in the relay list.
Also add a few missing tabs in the assembly output.
2006-04-05 20:02:51 +02:00
Robert Shearman 90938d6b6c winebuild: Correction for manpage.
The behaviour for winebuild is to prefer main over WinMain, not the
other way around.
2006-02-16 19:32:35 +01:00
Mike Frysinger 5392844392 Add support for 'make install DESTDIR'. 2006-02-14 13:51:38 +01:00
Alexandre Julliard 433bbdf08a winebuild: Get rid of the default ignored symbols list. 2006-01-24 12:29:31 +01:00
Alexandre Julliard 3f0a473fb7 winebuild: Always import atof, the MS version is different. 2006-01-23 11:27:04 +01:00
Marcus Meissner 1ed3ca0883 winebuild: Output a .note.GNU-stack section to allow nonexecutable stack. 2006-01-21 19:23:36 +01:00
Alexandre Julliard 76ece8530a winebuild: Moved offset definitions to relay.c since they are only
needed there.
Hardcoded a couple of TEB offsets to support cross-compilation.
2006-01-20 19:45:57 +01:00
Alexandre Julliard 4ce433d826 ntdll: Move the %gs register to the ntdll_thread_regs structure. 2006-01-20 16:54:11 +01:00
Alexandre Julliard 8651ceb18e ntdll: Make __wine_call_from_32_restore_regs take a context pointer.
Changed exception raise functions to call it explicitly.
2005-12-19 09:59:50 +01:00
Alexandre Julliard 5dc6d95952 ntdll: New implementation of relay thunks.
New implementation of relay thunks that doesn't require modifying code
on the fly, so that the thunks can be put in the text section.
Some performance improvements.
2005-12-18 10:45:01 +01:00
Alexandre Julliard db4c1561f2 winebuild: Allow -register flag for Win32 too.
This way it can be used as hint for the relay code.
2005-12-16 12:44:16 +01:00
Francois Gouget 5127dc9f49 Assorted spelling fixes. 2005-12-02 16:15:09 +01:00
Alexandre Julliard 0d6a305047 Preserve 16-byte stack alignment in 16-bit relays. 2005-11-28 17:39:05 +01:00
Alexandre Julliard c367dc4f2e Enforce 16-byte stack alignment when returning from 16-bit code and
when calling a register function.
2005-11-28 17:38:40 +01:00
Alexandre Julliard 0ec7e1a591 Renamed all .cvsignore files to .gitignore. 2005-11-26 13:10:33 +01:00
Alexandre Julliard cc01e8ff05 Preserve 16-byte stack alignment in the various assembly
functions. Needed for MacOSX.
2005-11-23 19:55:06 +01:00
Robert Lunnon d4c425b681 Remove SVR4 specific pseudo-ops. 2005-10-24 15:01:34 +00:00
Simon Richter 9aa432346c Fix winebuild's ppc assembly generation. 2005-10-24 15:01:18 +00:00
Alexandre Julliard 12a749984c Put Wine version information in all the man pages. 2005-10-06 16:10:01 +00:00
Alexandre Julliard 664e4106c6 Added global rules for man pages. 2005-10-06 16:06:04 +00:00
Alexandre Julliard fb3a9ed135 Fixed some nroff warnings. 2005-10-06 11:40:43 +00:00
Alexandre Julliard e86a6a2454 Get rid of the debug channels support. 2005-09-29 13:41:34 +00:00
Alexandre Julliard 75c27e17b6 Defined a proper structure for debug channels.
Also put all the function pointers inside a structure and added
__wine_dbg_set_functions to change them instead of exporting the
pointers directly.
2005-09-23 10:52:07 +00:00
Alexandre Julliard 5cb97d833a Generate 16-bit spec files as assembly code too. 2005-09-21 14:23:54 +00:00
Alexandre Julliard 2aae74dff0 Factor out a couple of useful helper functions. 2005-09-21 11:50:04 +00:00
Alexandre Julliard 210bd2dd94 Make sure that values of absolute symbols fit in 16 bits. 2005-09-21 11:10:54 +00:00
Alexandre Julliard 3cd7379d26 Moved stub function generation to import.c. Added a get_stub_name
function to ensure naming consistency.
2005-09-21 10:57:04 +00:00
Alexandre Julliard 5173234ea8 Now that we have to be able to run the assembler from winebuild, added
an option to generate a .spec.o file in a single step.
Added --save-temps and --verbose options for easier debugging.
2005-09-21 10:22:28 +00:00
Alexandre Julliard c5c6968e96 Fixed stack offset of %eax register. 2005-09-20 11:38:29 +00:00
Alexandre Julliard a999a990fe Create an assembly file with all undefined symbols and add it to the
link command so that the symbols show up in the final undefined list.
Use that list to create thunks for all exported but undefined symbols,
to make sure all export RVAs point somewhere inside the module.
2005-09-19 17:04:43 +00:00
Alexandre Julliard 87c347b18e Don't remove ignored symbols from the undefined list, simply skip them
when resolving imports.
Added get_temp_file_name utility function.
2005-09-19 15:24:13 +00:00
Alexandre Julliard 7a52190c03 Take into account -noname functions when checking for duplicate export
names. Fixed a couple of issues found by the stricter check.
2005-09-19 14:44:28 +00:00
Alexandre Julliard 96508ad686 Moved return value handling to the individual relay thunks so that we
only need one version of wine_call_from_16.
Patch the wine_call_from_16 address along with the cs value directly
in the 16-bit code segment to avoid the need for special magic in the
import thunks.
2005-09-18 12:25:22 +00:00
Alexandre Julliard 89024a63d3 Make the users of wine_call_from_32_regs save %eax so that we don't
need a special hack in the import thunk.
Added a get_pc_thunk_eax function to simplify the code a bit.
2005-09-18 11:13:54 +00:00
Alexandre Julliard 80083b18f8 Store RVAs instead of pointers wherever possible in the generated NT
header and directories.
2005-09-17 14:39:51 +00:00
Alexandre Julliard 8c6649e457 Implemented import thunks for x86-64. 2005-09-16 19:39:42 +00:00
Alexandre Julliard 13baa7b364 Added a common function to declare global symbols, and make them
hidden on platforms that support it.
2005-09-15 18:48:39 +00:00
Alexandre Julliard 9f49889188 Now that everything is done in assembly in the spec file, directly
generate a .s file to bypass gcc inefficiency with large data
structures.
2005-09-15 15:01:30 +00:00
Alexandre Julliard 41177ca0bd Output the resource data in assembly too. 2005-09-15 09:42:22 +00:00
Alexandre Julliard 8aba0897bd Output constant strings in a more appropriate section than .text. 2005-09-14 19:18:05 +00:00
Alexandre Julliard 3fa5678ea9 Generate stub functions directly in assembly. 2005-09-14 15:49:45 +00:00
Alexandre Julliard 261e376495 Fixed a number of pointer to integer conversions that wouldn't work
right on a 64-bit platform.
2005-09-12 15:14:06 +00:00
Alexandre Julliard 43bd5512c3 Added support for 64-bit format NT header and export/import tables. 2005-09-08 11:35:19 +00:00
Alexandre Julliard c382ed06d3 Added a bit of framework for future x86_64 support. 2005-09-07 13:31:37 +00:00
Alexandre Julliard e6c7669226 Generate the NT header in assembly instead of using a C structure. 2005-09-07 11:44:16 +00:00
Alexandre Julliard 2aa9e201b2 Output the delayed import table using assembly too. 2005-09-03 15:39:13 +00:00
Alexandre Julliard 932ecb24eb Output the import directory using assembly instead of C structures. 2005-09-02 15:36:03 +00:00
Alexandre Julliard d1c5f68dca Added an entry point routine for native drivers. 2005-09-02 15:19:42 +00:00
Alexandre Julliard ce20722109 Moved the spec file init function and constructor to winecrt0. 2005-09-02 14:43:03 +00:00
Alexandre Julliard 68f177364d Avoid using common symbols, they are broken on Mac OS. 2005-08-29 21:49:57 +00:00
Alexandre Julliard d13b99d5f9 Compute the ordinal base and limit in assign_ordinals instead of doing
it while parsing.
2005-08-29 15:15:42 +00:00
Alexandre Julliard 0628c7eba6 Moved more of the spec initialization code to the winecrt0 library,
and get rid of implicit kernel32 imports.
2005-08-29 14:16:27 +00:00
Alexandre Julliard 9c708060d3 Use __wine_unimplemented_stub from crt0 for 16-bit spec files too. 2005-08-29 10:50:26 +00:00
Alexandre Julliard 5f95aa0c53 Get rid of the unused owner_name field. 2005-08-29 09:40:11 +00:00
Alexandre Julliard d4098549bb Moved the delay loading support code to the winecrt0 library. 2005-08-25 19:37:51 +00:00
Alexandre Julliard b6b180a16d Moved the implementation of spec file stubs to the winecrt0 library. 2005-08-25 15:27:44 +00:00
Alexandre Julliard 71ae2d7bed Beginnings of a crt0 library. 2005-08-25 11:41:05 +00:00
Alexandre Julliard 5370981e06 The exported name strings should be inside the export directory (found
by Vitaliy Margolen).
2005-08-23 20:08:37 +00:00
Alexandre Julliard 2b87c82e76 Added a --undefined option to allow forcing some symbols to be
resolved by the linker.
2005-08-19 11:28:56 +00:00
Alexandre Julliard ec1cdfd12b Added some general purpose routines for managing list of symbol
names.
2005-08-19 10:25:22 +00:00
Alexandre Julliard 646f17f249 Implemented DelayLoadFailureHook and use it in the winebuild-generated
delay load code.
2005-08-12 16:00:42 +00:00
Alexandre Julliard 88aa4b524d Byteswap the resources if we detect that the header is in the wrong
endianness.
2005-08-10 13:04:23 +00:00
Alexandre Julliard d5d8967f69 Added a warning for DllGetVersion and DllInstall not being declared
private. Also warn when one of the Dll* functions is using a different
internal name.
2005-08-09 10:24:05 +00:00
Alexandre Julliard 6d8567824f Print a warning when a generated import library doesn't export
anything useful.
2005-07-26 18:57:19 +00:00
Steve Zellers e51ffce568 Fixed leftover import table name in output_import_thunk. 2005-07-13 11:39:12 +00:00
Marcus Meissner 2d7e976eed Fixed signedness warnings. 2005-07-10 17:45:53 +00:00
Alexandre Julliard 7c91993eba Don't depend on ELF features for PIC code.
A couple of optimizations.
2005-07-05 21:06:00 +00:00
Mike McCormack 723ee0a3bc gcc 4.0 -Wpointer-sign fixes. 2005-07-05 14:26:54 +00:00
Alexandre Julliard aeb4e6e5d2 Get rid of the global debugging flag. 2005-07-05 12:52:57 +00:00
Alexandre Julliard 2b33634018 Intercept functions for 16-bit relay debugging by patching the
CALLFROM16 table instead of having the wine_call_from_16 functions
call out the relay functions explicitly.
2005-07-05 12:52:07 +00:00
Alexandre Julliard e56d9deac4 Added vararg argument type so that the relay code can distinguish from
a normal cdecl function.
Don't rely on the relay thunk preserving the stack pointer.
2005-07-05 11:50:40 +00:00
Alexandre Julliard 1a0f2863db Moved all 16-bit relay code to the text section.
Changed a few symbol names for better consistency.
2005-07-03 11:28:44 +00:00
Alexandre Julliard deaec125ca Don't use the full 32 bits of %esp when called from 16-bit code. 2005-07-01 19:18:46 +00:00
Alexandre Julliard 71914125ce Moved most of the implementation of CALL32_CBClient(Ex) to the C
code.
2005-07-01 16:24:32 +00:00
Alexandre Julliard 89503c182a Added a --target option to allow cross-compilation. 2005-07-01 16:17:44 +00:00
Alexandre Julliard 47286920b6 Improve a bit the assembly generated for import thunks. 2005-07-01 15:49:39 +00:00
Phil Krylov 4f9f7f131c Fixed winebuild operation in Darwin. 2005-06-30 11:00:28 +00:00
Alexandre Julliard 706a0a9e59 Replace configure macros by explicit platform checks (probably not
correct on all platforms yet).
2005-06-29 20:18:58 +00:00
Alexandre Julliard 445fb59802 Replaced all uses of the __ASM_NAME macro by the asm_name function to
allow run-time determination of the correct format.
2005-06-27 18:59:54 +00:00
Alexandre Julliard 803c8d9693 Beginnings of an infrastructure to allow specifying the target CPU and
platform at run-time.
2005-06-27 11:23:24 +00:00
Alexandre Julliard f51496a232 Remove some i386 ifdefs for 16-bit entry points since they are no
longer used by default on other platforms anyway.
2005-06-25 18:34:00 +00:00
Alexandre Julliard 63e9a42b0b Allocate ordinals in the order of the declarations in the spec file. 2005-06-23 16:46:20 +00:00
Wolfgang Thaller 32984a640e Use __ASM_NAME and HAVE_ASM_DOT_SIZE in a few places in winebuild
where they have been missing (needed for Darwin/x86).
2005-06-20 13:38:39 +00:00
Wolfgang Thaller 84c8bf5340 Winebuild darwin/x86-specific fixes:
- Assembler interprets .align as power-of-two
- Add .weak_reference to output where gcc 3.3 swallows it
2005-06-20 11:43:16 +00:00
Alexandre Julliard 190f845cb1 Make import thunks position-independent to avoid text relocations. 2005-06-16 20:51:50 +00:00
Alexandre Julliard 27e868e9ad Generate proper PIC code for CALL32_CBClient. 2005-06-16 15:57:36 +00:00
Alexandre Julliard efcc2b83d8 Store a relative pointer for registry entry points to avoid some text
relocations.
2005-06-16 11:04:41 +00:00
Alexandre Julliard 399300a143 Output the exported names as a C string so that they end up in the
correct section.
2005-06-16 10:43:19 +00:00
Pierre d'Herbemont db134ece39 Use .mod_*_func sections on Mac OS X/i386 instead of the elf
constructor/destructor.
2005-06-10 19:58:26 +00:00
Alexandre Julliard 25c5fe33ba Reuse output_dll_init for the constructor of debug files. 2005-06-10 19:56:05 +00:00
Alexandre Julliard 5c9b7cf55f Moved all assembly code to the end of the generated C files to avoid
conflicting with the compiler over section changes.
2005-06-06 15:59:50 +00:00
Alexandre Julliard 520a7af933 Switch back to .data at the end of asm sections to work around an
optimization in recent gcc versions.
2005-06-05 21:08:51 +00:00
Alexandre Julliard a583b2570b Generate the resource data directly inside the resource directory. 2005-06-05 18:36:24 +00:00
Alexandre Julliard 5ea0dd6d5f Free delayed import modules on PROCESS_DETACH. 2005-05-24 10:13:30 +00:00
Alexandre Julliard 70d0439905 Moved the generated code segment for 16-bit builtins inside the module
structure.
Get rid of the BUILTIN16_DESCRIPTOR structure and directly register
the MZ header instead.
2005-05-23 12:07:15 +00:00
Alexandre Julliard 1970e467d4 Generate 16-bit resources in the proper format inside the module data,
and get rid of the special case for builtins in NE_DefResourceHandler.
2005-05-20 19:19:01 +00:00
Alexandre Julliard dea3a11c6c Use RaiseException instead of RtlRaiseException in 16-bit spec files
since they already depend on kernel32.
2005-05-19 12:51:12 +00:00
Alexandre Julliard 3d5c3609c7 Renamed __wine_(un)register_dll_16 to __wine_dll_(un)register_16 for
consistency with the 32-bit version, and also make the register
function use the same prototype as the 32-bit one.
2005-05-19 12:44:31 +00:00
Alexandre Julliard 67204137ee Generate the 16-bit module header in the standard on-disk format, so
that winebuild doesn't need to know about kernel internal structures.
2005-05-18 18:21:59 +00:00
Alexandre Julliard e8a23c9572 Use the exported IMAGE_OS2_HEADER to generate the module header in the
spec file, and moved the NE_MODULE structure definition to
kernel16_private.h.
2005-05-17 10:21:29 +00:00
Alexandre Julliard 827a69f8ca Avoid referencing stackframe.h from outside kernel32. 2005-05-16 14:20:16 +00:00
Alexandre Julliard 95086f45a4 Moved data structures for 16-bit relay calls to winbase16.h and
removed builtin16.h.
2005-05-16 09:19:18 +00:00
Alexandre Julliard d876893fc1 Store the 16-bit stack pointer in the WOW32Reserved TEB field. 2005-05-14 12:16:46 +00:00
Alexandre Julliard c0d2377565 Removed no longer used support for 32-bit register entry points. 2005-05-07 18:47:22 +00:00
Alexandre Julliard c700f90e63 Use RaiseException instead of RtlRaiseException for delayed entry
points load failure to avoid creating a dependency on ntdll.
2005-05-07 15:06:30 +00:00
Alexandre Julliard 2dabac08ee Added support in winebuild for specifying import libraries directly on
the command line without the -l option.
Changed the -d option to only mark the library as delayed, the actual
loading is now done separately.
2005-05-06 15:54:41 +00:00
Marcus Meissner 9b626b7bed Use correct movw instead of movl when handling segment registers. 2005-04-13 11:17:00 +00:00
Jon Griffiths 523d94ae4c -Wunsigned fixes. 2005-03-18 14:04:07 +00:00
Alexandre Julliard b98d045e02 Don't crash on xrealloc(0) (found by Jon Griffiths). 2005-03-18 14:03:38 +00:00
Alexandre Julliard 300240bf96 Use the correct file name in the "generated automatically" comments. 2005-03-15 15:42:32 +00:00
Dimitrie O. Paun c02dd0a902 Add support for .exe's with exported functions. 2005-03-08 16:55:26 +00:00
Francois Gouget fbb3343547 Assorted spelling fixes. 2005-03-02 13:53:50 +00:00
Francois Gouget 4d801b66e6 Assorted spelling fixes. 2005-02-10 19:19:35 +00:00
Marcus Meissner 87f27ffe08 Put generated import table code into .text segment. 2005-02-09 14:06:32 +00:00
Paul Millar 10a6c56071 Check for features missing in mingw environment, allowing tools
subdirectory to be cross-built again.
2004-12-07 17:19:54 +00:00
Alexandre Julliard 7bfda49772 Clean up temp files also when killed by a signal. 2004-12-02 18:22:48 +00:00
Eric Frias f23b358b0d Handle a def file where the names of the exported functions are listed
without being followed by an equals sign and an alias.
2004-11-21 15:39:51 +00:00
Alexandre Julliard a7094d8e5a winebuild shouldn't depend on the NO_TRACE_MSGS define. 2004-10-19 23:09:02 +00:00
Vincent Béron 2c1b35dd17 Add some more Alpha asm code and Alpha-specific parts. 2004-10-18 21:27:52 +00:00
Vincent Béron baeec1f404 Don't use magic sizes, actually calculate them. 2004-10-14 00:26:08 +00:00
Vincent Béron b07dec4634 Only compile BuildCallFrom16Func on x86. 2004-10-14 00:25:44 +00:00
Alexandre Julliard b4c7e6c7e2 Added --ld-cmd and --nm-cmd options in winebuild, and make winegcc
pass the proper ld command.
2004-10-08 21:11:18 +00:00
Alexandre Julliard 86d4a70baa Fill in the proper offsets in the resource directory instead of
relying on the compiler to do it.
2004-09-07 20:45:03 +00:00
Alexandre Julliard d78ee14b93 Print a warning when DllRegisterServer and similar functions are not
marked private.
2004-08-27 19:40:53 +00:00
Marcus Meissner b2c9c61561 Use "LD" instead of "ld" in winebuild to be able to use a different ld
or ld options.
2004-07-29 02:34:15 +00:00
Pierre d'Herbemont 75c3c37b17 Darwin/Mac OS X Weak import workaround. 2004-07-15 18:58:42 +00:00
Pierre d'Herbemont c5cbf7157c - Be more accurate on Darwin stack size.
- Delay import fix on PowerPC hosts.
2004-07-15 18:57:57 +00:00
Pierre d'Herbemont 390f97a0e6 Delayed import fix for Darwin and PowerPC Host. 2004-07-14 21:42:18 +00:00
Pierre d'Herbemont 68467db6c6 - Detection of .size instruction.
- Detection of the assembler name prefix.
2004-06-18 19:36:26 +00:00
Pierre d'Herbemont 3d60a19287 Hide the _init and _fini wrappers on darwin. 2004-06-17 19:58:59 +00:00
Eric Pouech d3f8f78c3a - added size information about most of the generated thunks (import,
16/32 relay...)
- marked the wine thunks by inserting specific symbols (to be managed
  by wine's dbghelp)
- removed the stabs generation:
  + mostly used by winedbg, and the previous item will replace it for
    dbghelp
  + still broken for gdb anyway
- enhanced const correctness
2004-05-18 21:27:44 +00:00
Alexandre Julliard 32e31ac7c4 Automatically detect whether the entry point is main or WinMain
instead of depending on the subsystem type.
2004-04-08 04:41:14 +00:00
Alexandre Julliard 85c2ccec76 Do not strip stdcall decoration in spec files.
Fixed mapi32 ordinals.
2004-03-31 00:59:36 +00:00
Dmitry Timoshkov d16829846d Add a few missing __ASM_NAME macros. 2004-03-27 20:44:41 +00:00
Alexandre Julliard 4cf091ab09 Replaced the --mode winebuild option by a --subsystem option for
better compatibility with the PE binutils.
2004-03-25 00:40:52 +00:00
Alexandre Julliard d1e0782c9e Removed the Unicode exe modes, and instead detect automatically which
mode to use based on the existence of main or wmain.
2004-03-24 03:39:57 +00:00
Pierre d'Herbemont 0ba5ade849 Darwin support for _init/_fini functions and _end symbol. 2004-03-22 21:12:23 +00:00
Richard Cohen b9a12ad3b7 Remove . from default library search path. 2004-03-17 20:48:44 +00:00
Jukka Heinonen 54a8a25b5e DPMI programs now handle pending events. 2004-03-16 01:15:11 +00:00
Jukka Heinonen 70835ebf02 Remove support for generating interrupt handlers. 2004-03-15 20:09:23 +00:00
Alexandre Julliard 492ac292b9 Added support for building a dll from a .def file for cases where we
don't want to write a full .spec.
Renamed --spec option to --dll for consistency.
2004-02-17 20:36:16 +00:00
Alexandre Julliard 095b498b17 Renamed --exe-mode option to --mode now that it can be used for dlls
too.
2004-02-16 22:24:24 +00:00
Marcus Meissner d496eb08e7 No need to check for DllEntryPoint style constants. 2004-02-16 20:24:32 +00:00
Alexandre Julliard 5e4a5beccb Added native mode dll support (based on a patch by Marcus Meissner). 2004-02-13 22:42:13 +00:00
Alexandre Julliard 8611e654fc Store all information about the current dll in a structure instead of
using global variables to make it easier to reuse the parsing
routines.
2004-02-11 06:41:01 +00:00
Robert Shearman 932a102dcd Fix proc name reported in delay load failure. 2004-02-09 20:58:42 +00:00
Alexandre Julliard f33de52f5e Tweaked the init code so that it works properly no matter what linker
options are used.
2004-01-15 04:58:17 +00:00
Alexandre Julliard 3604824262 If supported by the linker, prevent the ELF loader from calling the
dll constructors at load time and call them from the dll entry point
instead.
2004-01-08 03:36:53 +00:00
Alexandre Julliard 0b19a6f7bc Better support for div and ldiv in Winelib apps. 2003-11-28 23:17:28 +00:00
Dimitrie O. Paun c0232546bd Make the winehq.org domain the official one. 2003-11-26 03:55:01 +00:00
Alexandre Julliard f01e7c6364 open_input_file(): try to open the file in the current directory
before trying the source directory.
2003-11-20 04:21:56 +00:00
Alexandre Julliard 18b4cbf12a Put better values for code and data sizes in the NT header of builtin
dlls.
2003-11-03 22:19:44 +00:00
Alexandre Julliard 03711317de Better defaults for heap and stack sizes. 2003-10-30 22:49:01 +00:00
Alexandre Julliard 4cb001967a Switch back to the main process stack before calling exception
handlers.
2003-10-28 00:30:55 +00:00
Pierre d'Herbemont e961418bcf Fix PowerPC assembler syntax mistakes. 2003-10-27 22:04:54 +00:00
Pierre d'Herbemont 6661f30409 Change mctr PowerPC asm instruction to mtctr. Add Support for the
.text section and the .space section of darwin's ld.
2003-10-24 00:27:27 +00:00
Alexandre Julliard 67d9f38059 Added __wine_set_signal_fs function to avoid sharing the
SYSLEVEL_Win16CurrentTeb variable between kernel and ntdll.
On the kernel side, replaced SYSLEVEL_Win16CurrentTeb by
CallTo16_TebSelector stored directly in the asm relay code to avoid a
run-time relocation.
2003-10-08 22:59:22 +00:00
Daniel Marmier 9bb19ac2d2 Fixed warnings with gcc option "-Wwrite-strings". 2003-10-03 03:35:20 +00:00
Alexandre Julliard 60c857e19c Store the dll name for the export directory inside the exported names
list.
2003-09-26 04:36:46 +00:00
Dimitrie O. Paun 8b255842ec Remove the obsolete pascal16 (replaced by pascal -ret16). 2003-09-26 04:32:19 +00:00
Jon Griffiths 821b228cda MSVC warning fix. 2003-09-24 05:12:28 +00:00
Steven Edwards a23b8c8fbe Porting fix for Alpha. 2003-09-22 19:27:56 +00:00