DEFS.h (ed4704d9) DEFS.h (83762a71)
1/* $OpenBSD: DEFS.h,v 1.3 2016/09/22 18:19:59 guenther Exp $ */
1/* $OpenBSD: DEFS.h,v 1.4 2023/12/10 16:45:51 deraadt Exp $ */
2
3#include <machine/asm.h>
4
5/*
6 * We define a hidden alias with the prefix "_libc_" for each global symbol
7 * that may be used internally. By referencing _libc_x instead of x, other
8 * parts of libc prevent overriding by the application and avoid unnecessary
9 * relocations.

--- 8 unchanged lines hidden (view full) ---

18
19/*
20 * For functions implemented in ASM that aren't syscalls.
21 * END_STRONG(x) Like DEF_STRONG() in C; for standard/reserved C names
22 * END_WEAK(x) Like DEF_WEAK() in C; for non-ISO C names
23 */
24#define END_STRONG(x) END(x); _HIDDEN_FALIAS(x,x); END(_HIDDEN(x))
25#define END_WEAK(x) END_STRONG(x); .weak x
2
3#include <machine/asm.h>
4
5/*
6 * We define a hidden alias with the prefix "_libc_" for each global symbol
7 * that may be used internally. By referencing _libc_x instead of x, other
8 * parts of libc prevent overriding by the application and avoid unnecessary
9 * relocations.

--- 8 unchanged lines hidden (view full) ---

18
19/*
20 * For functions implemented in ASM that aren't syscalls.
21 * END_STRONG(x) Like DEF_STRONG() in C; for standard/reserved C names
22 * END_WEAK(x) Like DEF_WEAK() in C; for non-ISO C names
23 */
24#define END_STRONG(x) END(x); _HIDDEN_FALIAS(x,x); END(_HIDDEN(x))
25#define END_WEAK(x) END_STRONG(x); .weak x
26
27#define PINSYSCALL(sysno, label) \
28 .pushsection .openbsd.syscalls,"",@progbits; \
29 .long label; \
30 .long sysno; \
31 .popsection;