summaryrefslogtreecommitdiff
path: root/libexec/ld.so
diff options
context:
space:
mode:
authorDale Rahn <drahn@cvs.openbsd.org>2003-12-03 17:00:16 +0000
committerDale Rahn <drahn@cvs.openbsd.org>2003-12-03 17:00:16 +0000
commitb73ed234a56aae86cd0875d18a9b7464c92521c0 (patch)
tree17ca79e3960d99e287ad529332db2857b2861807 /libexec/ld.so
parent4647b34255d03b40e3394f0742a4278293d875f2 (diff)
Move the asm definition of _dl__syscall from a header file into a .c file
so that 12 copies of it are not generated.
Diffstat (limited to 'libexec/ld.so')
-rw-r--r--libexec/ld.so/powerpc/rtld_machine.c14
-rw-r--r--libexec/ld.so/powerpc/syscall.h12
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)