diff options
author | nwhitehorn <nwhitehorn@FreeBSD.org> | 2015-12-03 00:10:57 +0000 |
---|---|---|
committer | nwhitehorn <nwhitehorn@FreeBSD.org> | 2015-12-03 00:10:57 +0000 |
commit | 4bced8674ece4f9d2ac299c702ca6b0ce445f024 (patch) | |
tree | 98b0c907e41482f53a2b2079bef6b419bc5e68a0 /sys/powerpc/include | |
parent | 4de68fe96ca5aeb0ae05c52543409c56d13523f0 (diff) | |
download | FreeBSD-src-4bced8674ece4f9d2ac299c702ca6b0ce445f024.zip FreeBSD-src-4bced8674ece4f9d2ac299c702ca6b0ce445f024.tar.gz |
Provide support for ELFv2 userland if using a newer compiler (recent clang
or gcc) and binutils >= 2.24. Not enabled by default.
Diffstat (limited to 'sys/powerpc/include')
-rw-r--r-- | sys/powerpc/include/asm.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/powerpc/include/asm.h b/sys/powerpc/include/asm.h index b3c979c..3aec5d3 100644 --- a/sys/powerpc/include/asm.h +++ b/sys/powerpc/include/asm.h @@ -61,17 +61,26 @@ #define HIDENAME(asmsym) __CONCAT(.,asmsym) #endif +#if !defined(_CALL_ELF) || _CALL_ELF == 1 #ifdef _KERNEL +/* ELFv1 kernel uses global dot symbols */ #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 */ +/* ELFv1 user code uses local function entry points */ #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 */ +#else +/* ELFv2 doesn't have any of this complication */ +#define DOT_LABEL(name) name +#define TYPE_ENTRY(name) .type name,@function; +#define END_SIZE(name) .size name,.-DOT_LABEL(name); +#endif #define _GLOBAL(name) \ .data; \ |