Commit graph

20 commits

Author SHA1 Message Date
Justin Miller be223b9de7
[SDK] Allow ARM64 MSVC to complete configuration (#4045)
- Add some of the missing CMake adjustments to continue the configure and compile process with ARM64 MSVC
- Created quick stubs for the functions in SDK needed to finish the configuration process
- Put in an ARM64 option for spec2def

CORE-17518 CORE-17615
2021-10-22 18:52:32 +03:00
Hermès Bélusca-Maïto 9b1edceae1
[REACTOS] Fix some instances of DPRINTs with trailing whitespace before newlines. 2021-09-13 03:52:19 +02:00
Jérôme Gardou a8255233f8 [SPEC2DEF] Fix imports of C++ stdcall exports
Too much mangling mangles it too much
2021-05-03 22:00:57 +02:00
Jérôme Gardou fa56912d42 [SPEC2DEF] Allow stubs with parameters, and assume stdcall in that case 2021-02-04 16:37:01 +01:00
Jérôme Gardou 5387a7ccb2 [SPEC2DEF] Work-around a bug in MS linker handling of extern forwarders 2020-12-28 12:13:30 +01:00
Timo Kreuzer 0b0bb1a93b [SPEC2DEF] Implement support for private exports 2020-11-07 18:40:03 +01:00
Hermès Bélusca-Maïto bd27b050fc
[SPEC2DEF] Improve the 'int128' arguments display. Addendum to commit a28fa3fd.
'int128' arguments are NOT almost always GUID, as was claimed, and the
usage of the wine_dbgstr_guid() function to display them would require
the presence of yet another wine-specific header.

Instead, define a "MyInt128" typedef, local to the stub file being
generated, as the structure of two __int64's (lower and upper), and
print this "MyInt128" as the couple of these two __int64's.

Besides, display the __int64 numbers prefixed with "0x" (together with
the PRIx64 formatter).

Finally, when generating the debug-print function calls, it is useless to
explicitly cast the 'aX' variables with their types, because their types
are already known from the prototype of the stub-function!!
Therefore we can use the same `fprintf(file, "a%d", i);` for all the
ARG_LONG, ARG_PTR, ARG_STR, ARG_WSTR, ARG_DBL, ARG_INT64 and ARG_FLOAT.
Only in the case of ARG_INT128 we output "a%d.lower, a%d.upper" .
2020-08-30 02:16:15 +02:00
Hermès Bélusca-Maïto 28f08b54c0
[SPEC2DEF] Minor whitespace makeup only. 2020-08-30 02:16:14 +02:00
Mark Jansen c1464a4030
[SPEC2DEF] Omit skipped exports from ordinal numbering.
CORE-16769
2020-03-31 22:49:44 +02:00
Timo Kreuzer 6e80f4d037 [SPEC2DEF] Set ordinals explicitly in export def file
The reason is that dlltool orders the exports differently than MSVC builds (MSVC orders the exports by symbol name, rather than by export name), so we rely on sorting in the spec file, which was only respected, when ordinals were put into the def file.
On MSVC builds it is left to the linker to determine the correct order, which helps to get the differences between architectures right (different symbol decoration, difference between order for functions like NtLoadKey vs NtLoadKey2, which results from the stdcall decoration on x86, which is missing on other architectures.

TODO: To correctly handle non-x86 architectures with GCC builds, spec2def would need to reorder the export list based on symbol names, which would work for C functions, by taking the calling convention into account, but would require an extra c++-stdcall calling convention to be added to know the corresponding symbol starts with "?".
2020-01-03 13:00:45 +01:00
Timo Kreuzer e8ab2736e7 [SPEC2DEF] Refactor to avoid parsing multiple times 2019-09-15 14:12:42 +02:00
Timo Kreuzer 9cff65970f [SPEC2DEF] Fix decorated exports on non-x86 2019-09-15 14:12:42 +02:00
Timo Kreuzer 824e08c710 [SPEC2DEF] Handle auto-naming of "@()" functions during output
This allows to do the parsing and output separately, since the generated name is no longer stored on the stack during parsing.
2019-09-15 14:12:42 +02:00
Timo Kreuzer 80c0b083d8 [SPEC2DEF] Use const properly 2019-09-15 12:06:47 +02:00
Timo Kreuzer c95b5e6f9b [SPEC2DEF] Improve error output 2019-09-15 12:06:47 +02:00
Hermès Bélusca-Maïto 2becb000c8
[SPEC2DEF] Check whether OLE-specific exports do not have assigned ordinals, as they should be.
The check is done at the same time as when we check also that these
exports are marked PRIVATE or not.

This permits us to check for the same conditions as MS' LINK.EXE, but
here on GCC builds as well.

See the following pages for more details:
https://docs.microsoft.com/en-us/cpp/error-messages/tool-errors/linker-tools-warning-lnk4104
https://docs.microsoft.com/en-us/cpp/error-messages/tool-errors/linker-tools-warning-lnk4222

In this last page (LNK4222), the specified list of exports is incomplete.
Manual tests showed that the very same list as for LNK4104 is checked.
2019-07-28 15:50:30 +02:00
Timo Kreuzer f47f45dbdd
[TOOLS] Fix/suppress all MSVC/x64 warnings (#1525) 2019-04-28 23:21:48 +02:00
Mark Jansen d564c7c8e3
[SPEC2DEF] Fix support for different OS versions. 2018-10-12 19:30:35 +02:00
Timo Kreuzer 01df9a410c [SPEC2DEF] Implement support for different OS versions 2018-04-21 18:31:27 +02:00
Colin Finck c2c66aff7d Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys. 2017-10-03 07:45:34 +00:00