diff options
author | Mark Harmstone <mark@harmstone.com> | 2023-01-05 02:36:32 +0000 |
---|---|---|
committer | Mark Harmstone <mark@harmstone.com> | 2023-01-10 23:30:49 +0000 |
commit | 16fea92ccd993fce6b5b0efebe059d542cad9932 (patch) | |
tree | 59a1531c16963593e8b5d07f89b2525a0d00df3a /ld/pe-dll.c | |
parent | 528e4f463f511b11ad414bc91bcf89c4fb53c352 (diff) | |
download | gdb-16fea92ccd993fce6b5b0efebe059d542cad9932.zip gdb-16fea92ccd993fce6b5b0efebe059d542cad9932.tar.gz gdb-16fea92ccd993fce6b5b0efebe059d542cad9932.tar.bz2 |
Add aarch64-w64-mingw32 target
This adds a mingw target for aarch64, including windres and dlltool.
Note that the old value of jmp_aarch64_bytes was wrong, and this does
the same thing as MSVC does.
Diffstat (limited to 'ld/pe-dll.c')
-rw-r--r-- | ld/pe-dll.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ld/pe-dll.c b/ld/pe-dll.c index de876ca..a2584c3 100644 --- a/ld/pe-dll.c +++ b/ld/pe-dll.c @@ -2257,13 +2257,12 @@ static const unsigned char jmp_ix86_bytes[] = 0xff, 0x25, 0x00, 0x00, 0x00, 0x00, 0x90, 0x90 }; -/* _function: - b <__imp_function> - nop */ static const unsigned char jmp_aarch64_bytes[] = { - 0x00, 0x00, 0x00, 0x14, - 0x1f, 0x20, 0x03, 0xD5 + 0x10, 0x00, 0x00, 0x90, /* adrp x16, 0 */ + 0x10, 0x02, 0x00, 0x91, /* add x16, x16, #0x0 */ + 0x10, 0x02, 0x40, 0xf9, /* ldr x16, [x16] */ + 0x00, 0x02, 0x1f, 0xd6 /* br x16 */ }; /* _function: @@ -2431,7 +2430,8 @@ make_one (def_file_export *exp, bfd *parent, bool include_jmp_stub) quick_reloc (abfd, 8, BFD_RELOC_32, 2); break; case PE_ARCH_aarch64: - quick_reloc (abfd, 0, BFD_RELOC_AARCH64_JUMP26, 2); + quick_reloc (abfd, 0, BFD_RELOC_AARCH64_ADR_HI21_NC_PCREL, 2); + quick_reloc (abfd, 4, BFD_RELOC_AARCH64_ADD_LO12, 2); break; default: abort (); |