diff options
author | 2003-12-03 17:00:15 +0000 | |
---|---|---|
committer | 2003-12-03 17:00:15 +0000 | |
commit | b873e2b441e5ecd28131760b45e295a6d1cc531e (patch) | |
tree | 15cfeb704cca8bdeeb8e835f7cc7e8a257dbc486 | |
parent | add support for ifconfig clone; ok henning deraadt (diff) | |
download | wireguard-openbsd-b873e2b441e5ecd28131760b45e295a6d1cc531e.tar.xz wireguard-openbsd-b873e2b441e5ecd28131760b45e295a6d1cc531e.zip |
Move the asm definition of _dl__syscall from a header file into a .c file
so that 12 copies of it are not generated.
-rw-r--r-- | libexec/ld.so/powerpc/rtld_machine.c | 14 | ||||
-rw-r--r-- | libexec/ld.so/powerpc/syscall.h | 12 |
2 files changed, 14 insertions, 12 deletions
diff --git a/libexec/ld.so/powerpc/rtld_machine.c b/libexec/ld.so/powerpc/rtld_machine.c index c8aee7ba5db..3212cc1c75a 100644 --- a/libexec/ld.so/powerpc/rtld_machine.c +++ b/libexec/ld.so/powerpc/rtld_machine.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtld_machine.c,v 1.32 2003/09/04 19:37:07 drahn Exp $ */ +/* $OpenBSD: rtld_machine.c,v 1.33 2003/12/03 17:00:15 drahn Exp $ */ /* * Copyright (c) 1999 Dale Rahn @@ -658,3 +658,15 @@ _dl_syncicache(char *from, size_t len) off += CACHELINESIZE; } } +__asm__(".section\t\".text\"\n\t" + ".align 2\n\t" + ".globl _dl__syscall\n\t" + ".type _dl__syscall,@function\n" + "_dl__syscall:\n\t" + "li 0, " XSTRINGIFY(SYS___syscall) "\n\t" + "sc\n\t" + "cmpwi 0, 0\n\t" + "beq 1f\n\t" + "li 3, -1\n\t" + "1:\n\t" + "blr"); diff --git a/libexec/ld.so/powerpc/syscall.h b/libexec/ld.so/powerpc/syscall.h index 654b5be4da4..1578c2bcc09 100644 --- a/libexec/ld.so/powerpc/syscall.h +++ b/libexec/ld.so/powerpc/syscall.h @@ -1,4 +1,4 @@ -/* $OpenBSD: syscall.h,v 1.17 2003/07/06 20:04:00 deraadt Exp $ */ +/* $OpenBSD: syscall.h,v 1.18 2003/12/03 17:00:15 drahn Exp $ */ /* * Copyright (c) 1998 Per Fogelstrom, Opsycon AB @@ -142,16 +142,6 @@ _dl_read(int fd, const char* buf, size_t len) #define STRINGIFY(x) #x #define XSTRINGIFY(x) STRINGIFY(x) long _dl__syscall(quad_t val, ...); -__asm__(".align 2\n\t" - ".type _dl__syscall,@function\n" - "_dl__syscall:\n\t" - "li 0, " XSTRINGIFY(SYS___syscall) "\n\t" - "sc\n\t" - "cmpwi 0, 0\n\t" - "beq 1f\n\t" - "li 3, -1\n\t" - "1:\n\t" - "blr"); static inline void * _dl_mmap(void *addr, size_t len, int prot, int flags, int fd, off_t offset) |