diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2017-01-21 01:15:01 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2017-01-21 01:15:01 +0000 |
commit | 917a874a254cd34e21f8a2e7738e4106dcd6482c (patch) | |
tree | 1000b9735d6a6dc05da69ff95e351f9a3ba5fd00 /libexec/ld.so/sh | |
parent | a4543d46bbc5e5006d4d1dce7a700f1cc6a7b652 (diff) |
_dl_exit() is __dead, so it should return void.
Move _dl_mmap() and _dl_mquery() inlines from archdep.h to syscall.h and
remove pointless casts and unnecessary parens.
ok kettenis@
Diffstat (limited to 'libexec/ld.so/sh')
-rw-r--r-- | libexec/ld.so/sh/archdep.h | 9 | ||||
-rw-r--r-- | libexec/ld.so/sh/syscall.h | 11 |
2 files changed, 10 insertions, 10 deletions
diff --git a/libexec/ld.so/sh/archdep.h b/libexec/ld.so/sh/archdep.h index 3366a1fb44c..15c1066ea49 100644 --- a/libexec/ld.so/sh/archdep.h +++ b/libexec/ld.so/sh/archdep.h @@ -1,4 +1,4 @@ -/* $OpenBSD: archdep.h,v 1.8 2017/01/20 10:40:30 guenther Exp $ */ +/* $OpenBSD: archdep.h,v 1.9 2017/01/21 01:15:00 guenther Exp $ */ /* * Copyright (c) 1998 Per Fogelstrom, Opsycon AB @@ -43,13 +43,6 @@ * be used before bootstrap linking has been finished. */ -static inline void * -_dl_mmap(void *addr, size_t len, int prot, int flags, int fd, off_t offset) -{ - return((void *)(long)_dl__syscall((quad_t)SYS_mmap, addr, len, prot, - flags, fd, 0, offset)); -} - static inline void RELOC_DYN(Elf32_Rela *r, const Elf32_Sym *s, Elf32_Addr *p, unsigned long v) { diff --git a/libexec/ld.so/sh/syscall.h b/libexec/ld.so/sh/syscall.h index df09230bcc3..72828b99cba 100644 --- a/libexec/ld.so/sh/syscall.h +++ b/libexec/ld.so/sh/syscall.h @@ -1,4 +1,4 @@ -/* $OpenBSD: syscall.h,v 1.22 2016/08/31 13:18:57 guenther Exp $ */ +/* $OpenBSD: syscall.h,v 1.23 2017/01/21 01:15:00 guenther Exp $ */ /* * Copyright (c) 2001 Niklas Hallqvist @@ -40,7 +40,7 @@ int _dl_close(int); __dead -int _dl_exit(int); +void _dl_exit(int); int _dl_issetugid(void); int _dl_getthrid(void); long _dl__syscall(quad_t, ...); @@ -58,4 +58,11 @@ int _dl_utrace(const char *, const void *, size_t); int _dl_getentropy(char *, size_t); int _dl_sendsyslog(const char *, size_t, int); +static inline void * +_dl_mmap(void *addr, size_t len, int prot, int flags, int fd, off_t offset) +{ + return (void *)_dl__syscall(SYS_mmap, addr, len, prot, + flags, fd, 0, offset); +} + #endif /*__DL_SYSCALL_H__*/ |