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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
|
From 8dabc6eab444607a68d710f0b09942277095e219 Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.com>
Date: Wed, 12 Jan 2022 17:27:03 +0000
Subject: [PATCH] arm: Fix annoying .eh_frame section warnings
Replace the cfi directives with the UNWIND equivalents. This prevents
the .eh_frame section from being created, eliminating the warnings.
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
---
arch/arm/lib/memcpy_rpi.S | 2 ++
arch/arm/lib/memcpymove.h | 45 ++++++++++++--------------------------
arch/arm/lib/memmove_rpi.S | 2 ++
3 files changed, 18 insertions(+), 31 deletions(-)
--- a/arch/arm/lib/memcpy_rpi.S
+++ b/arch/arm/lib/memcpy_rpi.S
@@ -27,6 +27,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBI
*/
#include <linux/linkage.h>
+#include <asm/assembler.h>
+#include <asm/unwind.h>
#include "arm-mem.h"
#include "memcpymove.h"
--- a/arch/arm/lib/memcpymove.h
+++ b/arch/arm/lib/memcpymove.h
@@ -280,6 +280,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBI
199:
pop {DAT3, DAT4, DAT5, DAT6, DAT7}
pop {D, DAT1, DAT2, pc}
+ UNWIND( .fnend )
.endm
.macro memcpy_medium_inner_loop backwards, align
@@ -358,19 +359,13 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBI
LAST .req ip
OFF .req lr
- .cfi_startproc
+ UNWIND( .fnstart )
push {D, DAT1, DAT2, lr}
+ UNWIND( .fnend )
- .cfi_def_cfa_offset 16
- .cfi_rel_offset D, 0
- .cfi_undefined S
- .cfi_undefined N
- .cfi_undefined DAT0
- .cfi_rel_offset DAT1, 4
- .cfi_rel_offset DAT2, 8
- .cfi_undefined LAST
- .cfi_rel_offset lr, 12
+ UNWIND( .fnstart )
+ UNWIND( .save {D, DAT1, DAT2, lr} )
.if backwards
add D, D, N
@@ -386,17 +381,11 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBI
/* Long case */
push {DAT3, DAT4, DAT5, DAT6, DAT7}
+ UNWIND( .fnend )
- .cfi_def_cfa_offset 36
- .cfi_rel_offset D, 20
- .cfi_rel_offset DAT1, 24
- .cfi_rel_offset DAT2, 28
- .cfi_rel_offset DAT3, 0
- .cfi_rel_offset DAT4, 4
- .cfi_rel_offset DAT5, 8
- .cfi_rel_offset DAT6, 12
- .cfi_rel_offset DAT7, 16
- .cfi_rel_offset lr, 32
+ UNWIND( .fnstart )
+ UNWIND( .save {D, DAT1, DAT2, lr} )
+ UNWIND( .save {DAT3, DAT4, DAT5, DAT6, DAT7} )
/* Adjust N so that the decrement instruction can also test for
* inner loop termination. We want it to stop when there are
@@ -436,16 +425,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBI
156: memcpy_long_inner_loop backwards, 2
157: memcpy_long_inner_loop backwards, 3
- .cfi_def_cfa_offset 16
- .cfi_rel_offset D, 0
- .cfi_rel_offset DAT1, 4
- .cfi_rel_offset DAT2, 8
- .cfi_same_value DAT3
- .cfi_same_value DAT4
- .cfi_same_value DAT5
- .cfi_same_value DAT6
- .cfi_same_value DAT7
- .cfi_rel_offset lr, 12
+ UNWIND( .fnend )
+
+ UNWIND( .fnstart )
+ UNWIND( .save {D, DAT1, DAT2, lr} )
160: /* Medium case */
preload_all backwards, 0, 0, S, N, DAT2, OFF
@@ -488,7 +471,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBI
memcpy_short_inner_loop backwards, 0
140: memcpy_short_inner_loop backwards, 1
- .cfi_endproc
+ UNWIND( .fnend )
.unreq D
.unreq S
--- a/arch/arm/lib/memmove_rpi.S
+++ b/arch/arm/lib/memmove_rpi.S
@@ -27,6 +27,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBI
*/
#include <linux/linkage.h>
+#include <asm/assembler.h>
+#include <asm/unwind.h>
#include "arm-mem.h"
#include "memcpymove.h"
|