Commit Graph

369 Commits

Author SHA1 Message Date
Francois Gouget 896292a7fe libwine: Like Linux, NetBSD has /proc/self/exe.
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-03 12:51:23 +02:00
Francois Gouget 728b6fc5e6 libwine: Fully dereference the /proc/self/exe symbolic link.
Linux will do it for us but not NetBSD. That is, if foo is an executable
that prints the path /proc/self/exe points to, on Linux one gets:

$ ./foo
/tmp/foo
$ ln -s foo bar
$ ln -s bar babar
$ /tmp/babar
/tmp/foo

But on NetBSD one gets instead:

$ ./foo
/tmp/./foo
$ ln -s foo bar
$ ln -s bar babar
$ /tmp/babar
/tmp/babar

Fully dereferencing /proc/self/exe is necessary to be able to run both
32 and 64 bit executables from the build tree.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-03 12:51:16 +02:00
Naveen Narayanan 624bcd314c libwine: Only link libi386 with the libraries that need it.
In particular it does not make sense to link executables and dlls built
with MinGW with it.

Signed-off-by: Francois Gouget <fgouget@icodeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-02 20:45:20 +02:00
Alexandre Julliard d5a372abbb include: Move inline assembly definitions to a new wine/asm.h header.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-14 13:45:07 +02:00
Alexandre Julliard 44dc9d7383 libwine: Remove some conditional code that was only needed for Windows.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-04 10:43:57 +02:00
Alexandre Julliard f689c723a2 makefiles: Don't use libwine for Windows builds.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-04 10:43:57 +02:00
Alexandre Julliard f438ff566d ntdll: Remove no longer used debug functions.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-03 19:28:19 +02:00
Alexandre Julliard cf8193df5b include: Make wine_dbg_log() into an inline function.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-03 19:27:50 +02:00
Alexandre Julliard 9911cfdeae ntdll: Export __wine_dbg_get_channel_flags().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-03 19:27:50 +02:00
Alexandre Julliard ddf1ff2f6a include: Make wine_dbg_printf() into an inline function.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-03 19:27:50 +02:00
Alexandre Julliard f2e6f05fe3 include: Make wine_dbg_sprintf() into an inline function.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-03 19:27:50 +02:00
Alexandre Julliard 9f75f71899 include: Make wine_dbgstr_an()/wine_dbgstr_wn() into inline functions.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-03 19:23:43 +02:00
Alexandre Julliard c3398b7eab libwine: Move string functions to libwine_port.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-01 12:45:23 +02:00
Alexandre Julliard a02b23e418 Revert "libwine: Move string functions to libwine_port."
This reverts commit 47242d25f5.
It breaks in modules that import msvcrt because it uses libc
functions.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-29 21:13:43 +01:00
Alexandre Julliard 47242d25f5 libwine: Move string functions to libwine_port.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-27 16:51:26 +01:00
Alexandre Julliard 84cd904334 libwine: Move collation table to libwine_port.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-24 10:34:46 +01:00
Alexandre Julliard 9de388258f libwine: Move casemap tables to libwine_port.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-24 10:34:44 +01:00
Alexandre Julliard a67dca1bc8 libwine: Move wctype tables to libwine_port.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-23 13:45:52 +01:00
Ken Thomases abfa6784ab libwine: On Mac, don't manually exclude the stack when reserving above the user space limit.
Since we don't rely on trial and error, there's no advantage to this heuristic.

Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-07 19:03:59 +01:00
Ken Thomases 4a89dd1b4d libwine: On Mac, use Mach APIs to enumerate address space holes instead of using trial and error.
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-07 19:03:57 +01:00
Ken Thomases 91d5d56748 libwine: On Mac, use a more capable Mach function to map memory and avoid calling mmap() in some cases.
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-07 19:03:55 +01:00
Brendan McGrath 5d577ae9ea libwine: get_sortkey to return consistent length with and without dstlen.
Signed-off-by: Brendan McGrath <brendan@redmandi.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-05 20:42:41 +01:00
Huw Davies e4a9e2ff2e kernel32: Initial support for canonical decomposition in NormalizeString().
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-11 11:52:00 +01:00
Ken Thomases ecd53057b5 libwine: On Mac, disable ASLR for Wine processes.
ASLR can allow dyld to be loaded where it overlaps one of the regions that the
preloader would like to reserve.  That, in turn, can prevent Wine from using the
shared user data region.  With ASLR disabled, dyld will be loaded immediately
after the preloader, which has a defined base address.

This uses an Apple extension to posix_spawn() that allows it to replace the
calling process's image, like a more featureful execve().  The flag to disable
ASLR is technically private SPI, but has remained stable for many versions of
the OS.  And the Mac preloader is already stepping over that line.

Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-04 15:39:36 +01:00
Denil Verghese 86bab890dd libwine: Fix missing semi-colon.
Signed-off-by: Denil Verghese <denilverghese@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-06 17:01:09 +01:00
Alexandre Julliard 05fa21e188 makefiles: Remove some unused variables.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-05 10:47:05 +01:00
Sebastian Lackner a0ab2a7b0c loader: Implement preloader for macOS.
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-04 11:10:09 +01:00
Michael Müller 9fd13a1a5e libwine: Do not restrict base address of main thread on 64 bit mac os.
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-29 10:46:38 +01:00
Alexandre Julliard 493129d638 libwine: Look for the 64-bit wineserver using the 64-bit loader symlink.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-28 13:24:19 +01:00
Alexandre Julliard 27254d849b libwine: Add a helper function to read a symlink.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-28 13:10:15 +01:00
Alexandre Julliard d84de4ca00 makefiles: Support specifying installed files in the top-level makefile.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-27 14:48:04 +01:00
Michael Stefaniuc 93acf3a695 libs/wine: Use the ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-25 20:37:06 +02:00
Chip Davis bdca749f7b libwine: Use getsegmentdata(3) on Mac OS to find the end of the __TEXT segment.
Don't assume it ends with the fake PE header. This assumption doesn't
hold on Mac OS: the __data section where it was placed is located after
several other sections, all in the __DATA segment.

Unfortunately, this causes Wine, when DEP/NX is turned off, to override
the page protections for the start of the __DATA segment, removing write
permission from them, leading to a crash when winemac.drv attempted to
use an Objective-C class for the first time.

Also, be sure to include the zero-fill (i.e. BSS) sections in the total
size of the .data section. This should fix some tests that use large
uninitialized arrays.

Signed-off-by: Chip Davis <cdavis@codeweavers.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-16 13:12:38 +02:00
Nikolay Sivov d4eeb162bb tools: Update to Unicode 11.0.0.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-03 12:01:40 +02:00
Alexandre Julliard ec14c220d2 libwine: Print thread id by default in all traces.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-25 11:43:11 +01:00
André Hentschel b0fc60d279 libwine: Reserve memory areas for ARM64 in case we don't have a preloader.
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-17 10:28:44 +01:00
Alexandre Julliard 20d13d0b78 libwine: Also apply the load delta to the FirstThunk table.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-18 15:41:43 +02:00
Jens Reyer b736dbe933 make_unicode: Update data tables to Unicode 10.0.0.
Signed-off-by: Jens Reyer <jre.winesim@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-13 11:44:41 +02:00
Alexandre Julliard 4ee9bbc889 libwine: Fall back to the WINELOADER path for the bin directory.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-26 13:38:00 +02:00
Alexandre Julliard 56b14d637f libwine: Add a helper function to set the dll directory.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-26 13:37:25 +02:00
Alexandre Julliard 161f3fc417 libwine: Add a helper function to set the bin directory.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-26 13:32:38 +02:00
Alexandre Julliard 98860707bc libwine: Handle WINEDEBUGLOG variable on Android to specify a log file.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-30 21:49:49 +02:00
Alexandre Julliard 5142e56aee libwine: Clear the %fs register we got from Android to force allocating a new one.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-21 22:06:52 +02:00
Alexandre Julliard 2b1b7a0a80 libwine: Set a non-null entry for the GDT selector to make sure it's properly reserved.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-21 18:55:17 +02:00
Nikolay Sivov 58e0972c5c Update data tables to Unicode 9.0.0.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-22 22:09:28 +09:00
Alexandre Julliard 877a4a733f libwine: Don't include backwards compatibility functions on Android.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-14 19:28:51 +09:00
Hugh McMaster a9fb9ac657 libwine: strtoulW and strtolW should set errno to ERANGE if an overflow will occur.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-23 20:22:21 +09:00
Alexandre Julliard 3602962275 makefiles: Generate dependencies for static libraries.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-23 19:38:37 +09:00
Alexandre Julliard 2afa8f0c4c makefiles: Get rid of libwine_static.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-23 19:38:37 +09:00
Alexandre Julliard 52333e9c5d libwine: Move the wide char to multi-byte conversion functions to libwine_port.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-19 11:49:48 +09:00