diff options
author | Evgeny Karpov <Evgeny.Karpov@microsoft.com> | 2024-06-08 13:49:17 +0000 |
---|---|---|
committer | Christophe Lyon <christophe.lyon@linaro.org> | 2024-06-25 06:38:39 +0000 |
commit | 30db57901ccac7027f93ff71e70a66e26a4f70f5 (patch) | |
tree | 72b8ac907cd60120f737ee1e2e7ab5b676a34fee /gcc/config.gcc | |
parent | ed20feebd9ea31d58861f61205bd412b0c3febd0 (diff) | |
download | gcc-30db57901ccac7027f93ff71e70a66e26a4f70f5.zip gcc-30db57901ccac7027f93ff71e70a66e26a4f70f5.tar.gz gcc-30db57901ccac7027f93ff71e70a66e26a4f70f5.tar.bz2 |
aarch64: Add DLL import/export to AArch64 target
This patch reuses the MinGW implementation to enable DLL import/export
functionality for the aarch64-w64-mingw32 target. It also modifies
environment configurations for MinGW.
2024-06-08 Evgeny Karpov <Evgeny.Karpov@microsoft.com>
gcc/ChangeLog:
* config.gcc: Add winnt-dll.o, which contains the DLL
import/export implementation.
* config/aarch64/aarch64.cc (aarch64_load_symref_appropriately):
Add dllimport implementation.
(aarch64_expand_call): Likewise.
(aarch64_legitimize_address): Likewise.
* config/aarch64/cygming.h (SYMBOL_FLAG_DLLIMPORT): Modify MinGW
environment to support DLL import/export.
(SYMBOL_FLAG_DLLEXPORT): Likewise.
(SYMBOL_REF_DLLIMPORT_P): Likewise.
(SYMBOL_FLAG_STUBVAR): Likewise.
(SYMBOL_REF_STUBVAR_P): Likewise.
(TARGET_VALID_DLLIMPORT_ATTRIBUTE_P): Likewise.
(TARGET_ASM_FILE_END): Likewise.
(SUB_TARGET_RECORD_STUB): Likewise.
(GOT_ALIAS_SET): Likewise.
(PE_COFF_EXTERN_DECL_SHOULD_BE_LEGITIMIZED): Likewise.
(HAVE_64BIT_POINTERS): Likewise.
Diffstat (limited to 'gcc/config.gcc')
-rw-r--r-- | gcc/config.gcc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/config.gcc b/gcc/config.gcc index 70757c9..bc45615 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -1276,10 +1276,12 @@ aarch64-*-mingw*) tm_file="${tm_file} mingw/mingw32.h" tm_file="${tm_file} mingw/mingw-stdint.h" tm_file="${tm_file} mingw/winnt.h" + tm_file="${tm_file} mingw/winnt-dll.h" tmake_file="${tmake_file} aarch64/t-aarch64" target_gtfiles="$target_gtfiles \$(srcdir)/config/mingw/winnt.cc" + target_gtfiles="$target_gtfiles \$(srcdir)/config/mingw/winnt-dll.cc" extra_options="${extra_options} mingw/cygming.opt mingw/mingw.opt" - extra_objs="${extra_objs} winnt.o" + extra_objs="${extra_objs} winnt.o winnt-dll.o" c_target_objs="${c_target_objs} msformat-c.o" d_target_objs="${d_target_objs} winnt-d.o" tmake_file="${tmake_file} mingw/t-cygming" |