diff options
author | andreast <andreast@FreeBSD.org> | 2013-11-21 21:25:58 +0000 |
---|---|---|
committer | andreast <andreast@FreeBSD.org> | 2013-11-21 21:25:58 +0000 |
commit | 3eb2c9b8dd1cb275159a8413feae04232f578522 (patch) | |
tree | 366d8180456720ddc0a9d3562c7413bda57970e1 /sys/amd64/include/asm.h | |
parent | 36699710473d4c46ebaedb4b2f50404d28375585 (diff) | |
download | FreeBSD-src-3eb2c9b8dd1cb275159a8413feae04232f578522.zip FreeBSD-src-3eb2c9b8dd1cb275159a8413feae04232f578522.tar.gz |
Introduce a WEAK_REFERENCE() alias and use it. Get rid of the CNAME and the
CONCAT macros in SYS.h.
Reviewed by: bde, kib
Diffstat (limited to 'sys/amd64/include/asm.h')
-rw-r--r-- | sys/amd64/include/asm.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/amd64/include/asm.h b/sys/amd64/include/asm.h index 078da03..87272f7 100644 --- a/sys/amd64/include/asm.h +++ b/sys/amd64/include/asm.h @@ -77,6 +77,15 @@ #endif #define END(x) .size x, . - x +/* + * WEAK_REFERENCE(): create a weak reference alias from sym. + * The macro is not a general asm macro that takes arbitrary names, + * but one that takes only C names. It does the non-null name + * translation inside the macro. + */ +#define WEAK_REFERENCE(sym, alias) \ + .weak CNAME(alias); \ + .equ CNAME(alias),CNAME(sym) #define RCSID(x) .text; .asciz x |