[PATCH 04/10] linkage: introduce ENTRY_LOCAL
From: Jiri Slaby
Date: Fri Feb 17 2017 - 05:50:28 EST
This will be used for local assembler functions, which do not want the
".globl" annotation. Sometimes we see:
===
.align 4
some_function:
...
ENDPROC(some_function)
===
which is not nice towards tools trying to analyze the assembly. (DWARF
generation in particular.)
So let us have ENTRY_LOCAL which is going to annotate these cases
including the alignment.
Signed-off-by: Jiri Slaby <jslaby@xxxxxxx>
---
include/linux/linkage.h | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/include/linux/linkage.h b/include/linux/linkage.h
index a6a42dd02466..ca5d5c01009b 100644
--- a/include/linux/linkage.h
+++ b/include/linux/linkage.h
@@ -78,11 +78,16 @@
#define ALIGN __ALIGN
#define ALIGN_STR __ALIGN_STR
+#ifndef ENTRY_LOCAL
+#define ENTRY_LOCAL(name) \
+ ALIGN ASM_NL \
+ name:
+#endif
+
#ifndef ENTRY
#define ENTRY(name) \
.globl name ASM_NL \
- ALIGN ASM_NL \
- name:
+ ENTRY_LOCAL(name)
#endif
#endif /* LINKER_SCRIPT */
--
2.11.1