From: Samuel Thibault <samuel.thibault@ens-lyon.org>
To: libc-alpha@sourceware.org
Cc: Samuel Thibault <samuel.thibault@ens-lyon.org>
Subject: [hurd,commited 5/8] hurd: Avoid PLT references to shortcuts
Date: Sat, 16 Jun 2018 01:06:00 -0000 [thread overview]
Message-ID: <20180616010627.29577-5-samuel.thibault@ens-lyon.org> (raw)
In-Reply-To: <20180616010627.29577-1-samuel.thibault@ens-lyon.org>
* sysdeps/mach/include/mach-shortcuts-hidden.h: New file.
* mach/shortcut.awk: Make syscall stubs include
<mach-shortcuts-hidden.h> and add hidden definition.
* sysdeps/mach/include/mach.h: Include <mach-shortcuts-hidden.h>.
---
ChangeLog | 4 ++++
mach/shortcut.awk | 2 ++
sysdeps/mach/include/mach-shortcuts-hidden.h | 13 +++++++++++++
sysdeps/mach/include/mach.h | 1 +
4 files changed, 20 insertions(+)
create mode 100644 sysdeps/mach/include/mach-shortcuts-hidden.h
diff --git a/ChangeLog b/ChangeLog
index 7ceaa829a8..4defdb6462 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -18,6 +18,10 @@
* sysdeps/htl/pthreadP.h (___pthread_get_cleanup_stack): Remove
prototype.
* sysdeps/mach/hurd/localplt.data (ld.so): Make ref to __open optional.
+ * sysdeps/mach/include/mach-shortcuts-hidden.h: New file.
+ * mach/shortcut.awk: Make syscall stubs include
+ <mach-shortcuts-hidden.h> and add hidden definition.
+ * sysdeps/mach/include/mach.h: Include <mach-shortcuts-hidden.h>.
2018-06-15 Joseph Myers <joseph@codesourcery.com>
diff --git a/mach/shortcut.awk b/mach/shortcut.awk
index ea283d49ba..090da82b6a 100644
--- a/mach/shortcut.awk
+++ b/mach/shortcut.awk
@@ -1,6 +1,7 @@
# Icky intimate knowledge of MiG output.
BEGIN { print "/* This file is generated by shortcut.awk. */";
+ print "#include <mach-shortcuts-hidden.h>";
echo=1;
inproto=0; proto=""; arglist="";
}
@@ -44,6 +45,7 @@ echo == 1 { print $0; }
print " return err;"
print "}";
print "weak_alias (" call ", " alias ")";
+ print "libc_hidden_def (" call ")";
# Declare RPC so the weak_alias that follows will work.
print "extern __typeof (" call ") " rpc ";";
echo = 1;
diff --git a/sysdeps/mach/include/mach-shortcuts-hidden.h b/sysdeps/mach/include/mach-shortcuts-hidden.h
new file mode 100644
index 0000000000..0942871f26
--- /dev/null
+++ b/sysdeps/mach/include/mach-shortcuts-hidden.h
@@ -0,0 +1,13 @@
+#include <mach-shortcuts.h>
+libc_hidden_proto (__task_create)
+libc_hidden_proto (__task_terminate)
+libc_hidden_proto (__vm_allocate)
+libc_hidden_proto (__vm_deallocate)
+libc_hidden_proto (__task_suspend)
+libc_hidden_proto (__task_set_special_port)
+libc_hidden_proto (__vm_map)
+libc_hidden_proto (__thread_depress_abort)
+libc_hidden_proto (__mach_port_allocate_name)
+libc_hidden_proto (__mach_port_allocate)
+libc_hidden_proto (__mach_port_deallocate)
+libc_hidden_proto (__mach_port_insert_right)
diff --git a/sysdeps/mach/include/mach.h b/sysdeps/mach/include/mach.h
index b4c2f45240..fff8349b82 100644
--- a/sysdeps/mach/include/mach.h
+++ b/sysdeps/mach/include/mach.h
@@ -1,5 +1,6 @@
#ifndef _MACH_H
#include_next <mach.h>
+#include <mach-shortcuts-hidden.h>
#ifndef _ISOMAC
libc_hidden_proto (__mach_msg_destroy)
#endif
--
2.17.1
next prev parent 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 ` [hurd,commited 7/8] hurd: Avoid PLT references to syscalls Samuel Thibault
2018-06-16 1:06 ` Samuel Thibault [this message]
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-5-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).