unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob 89beefdd157e5f5db3decb06f760ca0397a217cc 2517 bytes (raw)
name: gnu/packages/patches/llvm-D27629-AArch64-large_model_6.0.1.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
 
From f76abe65e6d07fea5e838c4f8c9a9421c16debb0 Mon Sep 17 00:00:00 2001
From: Valentin Churavy <v.churavy@gmail.com>
Date: Thu, 5 Jul 2018 12:37:50 -0400
Subject: [PATCH] Fix unwind info relocation with large code model on AArch64

---
 lib/MC/MCObjectFileInfo.cpp                   |  2 ++
 .../AArch64/ELF_ARM64_large-relocations.s     | 20 +++++++++++++++++++
 2 files changed, 22 insertions(+)
 create mode 100644 test/ExecutionEngine/RuntimeDyld/AArch64/ELF_ARM64_large-relocations.s

diff --git a/lib/MC/MCObjectFileInfo.cpp b/lib/MC/MCObjectFileInfo.cpp
index 328f000f37c..938b35f20d1 100644
--- a/lib/MC/MCObjectFileInfo.cpp
+++ b/lib/MC/MCObjectFileInfo.cpp
@@ -291,6 +291,8 @@ void MCObjectFileInfo::initELFMCObjectFileInfo(const Triple &T, bool Large) {
     break;
   case Triple::ppc64:
   case Triple::ppc64le:
+  case Triple::aarch64:
+  case Triple::aarch64_be:
   case Triple::x86_64:
     FDECFIEncoding = dwarf::DW_EH_PE_pcrel |
                      (Large ? dwarf::DW_EH_PE_sdata8 : dwarf::DW_EH_PE_sdata4);
diff --git a/test/ExecutionEngine/RuntimeDyld/AArch64/ELF_ARM64_large-relocations.s b/test/ExecutionEngine/RuntimeDyld/AArch64/ELF_ARM64_large-relocations.s
new file mode 100644
index 00000000000..66f28dabd79
--- /dev/null
+++ b/test/ExecutionEngine/RuntimeDyld/AArch64/ELF_ARM64_large-relocations.s
@@ -0,0 +1,20 @@
+# RUN: llvm-mc -triple=arm64-none-linux-gnu -large-code-model -filetype=obj -o %T/large-reloc.o %s
+# RUN: llvm-rtdyld -triple=arm64-none-linux-gnu -verify -map-section large-reloc.o,.eh_frame=0x10000 -map-section large-reloc.o,.text=0xffff000000000000 -check=%s %T/large-reloc.o
+# RUN-BE: llvm-mc -triple=aarch64_be-none-linux-gnu -large-code-model -filetype=obj -o %T/be-large-reloc.o %s
+# RUN-BE: llvm-rtdyld -triple=aarch64_be-none-linux-gnu -verify -map-section be-large-reloc.o,.eh_frame=0x10000 -map-section be-large-reloc.o,.text=0xffff000000000000 -check=%s %T/be-large-reloc.o
+
+        .text
+        .globl  g
+        .p2align        2
+        .type   g,@function
+g:
+        .cfi_startproc
+        mov      x0, xzr
+        ret
+        .Lfunc_end0:
+        .size   g, .Lfunc_end0-g
+        .cfi_endproc
+
+# Skip the CIE and load the 8 bytes PC begin pointer.
+# Assuming the CIE and the FDE length are both 4 bytes.
+# rtdyld-check: *{8}(section_addr(large-reloc.o, .eh_frame) + (*{4}(section_addr(large-reloc.o, .eh_frame))) + 0xc) = g - (section_addr(large-reloc.o, .eh_frame) + (*{4}(section_addr(large-reloc.o, .eh_frame))) + 0xc)
-- 
2.18.0


debug log:

solving 89beefdd15 ...
found 89beefdd15 in https://yhetil.org/guix-patches/20190423094936.27413-1-anothersms@gmail.com/

applying [1/1] https://yhetil.org/guix-patches/20190423094936.27413-1-anothersms@gmail.com/
diff --git a/gnu/packages/patches/llvm-D27629-AArch64-large_model_6.0.1.patch b/gnu/packages/patches/llvm-D27629-AArch64-large_model_6.0.1.patch
new file mode 100644
index 0000000000..89beefdd15

1:57: trailing whitespace.
-- 
Checking patch gnu/packages/patches/llvm-D27629-AArch64-large_model_6.0.1.patch...
1:59: new blank line at EOF.
+
Applied patch gnu/packages/patches/llvm-D27629-AArch64-large_model_6.0.1.patch cleanly.
warning: 2 lines add whitespace errors.

index at:
100644 89beefdd157e5f5db3decb06f760ca0397a217cc	gnu/packages/patches/llvm-D27629-AArch64-large_model_6.0.1.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).