aboutsummaryrefslogtreecommitdiff
path: root/COPYING (unfollow)
Commit message (Collapse)AuthorFilesLines
2023-07-03Add missing check that section index in get_image_section() is validPali Rohár1-1/+1
Number is stored in NumberOfRvaAndSizes and it may be less than IMAGE_NUMBEROF_DIRECTORY_ENTRIES.
2023-05-25Add some contributorstraversaro-patch-1Silvio Traversaro1-1/+2
2023-05-25Cleanup README and add CODEOWNERS fileSilvio Traversaro2-12/+21
2023-05-21Fix compilation with the first NT SDKPali Rohár1-0/+13
First NT SDK available in the first 32-bit MSVC NT compiler does not provide some defines. Add them for compatibility.
2023-05-21Fix compilation with old MSVC compilerPali Rohár1-0/+12
Old pre-4.0 MSVC does not support _ReturnAddress() intrinsic. Provide for it simple implementation via inline assembly.
2023-05-21Fix compilation with older SDKPali Rohár1-7/+7
Do not use SIZE_T which is not defined in older SDK. There is only size_t type, so use it instead. Do not use IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR which is not defined in older SDK. Use IMAGE_NUMBEROF_DIRECTORY_ENTRIES macro for checking if directory index is valid. In all SDKs is DataDirectory[] array size defined from IMAGE_NUMBEROF_DIRECTORY_ENTRIES macro. Cast members in IMAGE_EXPORT_DIRECTORY and IMAGE_DIRECTORY_ENTRY_IMPORT to DWORD as in older SDK they are defined as PDWORD and compiler throws error 'cannot add two pointers'.
2022-12-27Add Windows ARM64 supportGH Cao2-2/+71
2022-12-01Fix CMake include directive when using wrappers like meson.Angelo Haller1-1/+4
2022-03-11Replace magic numbers by sdk macros in get_image_section()Pali Rohár1-2/+8
2021-12-21Prefer usage of thread-safe function SetThreadErrorMode() instead of ↵Pali Rohár1-4/+33
process-global function SetErrorMode() Use GetProcAddress() wrapper as SetThreadErrorMode() is not available on older Windows versions.
2021-12-21Try to avoid compile warning: cast between incompatible function types from ↵Pali Rohár1-3/+3
‘FARPROC’ warning: cast between incompatible function types from ‘FARPROC’ {aka ‘long long int (*)()’} to ‘BOOL (*)(DWORD, const CHAR *, struct HINSTANCE__ **)’ {aka ‘int (*)(long unsigned int, const char *, struct HINSTANCE__ **)’} [-Wcast-function-type]
2021-04-27CMake: Bumpr versionxantares1-1/+1
Silents warnings, cmake 3.2 is available in distros since many years
2021-04-27cmake: use CROSSCOMPILING_EMULATORMichel Zou4-25/+9
2021-04-09dladdr: const void *addrMichel Zou2-10/+10
on unix the addr argument seems to be const fix that for consistency
2021-02-03Fix noinline for older compiler versions (e.g. Visual Studio 6.0)Pali Rohár1-1/+11
Visual Studio 6.0 does not support __declspec(noinline) and throw error. Add checks for compilers which support noinline to prevent compile errors.
2021-02-03Define ULONG_PTR for older SDKPali Rohár1-0/+5
If compiling with _WIN32_WINNT target prior 0x0500 then SDK does not define ULONG_PTR type. Such systems are only 32bit so define it explicitly to 32bit type ULONG.
2021-02-03Fix MSVC 14.00 compile warning: warning C4244: '=' : conversion from ↵Pali Rohár1-1/+1
'ULONG_PTR' to 'char', possible loss of data
2021-02-03Add helper function MyGetModuleHandleFromAddress()Pali Rohár1-7/+57
This function implements calling GetModuleHandleExA() with correct flags to retrieve hModule from passed address. To allow compilation also with older compilers and environments (like WDK) with any _WIN32_WINNT value, retrieve pointer to this function via GetProcAddress(). And as a fallback implementation use old code via VirtualQuery() which was there prior commit 8ec5ffef2eca.
2021-02-03Fix helper function MyEnumProcessModules()Pali Rohár1-7/+32
Call SetErrorMode(SEM_FAILCRITICALERRORS) prior opening Psapi.dll library to avoid GUI error messages. Close Psapi.dll library via FreeLibrary() if symbol was not retrieved to prevent possible memory leaks. Try to get K32EnumProcessModules symbol from Kernel32.dll library as it is preferred way how to call EnumProcessModules() on Windows 7 and newer versions. If retrieving EnumProcessModules symbol failed with both methods then do not try it again on next MyEnumProcessModules() function call.
2021-02-03Avoid calling SetLastError() and GetLastError() internallyPali Rohár1-22/+17
There is no need for propagating internal errors via SetLastError() and GetLastError() calls. Just use additional argument for save_err_str() function. Also dlfcn API is POSIX and does not use GetLastError().
2021-02-03Move hCurrentProc variable to scope where is usedPali Rohár1-2/+3
2021-02-03Fix some style issuesPali Rohár2-14/+14
2021-01-29Remove duplicate checks for NULL pointersPali Rohár1-4/+1
is_valid_address() already rejects NULL addresses, so there is no need to check address for NULL.
2021-01-29Remove code for finding symbol name in import tablePali Rohár1-53/+6
It is not required as import table can use only symbols which are exported and therefore are in export table. So if symbol is not found in export table it cannot be in import table.
2021-01-27Function dladdr() now retrieve symbol name and symbol address from both ↵Pali Rohár4-43/+97
export and import tables dladdr tests for Windows now should always pass like on other systems.
2021-01-17CI: Add static building for cmakeRalf Habacker2-23/+70
2021-01-17cmake: add support to build test-dladdr on unix like osRalf Habacker2-12/+22
This is used to obtain test result references.
2021-01-17Add function dladdr() and associated test application test-dladdrRalf Habacker6-9/+439
2020-12-22Add cmake build support to travis CIRalf Habacker1-0/+11
2020-12-13Rewrite function save_err_ptr_str() to not use sprintf()Pali Rohár1-6/+13
sprintf() is marked by MSVC as unsafe and suppressing compile warning does not work. It is still generated on AppVeyor. So rewrite code for converting pointer number to string via open coded for-loop and do not use unsafe sprintf() function anymore. New code correctly handles both 32bit and 64bit variants and does not use any #ifdef _MSC_VER anymore.
2020-12-13Add _CRT_SECURE_NO_WARNINGS for test.c to disable MSVC deprecation warningsPali Rohár1-0/+1
2020-12-12ci-build.sh: Move install_prefix to cmake place where it is usedPali Rohár1-3/+1
2020-12-12Run Travis tests also under i586-mingw32msvc-gcc compilerPali Rohár1-0/+13
Beware that i586-mingw32msvc-gcc is sometimes just a symlink to i686-w64-mingw32-gcc. Real i586-mingw32msvc-gcc compiler is available in mingw32 package only in dist trusty.
2020-11-09cmake: Keep warning in sync with Makefile based build systemRalf Habacker1-0/+6
2020-11-09Add cmake building support to Travis CIRalf Habacker3-4/+56
To make it easier to extend the CI support and to be able to execute the contained tests locally, a dedicated shell script tools/ci_build.sh was added to execute the tests.
2020-11-09cmake: add option ENABLE_WINE to enable support for running cross compiled ↵Ralf Habacker3-2/+55
tests with wine For details about the ENABLE_WINE option, which support three modes AUTO|ON|OFF see the documentation of cmake macro check_auto_option(). A custom path for the wine executable can be specified by adding -DWINE_EXECUTABLE=<path> to the cmake command line. The cmake related macros were copied from https://gitlab.freedesktop.org/dbus/dbus/-/blob/master/cmake/modules/Macros.cmake
2020-11-09cmake: separate targets in tests subdir for reasier readingRalf Habacker1-0/+4
2020-11-09cmake: Let make target 'test' be accessable from topmost build directoryRalf Habacker2-2/+2
The cmake command enable_testing() must be placed in the topmost CMakeLists.txt so that the make target 'test' is available in the topmost build directory.
2020-11-04Change order of variables in appveyor build matrixPali Rohár1-97/+97
This change no function effect as it changes only order of defined variables. The only visible change is on appveyor web where variables are printed in other as they are defined. If list of variables is too long, variables defined later are hidden on the web interface. Variable APPVEYOR_BUILD_WORKER_IMAGE was moved to the end of list as it is less important to know as variable GENERATOR (defines which compiler is used).
2020-11-02cmake: place all generated binaries into one placeRalf Habacker2-1/+5
This is required for running test applications, because by default cmake places binaries into the associated subdir.
2020-09-14Drop obsolete visual studio related filesRalf Habacker7-875/+0
These files can be easily recreated with cmake on the fly, which is already used by CI-system.
2020-09-14Makefile: Adjust paths of source files, which are now located in subdirectoriesRalf Habacker1-10/+10
2020-09-14Fix cmake warning 'No project() command is present'Ralf Habacker1-0/+1
2020-09-14Move cmake targets into sub directoriesRalf Habacker10-59/+62
2020-09-14Update minimum required cmake version to 2.8.11 to simplify codeRalf Habacker1-30/+25
According to https://cmake.org/pipermail/cmake/2013-May/054792.html cmake 2.8.11 was released in 2013, so we can assume that no older version will be used anymore.
2020-09-13Rephrase configure script copyright noticeSilvio Traversaro1-1/+5
2020-08-30Relicense to MITRamiro Polla9-600/+123
The licensing note in the configure script has been reworked, similarly to how libvpx did it (they were also based on FFmpeg's configure script and also use a more permissive license).