]> git.ipfire.org Git - thirdparty/glibc.git/blob - sysdeps/mach/hurd/dl-sysdep.c
Update copyright dates with scripts/update-copyrights.
[thirdparty/glibc.git] / sysdeps / mach / hurd / dl-sysdep.c
1 /* Operating system support for run-time dynamic linker. Hurd version.
2 Copyright (C) 1995-2019 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
18
19 /* In the static library, this is all handled by dl-support.c
20 or by the vanilla definitions in the rest of the C library. */
21 #ifdef SHARED
22
23 #include <hurd.h>
24 #include <link.h>
25 #include <unistd.h>
26 #include <fcntl.h>
27 #include <stdlib.h>
28 #include <sys/mman.h>
29 #include <ldsodefs.h>
30 #include <sys/wait.h>
31 #include <assert.h>
32 #include <sysdep.h>
33 #include <mach/mig_support.h>
34 #include <mach/machine/vm_param.h>
35 #include "hurdstartup.h"
36 #include <hurd/lookup.h>
37 #include <hurd/auth.h>
38 #include <hurd/term.h>
39 #include <stdarg.h>
40 #include <ctype.h>
41 #include <sys/stat.h>
42 #include <sys/uio.h>
43
44 #include <entry.h>
45 #include <dl-machine.h>
46 #include <dl-procinfo.h>
47
48 #include <dl-tunables.h>
49 #include <not-errno.h>
50
51 extern void __mach_init (void);
52
53 extern int _dl_argc;
54 extern char **_dl_argv;
55 extern char **_environ;
56
57 int __libc_enable_secure = 0;
58 rtld_hidden_data_def (__libc_enable_secure)
59 int __libc_multiple_libcs = 0; /* Defining this here avoids the inclusion
60 of init-first. */
61 /* This variable contains the lowest stack address ever used. */
62 void *__libc_stack_end = NULL;
63 rtld_hidden_data_def(__libc_stack_end)
64
65 #if HP_TIMING_AVAIL
66 hp_timing_t _dl_cpuclock_offset;
67 #endif
68
69 /* TODO: Initialize. */
70 void *_dl_random attribute_relro = NULL;
71
72 struct hurd_startup_data *_dl_hurd_data;
73
74 #define FMH defined(__i386__)
75 #if ! FMH
76 # define fmh() ((void)0)
77 # define unfmh() ((void)0)
78 #else
79 /* XXX loser kludge for vm_map kernel bug */
80 #undef ELF_MACHINE_USER_ADDRESS_MASK
81 #define ELF_MACHINE_USER_ADDRESS_MASK 0
82 static vm_address_t fmha;
83 static vm_size_t fmhs;
84 static void unfmh(void){
85 __vm_deallocate(__mach_task_self(),fmha,fmhs);}
86 static void fmh(void) {
87 error_t err;int x;vm_offset_t o;mach_port_t p;
88 vm_address_t a=0x08000000U,max=VM_MAX_ADDRESS;
89 while (!(err=__vm_region(__mach_task_self(),&a,&fmhs,&x,&x,&x,&x,&p,&o))){
90 __mach_port_deallocate(__mach_task_self(),p);
91 if (a+fmhs>=0x80000000U){
92 max=a; break;}
93 fmha=a+=fmhs;}
94 if (err) assert(err==KERN_NO_SPACE);
95 if (!fmha)fmhs=0;else{
96 fmhs=max-fmha;
97 err = __vm_map (__mach_task_self (),
98 &fmha, fmhs, 0, 0, MACH_PORT_NULL, 0, 1,
99 VM_PROT_NONE, VM_PROT_NONE, VM_INHERIT_COPY);
100 assert_perror(err);}
101 }
102 /* XXX loser kludge for vm_map kernel bug */
103 #endif
104
105
106 ElfW(Addr)
107 _dl_sysdep_start (void **start_argptr,
108 void (*dl_main) (const ElfW(Phdr) *phdr, ElfW(Word) phent,
109 ElfW(Addr) *user_entry,
110 ElfW(auxv_t) *auxv))
111 {
112 void go (intptr_t *argdata)
113 {
114 char **p;
115
116 /* Cache the information in various global variables. */
117 _dl_argc = *argdata;
118 _dl_argv = 1 + (char **) argdata;
119 _environ = &_dl_argv[_dl_argc + 1];
120 for (p = _environ; *p++;); /* Skip environ pointers and terminator. */
121
122 if ((void *) p == _dl_argv[0])
123 {
124 static struct hurd_startup_data nodata;
125 _dl_hurd_data = &nodata;
126 nodata.user_entry = (vm_address_t) ENTRY_POINT;
127 }
128 else
129 _dl_hurd_data = (void *) p;
130
131 __libc_enable_secure = _dl_hurd_data->flags & EXEC_SECURE;
132
133 __tunables_init (_environ);
134
135 if (_dl_hurd_data->flags & EXEC_STACK_ARGS &&
136 _dl_hurd_data->user_entry == 0)
137 _dl_hurd_data->user_entry = (vm_address_t) ENTRY_POINT;
138
139 unfmh(); /* XXX */
140
141 #if 0 /* XXX make this work for real someday... */
142 if (_dl_hurd_data->user_entry == (vm_address_t) ENTRY_POINT)
143 /* We were invoked as a command, not as the program interpreter.
144 The generic ld.so code supports this: it will parse the args
145 as "ld.so PROGRAM [ARGS...]". For booting the Hurd, we
146 support an additional special syntax:
147 ld.so [-LIBS...] PROGRAM [ARGS...]
148 Each LIBS word consists of "FILENAME=MEMOBJ";
149 for example "-/lib/libc.so=123" says that the contents of
150 /lib/libc.so are found in a memory object whose port name
151 in our task is 123. */
152 while (_dl_argc > 2 && _dl_argv[1][0] == '-' && _dl_argv[1][1] != '-')
153 {
154 char *lastslash, *memobjname, *p;
155 struct link_map *l;
156 mach_port_t memobj;
157 error_t err;
158
159 ++_dl_skip_args;
160 --_dl_argc;
161 p = _dl_argv++[1] + 1;
162
163 memobjname = strchr (p, '=');
164 if (! memobjname)
165 _dl_sysdep_fatal ("Bogus library spec: ", p, "\n", NULL);
166 *memobjname++ = '\0';
167 memobj = 0;
168 while (*memobjname != '\0')
169 memobj = (memobj * 10) + (*memobjname++ - '0');
170
171 /* Add a user reference on the memory object port, so we will
172 still have one after _dl_map_object_from_fd calls our
173 `close'. */
174 err = __mach_port_mod_refs (__mach_task_self (), memobj,
175 MACH_PORT_RIGHT_SEND, +1);
176 assert_perror (err);
177
178 lastslash = strrchr (p, '/');
179 l = _dl_map_object_from_fd (lastslash ? lastslash + 1 : p, NULL,
180 memobj, strdup (p), 0);
181
182 /* Squirrel away the memory object port where it
183 can be retrieved by the program later. */
184 l->l_info[DT_NULL] = (void *) memobj;
185 }
186 #endif
187
188 /* Call elf/rtld.c's main program. It will set everything
189 up and leave us to transfer control to USER_ENTRY. */
190 (*dl_main) ((const ElfW(Phdr) *) _dl_hurd_data->phdr,
191 _dl_hurd_data->phdrsz / sizeof (ElfW(Phdr)),
192 (ElfW(Addr) *) &_dl_hurd_data->user_entry, NULL);
193
194 /* The call above might screw a few things up.
195
196 First of all, if _dl_skip_args is nonzero, we are ignoring
197 the first few arguments. However, if we have no Hurd startup
198 data, it is the magical convention that ARGV[0] == P. The
199 startup code in init-first.c will get confused if this is not
200 the case, so we must rearrange things to make it so. We'll
201 overwrite the origional ARGV[0] at P with ARGV[_dl_skip_args].
202
203 Secondly, if we need to be secure, it removes some dangerous
204 environment variables. If we have no Hurd startup date this
205 changes P (since that's the location after the terminating
206 NULL in the list of environment variables). We do the same
207 thing as in the first case but make sure we recalculate P.
208 If we do have Hurd startup data, we have to move the data
209 such that it starts just after the terminating NULL in the
210 environment list.
211
212 We use memmove, since the locations might overlap. */
213 if (__libc_enable_secure || _dl_skip_args)
214 {
215 char **newp;
216
217 for (newp = _environ; *newp++;);
218
219 if (_dl_argv[-_dl_skip_args] == (char *) p)
220 {
221 if ((char *) newp != _dl_argv[0])
222 {
223 assert ((char *) newp < _dl_argv[0]);
224 _dl_argv[0] = memmove ((char *) newp, _dl_argv[0],
225 strlen (_dl_argv[0]) + 1);
226 }
227 }
228 else
229 {
230 if ((void *) newp != _dl_hurd_data)
231 memmove (newp, _dl_hurd_data, sizeof (*_dl_hurd_data));
232 }
233 }
234
235 {
236 extern void _dl_start_user (void);
237 /* Unwind the stack to ARGDATA and simulate a return from _dl_start
238 to the RTLD_START code which will run the user's entry point. */
239 RETURN_TO (argdata, &_dl_start_user, _dl_hurd_data->user_entry);
240 }
241 }
242
243 /* Set up so we can do RPCs. */
244 __mach_init ();
245
246 /* Initialize frequently used global variable. */
247 GLRO(dl_pagesize) = __getpagesize ();
248
249 #if HP_TIMING_AVAIL
250 HP_TIMING_NOW (_dl_cpuclock_offset);
251 #endif
252
253 fmh(); /* XXX */
254
255 /* See hurd/hurdstartup.c; this deals with getting information
256 from the exec server and slicing up the arguments.
257 Then it will call `go', above. */
258 _hurd_startup (start_argptr, &go);
259
260 LOSE;
261 abort ();
262 }
263
264 void
265 _dl_sysdep_start_cleanup (void)
266 {
267 /* Deallocate the reply port and task port rights acquired by
268 __mach_init. We are done with them now, and the user will
269 reacquire them for himself when he wants them. */
270 __mig_dealloc_reply_port (MACH_PORT_NULL);
271 __mach_port_deallocate (__mach_task_self (), __mach_host_self_);
272 __mach_port_deallocate (__mach_task_self (), __mach_task_self_);
273 }
274 \f
275 /* Minimal open/close/mmap implementation sufficient for initial loading of
276 shared libraries. These are weak definitions so that when the
277 dynamic linker re-relocates itself to be user-visible (for -ldl),
278 it will get the user's definition (i.e. usually libc's).
279
280 They also need to be set in the ld section of sysdeps/mach/hurd/Versions, to
281 be overridable, and in libc.abilist and ld.abilist to be checked. */
282
283 /* This macro checks that the function does not get renamed to be hidden: we do
284 need these to be overridable by libc's. */
285 #define check_no_hidden(name) \
286 __typeof (name) __check_##name##_no_hidden \
287 __attribute__ ((alias (#name))) \
288 __attribute_copy__ (name);
289
290 /* Open FILE_NAME and return a Hurd I/O for it in *PORT, or return an
291 error. If STAT is non-zero, stat the file into that stat buffer. */
292 static error_t
293 open_file (const char *file_name, int flags,
294 mach_port_t *port, struct stat64 *stat)
295 {
296 enum retry_type doretry;
297 char retryname[1024]; /* XXX string_t LOSES! */
298 file_t startdir;
299 error_t err;
300
301 error_t use_init_port (int which, error_t (*operate) (file_t))
302 {
303 return (which < _dl_hurd_data->portarraysize
304 ? ((*operate) (_dl_hurd_data->portarray[which]))
305 : EGRATUITOUS);
306 }
307 file_t get_dtable_port (int fd)
308 {
309 if ((unsigned int) fd < _dl_hurd_data->dtablesize
310 && _dl_hurd_data->dtable[fd] != MACH_PORT_NULL)
311 {
312 __mach_port_mod_refs (__mach_task_self (), _dl_hurd_data->dtable[fd],
313 MACH_PORT_RIGHT_SEND, +1);
314 return _dl_hurd_data->dtable[fd];
315 }
316 errno = EBADF;
317 return MACH_PORT_NULL;
318 }
319
320 assert (!(flags & ~(O_READ | O_CLOEXEC)));
321
322 startdir = _dl_hurd_data->portarray[file_name[0] == '/' ?
323 INIT_PORT_CRDIR : INIT_PORT_CWDIR];
324
325 while (file_name[0] == '/')
326 file_name++;
327
328 err = __dir_lookup (startdir, (char *)file_name, O_RDONLY, 0,
329 &doretry, retryname, port);
330
331 if (!err)
332 err = __hurd_file_name_lookup_retry (use_init_port, get_dtable_port,
333 __dir_lookup, doretry, retryname,
334 O_RDONLY, 0, port);
335 if (!err && stat)
336 {
337 err = __io_stat (*port, stat);
338 if (err)
339 __mach_port_deallocate (__mach_task_self (), *port);
340 }
341
342 return err;
343 }
344
345 check_no_hidden(__open);
346 check_no_hidden (__open64);
347 int weak_function
348 __open (const char *file_name, int mode, ...)
349 {
350 mach_port_t port;
351 error_t err = open_file (file_name, mode, &port, 0);
352 if (err)
353 return __hurd_fail (err);
354 else
355 return (int)port;
356 }
357 weak_alias (__open, __open64)
358
359 check_no_hidden(__close);
360 int weak_function
361 __close (int fd)
362 {
363 if (fd != (int) MACH_PORT_NULL)
364 __mach_port_deallocate (__mach_task_self (), (mach_port_t) fd);
365 return 0;
366 }
367
368 check_no_hidden(__read);
369 __ssize_t weak_function
370 __read (int fd, void *buf, size_t nbytes)
371 {
372 error_t err;
373 char *data;
374 mach_msg_type_number_t nread;
375
376 data = buf;
377 nread = nbytes;
378 err = __io_read ((mach_port_t) fd, &data, &nread, -1, nbytes);
379 if (err)
380 return __hurd_fail (err);
381
382 if (data != buf)
383 {
384 memcpy (buf, data, nread);
385 __vm_deallocate (__mach_task_self (), (vm_address_t) data, nread);
386 }
387
388 return nread;
389 }
390 libc_hidden_weak (__read)
391
392 check_no_hidden(__write);
393 __ssize_t weak_function
394 __write (int fd, const void *buf, size_t nbytes)
395 {
396 error_t err;
397 mach_msg_type_number_t nwrote;
398
399 assert (fd < _hurd_init_dtablesize);
400
401 err = __io_write (_hurd_init_dtable[fd], buf, nbytes, -1, &nwrote);
402 if (err)
403 return __hurd_fail (err);
404
405 return nwrote;
406 }
407 libc_hidden_weak (__write)
408
409 /* This is only used for printing messages (see dl-misc.c). */
410 check_no_hidden(__writev);
411 __ssize_t weak_function
412 __writev (int fd, const struct iovec *iov, int niov)
413 {
414 if (fd >= _hurd_init_dtablesize)
415 {
416 errno = EBADF;
417 return -1;
418 }
419
420 int i;
421 size_t total = 0;
422 for (i = 0; i < niov; ++i)
423 total += iov[i].iov_len;
424
425 if (total != 0)
426 {
427 char buf[total], *bufp = buf;
428 error_t err;
429 mach_msg_type_number_t nwrote;
430
431 for (i = 0; i < niov; ++i)
432 bufp = (memcpy (bufp, iov[i].iov_base, iov[i].iov_len)
433 + iov[i].iov_len);
434
435 err = __io_write (_hurd_init_dtable[fd], buf, total, -1, &nwrote);
436 if (err)
437 return __hurd_fail (err);
438
439 return nwrote;
440 }
441 return 0;
442 }
443
444 check_no_hidden(__libc_lseek64);
445 off64_t weak_function
446 __libc_lseek64 (int fd, off64_t offset, int whence)
447 {
448 error_t err;
449
450 err = __io_seek ((mach_port_t) fd, offset, whence, &offset);
451 if (err)
452 return __hurd_fail (err);
453
454 return offset;
455 }
456
457 check_no_hidden(__mmap);
458 void *weak_function
459 __mmap (void *addr, size_t len, int prot, int flags, int fd, off_t offset)
460 {
461 error_t err;
462 vm_prot_t vmprot;
463 vm_address_t mapaddr;
464 mach_port_t memobj_rd, memobj_wr;
465
466 vmprot = VM_PROT_NONE;
467 if (prot & PROT_READ)
468 vmprot |= VM_PROT_READ;
469 if (prot & PROT_WRITE)
470 vmprot |= VM_PROT_WRITE;
471 if (prot & PROT_EXEC)
472 vmprot |= VM_PROT_EXECUTE;
473
474 if (flags & MAP_ANON)
475 memobj_rd = MACH_PORT_NULL;
476 else
477 {
478 assert (!(flags & MAP_SHARED));
479 err = __io_map ((mach_port_t) fd, &memobj_rd, &memobj_wr);
480 if (err)
481 return __hurd_fail (err), MAP_FAILED;
482 if (memobj_wr != MACH_PORT_NULL)
483 __mach_port_deallocate (__mach_task_self (), memobj_wr);
484 }
485
486 mapaddr = (vm_address_t) addr;
487 err = __vm_map (__mach_task_self (),
488 &mapaddr, (vm_size_t) len, ELF_MACHINE_USER_ADDRESS_MASK,
489 !(flags & MAP_FIXED),
490 memobj_rd,
491 (vm_offset_t) offset,
492 flags & (MAP_COPY|MAP_PRIVATE),
493 vmprot, VM_PROT_ALL,
494 (flags & MAP_SHARED) ? VM_INHERIT_SHARE : VM_INHERIT_COPY);
495 if (err == KERN_NO_SPACE && (flags & MAP_FIXED))
496 {
497 /* XXX this is not atomic as it is in unix! */
498 /* The region is already allocated; deallocate it first. */
499 err = __vm_deallocate (__mach_task_self (), mapaddr, len);
500 if (! err)
501 err = __vm_map (__mach_task_self (),
502 &mapaddr, (vm_size_t) len,
503 ELF_MACHINE_USER_ADDRESS_MASK,
504 !(flags & MAP_FIXED),
505 memobj_rd, (vm_offset_t) offset,
506 flags & (MAP_COPY|MAP_PRIVATE),
507 vmprot, VM_PROT_ALL,
508 (flags & MAP_SHARED)
509 ? VM_INHERIT_SHARE : VM_INHERIT_COPY);
510 }
511
512 if ((flags & MAP_ANON) == 0)
513 __mach_port_deallocate (__mach_task_self (), memobj_rd);
514
515 if (err)
516 return __hurd_fail (err), MAP_FAILED;
517 return (void *) mapaddr;
518 }
519
520 check_no_hidden(__fxstat64);
521 int weak_function
522 __fxstat64 (int vers, int fd, struct stat64 *buf)
523 {
524 error_t err;
525
526 assert (vers == _STAT_VER);
527
528 err = __io_stat ((mach_port_t) fd, buf);
529 if (err)
530 return __hurd_fail (err);
531
532 return 0;
533 }
534 libc_hidden_def (__fxstat64)
535
536 check_no_hidden(__xstat64);
537 int weak_function
538 __xstat64 (int vers, const char *file, struct stat64 *buf)
539 {
540 error_t err;
541 mach_port_t port;
542
543 assert (vers == _STAT_VER);
544
545 err = open_file (file, 0, &port, buf);
546 if (err)
547 return __hurd_fail (err);
548
549 __mach_port_deallocate (__mach_task_self (), port);
550
551 return 0;
552 }
553 libc_hidden_def (__xstat64)
554
555 /* This function is called by the dynamic linker (rtld.c) to check
556 whether debugging malloc is allowed even for SUID binaries. This
557 stub will always fail, which means that malloc-debugging is always
558 disabled for SUID binaries. */
559 check_no_hidden(__access);
560 int weak_function
561 __access (const char *file, int type)
562 {
563 errno = ENOSYS;
564 return -1;
565 }
566 check_no_hidden(__access_noerrno);
567 int weak_function
568 __access_noerrno (const char *file, int type)
569 {
570 return -1;
571 }
572
573 check_no_hidden(__getpid);
574 pid_t weak_function
575 __getpid (void)
576 {
577 pid_t pid, ppid;
578 int orphaned;
579
580 if (__proc_getpids (_dl_hurd_data->portarray[INIT_PORT_PROC],
581 &pid, &ppid, &orphaned))
582 return -1;
583
584 return pid;
585 }
586
587 /* We need this alias to satisfy references from libc_pic.a objects
588 that were affected by the libc_hidden_proto declaration for __getpid. */
589 strong_alias (__getpid, __GI___getpid)
590
591 /* This is called only in some strange cases trying to guess a value
592 for $ORIGIN for the executable. The dynamic linker copes with
593 getcwd failing (dl-object.c), and it's too much hassle to include
594 the functionality here. (We could, it just requires duplicating or
595 reusing getcwd.c's code but using our special lookup function as in
596 `open', above.) */
597 check_no_hidden(__getcwd);
598 char *weak_function
599 __getcwd (char *buf, size_t size)
600 {
601 errno = ENOSYS;
602 return NULL;
603 }
604
605 /* This is used by dl-tunables.c to strdup strings. We can just make this a
606 mere allocation. */
607 check_no_hidden(__sbrk);
608 void *weak_function
609 __sbrk (intptr_t increment)
610 {
611 vm_address_t addr;
612 __vm_allocate (__mach_task_self (), &addr, increment, 1);
613 return (void *) addr;
614 }
615
616 check_no_hidden(__strtoul_internal);
617 unsigned long int weak_function
618 __strtoul_internal (const char *nptr, char **endptr, int base, int group)
619 {
620 assert (base == 0 || base == 10);
621 assert (group == 0);
622 return _dl_strtoul (nptr, endptr);
623 }
624
625 /* We need this alias to satisfy references from libc_pic.a objects
626 that were affected by the libc_hidden_proto declaration for __strtoul_internal. */
627 strong_alias (__strtoul_internal, __GI___strtoul_internal)
628 strong_alias (__strtoul_internal, __GI_____strtoul_internal)
629
630 check_no_hidden(_exit);
631 void weak_function attribute_hidden
632 _exit (int status)
633 {
634 __proc_mark_exit (_dl_hurd_data->portarray[INIT_PORT_PROC],
635 W_EXITCODE (status, 0), 0);
636 while (__task_terminate (__mach_task_self ()))
637 __mach_task_self_ = (__mach_task_self) ();
638
639 LOSE;
640 abort ();
641 }
642 /* We need this alias to satisfy references from libc_pic.a objects
643 that were affected by the libc_hidden_proto declaration for _exit. */
644 strong_alias (_exit, __GI__exit)
645
646 /* Try to get a machine dependent instruction which will make the
647 program crash. This is used in case everything else fails. */
648 #include <abort-instr.h>
649 #ifndef ABORT_INSTRUCTION
650 /* No such instruction is available. */
651 # define ABORT_INSTRUCTION
652 #endif
653
654 check_no_hidden(abort);
655 void weak_function
656 abort (void)
657 {
658 /* Try to abort using the system specific command. */
659 ABORT_INSTRUCTION;
660
661 /* If the abort instruction failed, exit. */
662 _exit (127);
663
664 /* If even this fails, make sure we never return. */
665 while (1)
666 /* Try for ever and ever. */
667 ABORT_INSTRUCTION;
668 }
669
670 /* We need this alias to satisfy references from libc_pic.a objects
671 that were affected by the libc_hidden_proto declaration for abort. */
672 strong_alias (abort, __GI_abort)
673 strong_alias (abort, __GI___chk_fail)
674 strong_alias (abort, __GI___fortify_fail)
675 strong_alias (abort, __GI___assert_fail)
676 strong_alias (abort, __GI___assert_perror_fail)
677 \f
678 /* This function is called by interruptible RPC stubs. For initial
679 dynamic linking, just use the normal mach_msg. Since this defn is
680 weak, the real defn in libc.so will override it if we are linked into
681 the user program (-ldl). */
682
683 error_t weak_function
684 _hurd_intr_rpc_mach_msg (mach_msg_header_t *msg,
685 mach_msg_option_t option,
686 mach_msg_size_t send_size,
687 mach_msg_size_t rcv_size,
688 mach_port_t rcv_name,
689 mach_msg_timeout_t timeout,
690 mach_port_t notify)
691 {
692 return __mach_msg (msg, option, send_size, rcv_size, rcv_name,
693 timeout, notify);
694 }
695
696
697 void
698 _dl_show_auxv (void)
699 {
700 /* There is nothing to print. Hurd has no auxiliary vector. */
701 }
702
703
704 void weak_function
705 _dl_init_first (int argc, ...)
706 {
707 /* This no-op definition only gets used if libc is not linked in. */
708 }
709
710 #endif /* SHARED */