public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Samuel Thibault <samuel.thibault@ens-lyon.org>
To: libc-alpha@sourceware.org
Cc: Samuel Thibault <samuel.thibault@ens-lyon.org>
Subject: [hurd,commited 7/8] hurd: Avoid PLT references to syscalls
Date: Sat, 16 Jun 2018 01:06:00 -0000	[thread overview]
Message-ID: <20180616010627.29577-7-samuel.thibault@ens-lyon.org> (raw)
In-Reply-To: <20180616010627.29577-1-samuel.thibault@ens-lyon.org>

	* mach/Makefile ($(mach-syscalls:%=$(objpfx))): Add hidden definition.
	* sysdeps/mach/include/mach/mach_traps.h (__mach_reply_port,
	__mach_thread_self, __mach_task_self, __mach_host_self, __swtch,
	__swtch_pri, __thread_switch, __evc_wait): Add hidden prototypes.
---
 ChangeLog                              |  4 ++++
 mach/Makefile                          |  3 ++-
 sysdeps/mach/include/mach/mach_traps.h | 20 ++++++++++++++------
 3 files changed, 20 insertions(+), 7 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index d81c823448..8c4b6ccd2f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -25,6 +25,10 @@
 	(__mach_msg): Add hidden prototype.
 	* mach/msg.c: Include <mach.h>.
 	(__mach_msg): Add hidden definition.
+	* mach/Makefile ($(mach-syscalls:%=$(objpfx))): Add hidden definition.
+	* sysdeps/mach/include/mach/mach_traps.h (__mach_reply_port,
+	__mach_thread_self, __mach_task_self, __mach_host_self, __swtch,
+	__swtch_pri, __thread_switch, __evc_wait): Add hidden prototypes.
 
 2018-06-15  Joseph Myers  <joseph@codesourcery.com>
 
diff --git a/mach/Makefile b/mach/Makefile
index 2683587b2d..435ae6882d 100644
--- a/mach/Makefile
+++ b/mach/Makefile
@@ -97,7 +97,8 @@ else
 $(mach-syscalls:%=$(objpfx)%.S): $(objpfx)%.S: $(objpfx)mach-syscalls.mk
 	(echo '#include <sysdep.h>'; \
 	 echo 'kernel_trap (__$*,$(sysno-$*),$(nargs-$*))'; \
-	 echo 'weak_alias (__$*, $*)') > $@-new
+	 echo 'weak_alias (__$*, $*)'; \
+	 echo 'libc_hidden_def (__$*)') > $@-new
 	 mv -f $@-new $@
 generated += $(mach-syscalls:=.S)
 endif	# mach-syscalls
diff --git a/sysdeps/mach/include/mach/mach_traps.h b/sysdeps/mach/include/mach/mach_traps.h
index d1b2febac1..2d4c1f9c5f 100644
--- a/sysdeps/mach/include/mach/mach_traps.h
+++ b/sysdeps/mach/include/mach/mach_traps.h
@@ -1,13 +1,21 @@
 #ifndef _MACH_MACH_TRAPS_H
 #include_next <mach/mach_traps.h>
 
-extern mach_port_t __mach_reply_port (void) attribute_hidden;
+extern mach_port_t __mach_reply_port (void);
+libc_hidden_proto (__mach_reply_port)
 extern mach_port_t __mach_thread_self (void);
+libc_hidden_proto (__mach_thread_self)
 extern mach_port_t (__mach_task_self) (void);
-extern mach_port_t (__mach_host_self) (void) attribute_hidden;
-extern boolean_t __swtch (void) attribute_hidden;
-extern boolean_t __swtch_pri (int priority) attribute_hidden;
+libc_hidden_proto (__mach_task_self)
+extern mach_port_t (__mach_host_self) (void);
+libc_hidden_proto (__mach_host_self)
+extern boolean_t __swtch (void);
+libc_hidden_proto (__swtch)
+extern boolean_t __swtch_pri (int priority);
+libc_hidden_proto (__swtch_pri)
 kern_return_t __thread_switch (mach_port_t new_thread,
-			     int option, mach_msg_timeout_t option_time) attribute_hidden;
-kern_return_t __evc_wait (unsigned int event) attribute_hidden;
+			     int option, mach_msg_timeout_t option_time);
+libc_hidden_proto (__thread_switch)
+kern_return_t __evc_wait (unsigned int event);
+libc_hidden_proto (__evc_wait)
 #endif
-- 
2.17.1

  reply	other threads:[~2018-06-16  1:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-16  1:06 [hurd,commited 1/8] hurd: avoid PLT ref between sendfile and sendfile64 Samuel Thibault
2018-06-16  1:06 ` Samuel Thibault [this message]
2018-06-16  1:06 ` [hurd,commited 5/8] hurd: Avoid PLT references to shortcuts Samuel Thibault
2018-06-16  1:06 ` [hurd,commited 6/8] hurd: Avoid PLT ref to __mach_msg Samuel Thibault
2018-06-16  1:06 ` [hurd,commited 8/8] hurd: Whitelist PLT refs which are difficult to avoid Samuel Thibault
2018-06-16  1:06 ` [hurd,commited 2/8] hurd: Detect 32bit overflow in value returned by lseek Samuel Thibault
2018-06-16  1:06 ` [hurd,commited 4/8] hurd: Avoid missing PLT ref from ld.so requirement Samuel Thibault
2018-06-16  1:15 ` [hurd,commited 3/8] hurd: Avoid PLT ref for __pthread_get_cleanup_stack Samuel Thibault

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180616010627.29577-7-samuel.thibault@ens-lyon.org \
    --to=samuel.thibault@ens-lyon.org \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).