@@ -2,6 +2,8 @@
#ifndef _ASM_PPC_ASM_DEFNS_H
#define _ASM_PPC_ASM_DEFNS_H
+#include <xen/linkage.h>
+
/*
* Load a 64-bit immediate value into the specified GPR.
*/
@@ -31,12 +31,7 @@
/* Linkage for PPC */
#ifdef __ASSEMBLY__
-#define ALIGN .p2align 2
-
-#define ENTRY(name) \
- .globl name; \
- ALIGN; \
- name:
+#define CODE_ALIGN 4
#endif
#define XEN_VIRT_START _AT(UL, 0xc000000000000000)
@@ -5,7 +5,7 @@
.section .text.header, "ax", %progbits
-ENTRY(start)
+FUNC(start)
/*
* NOTE: argument registers (r3-r9) must be preserved until the C entrypoint
*/
@@ -36,6 +36,4 @@ ENTRY(start)
/* should never return */
trap
-
- .size start, . - start
- .type start, %function
+END(start)
@@ -23,7 +23,7 @@
.section .init.text, "ax", @progbits
-ENTRY(enter_of)
+FUNC(enter_of)
mflr %r0
std %r0, 16(%r1)
stdu %r1, -STACK_SWITCH_FRAME_SIZE(%r1) /* Save SP and create stack space */
@@ -78,6 +78,4 @@ ENTRY(enter_of)
ld %r0, 16(%r1)
mtlr %r0
blr
-
- .size enter_of, . - enter_of
- .type enter_of, %function
+END(enter_of)
@@ -1,9 +1,6 @@
#include <xen/lib.h>
#include <xen/xen.lds.h>
-#undef ENTRY
-#undef ALIGN
-
OUTPUT_ARCH(powerpc:common64)
ENTRY(start)
Use the generic framework in xen/linkage.h. No change in generated code except of course the converted symbol changes to be a hidden one. Signed-off-by: Jan Beulich <jbeulich@suse.com> --- v4: Also drop #undef-s from linker script. Re-base. v3: New.