Restore proper dot symbol creation for assembly files in the kernel build case.
Without this patch we were not able to see the assembly function. Only the function descriptor was visible. - Distinguish between user-land and kernel when creating the ENTRY() point of assembly source. - Make the ENTRY() macro more readable, replace the .align directive with the gas platform independant .p2align directive. - Create an END()macro for later use to provide traceback tables on powerpc64.
This commit is contained in:
parent
2db13e7575
commit
d59a23dc09
@ -61,19 +61,51 @@
|
||||
#define HIDENAME(asmsym) __CONCAT(.,asmsym)
|
||||
#endif
|
||||
|
||||
#define _GLOBAL(x) \
|
||||
.data; .align 2; .globl x; x:
|
||||
#ifdef _KERNEL
|
||||
#define DOT_LABEL(name) __CONCAT(.,name)
|
||||
#define TYPE_ENTRY(name) .size name,24; \
|
||||
.type DOT_LABEL(name),@function; \
|
||||
.globl DOT_LABEL(name);
|
||||
#define END_SIZE(name) .size DOT_LABEL(name),.-DOT_LABEL(name);
|
||||
#else /* !_KERNEL */
|
||||
#define DOT_LABEL(name) __CONCAT(.L.,name)
|
||||
#define TYPE_ENTRY(name) .type name,@function;
|
||||
#define END_SIZE(name) .size name,.-DOT_LABEL(name);
|
||||
#endif /* _KERNEL */
|
||||
|
||||
#ifdef __powerpc64__
|
||||
#define _ENTRY(x) \
|
||||
.text; .align 2; .globl x; .section ".opd","aw"; \
|
||||
.align 3; x: \
|
||||
.quad .L.x,.TOC.@tocbase,0; .size x,24; .previous; \
|
||||
.align 4; .type x,@function; .L.x:
|
||||
#else
|
||||
#define _ENTRY(x) \
|
||||
.text; .align 4; .globl x; .type x,@function; x:
|
||||
#endif
|
||||
#define _GLOBAL(name) \
|
||||
.data; \
|
||||
.p2align 2; \
|
||||
.globl name; \
|
||||
name:
|
||||
|
||||
#ifdef __powerpc64__
|
||||
#define _ENTRY(name) \
|
||||
.section ".text"; \
|
||||
.p2align 2; \
|
||||
.globl name; \
|
||||
.section ".opd","aw"; \
|
||||
.p2align 3; \
|
||||
name: \
|
||||
.quad DOT_LABEL(name),.TOC.@tocbase,0; \
|
||||
.previous; \
|
||||
.p2align 4; \
|
||||
TYPE_ENTRY(name) \
|
||||
DOT_LABEL(name):
|
||||
|
||||
#define _END(name) \
|
||||
.long 0; \
|
||||
.byte 0,0,0,0,0,0,0,0; \
|
||||
END_SIZE(name)
|
||||
#else /* !__powerpc64__ */
|
||||
#define _ENTRY(name) \
|
||||
.text; \
|
||||
.p2align 4; \
|
||||
.globl name; \
|
||||
.type name,@function; \
|
||||
name:
|
||||
#define _END(name)
|
||||
#endif /* __powerpc64__ */
|
||||
|
||||
#if defined(PROF) || (defined(_KERNEL) && defined(GPROF))
|
||||
# ifdef __powerpc64__
|
||||
@ -99,6 +131,7 @@
|
||||
#endif
|
||||
|
||||
#define ASENTRY(y) _ENTRY(ASMNAME(y)); _PROF_PROLOGUE
|
||||
#define END(y) _END(CNAME(y))
|
||||
#define ENTRY(y) _ENTRY(CNAME(y)); _PROF_PROLOGUE
|
||||
#define GLOBAL(y) _GLOBAL(CNAME(y))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user