public inbox for glibc-cvs@sourceware.org help / color / mirror / Atom feed
From: Fangrui Song <maskray@sourceware.org> To: glibc-cvs@sourceware.org Subject: [glibc/maskray/lld] hurd: Drop fmh kludge Date: Mon, 16 Aug 2021 17:15:25 +0000 (GMT) [thread overview] Message-ID: <20210816171525.200BC3951ECB@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=cbb2aa337bc3a5f1cb9936781c3a7f5036d4262e commit cbb2aa337bc3a5f1cb9936781c3a7f5036d4262e Author: Samuel Thibault <samuel.thibault@ens-lyon.org> Date: Mon Aug 16 11:20:38 2021 +0200 hurd: Drop fmh kludge Gnumach's 0650a4ee30e3 implements support for high bits being set in the mask parameter of vm_map. This allows to remove the fmh kludge that was masking away the address range by mapping a dumb area there. Diff: --- sysdeps/mach/hurd/dl-sysdep.c | 35 ----------------------------------- 1 file changed, 35 deletions(-) diff --git a/sysdeps/mach/hurd/dl-sysdep.c b/sysdeps/mach/hurd/dl-sysdep.c index 4b2072e5d5..968a58f668 100644 --- a/sysdeps/mach/hurd/dl-sysdep.c +++ b/sysdeps/mach/hurd/dl-sysdep.c @@ -66,37 +66,6 @@ void *_dl_random attribute_relro = NULL; struct hurd_startup_data *_dl_hurd_data; -#define FMH defined(__i386__) -#if ! FMH -# define fmh() ((void)0) -# define unfmh() ((void)0) -#else -/* XXX loser kludge for vm_map kernel bug, fixed by gnumach's 0650a4ee30e3 */ -#undef ELF_MACHINE_USER_ADDRESS_MASK -#define ELF_MACHINE_USER_ADDRESS_MASK 0 -static vm_address_t fmha; -static vm_size_t fmhs; -static void unfmh(void){ -__vm_deallocate(__mach_task_self(),fmha,fmhs);} -static void fmh(void) { - error_t err;int x;vm_offset_t o;mach_port_t p; - vm_address_t a=0x08000000U,max=VM_MAX_ADDRESS; - while (!(err=__vm_region(__mach_task_self(),&a,&fmhs,&x,&x,&x,&x,&p,&o))){ - __mach_port_deallocate(__mach_task_self(),p); - if (a+fmhs>=0x80000000U){ - max=a; break;} - fmha=a+=fmhs;} - if (err) assert(err==KERN_NO_SPACE); - if (!fmha)fmhs=0;else{ - fmhs=max-fmha; - err = __vm_map (__mach_task_self (), - &fmha, fmhs, 0, 0, MACH_PORT_NULL, 0, 1, - VM_PROT_NONE, VM_PROT_NONE, VM_INHERIT_COPY); - assert_perror(err);} - } -/* XXX loser kludge for vm_map kernel bug */ -#endif - ElfW(Addr) _dl_sysdep_start (void **start_argptr, @@ -147,8 +116,6 @@ _dl_sysdep_start (void **start_argptr, && _dl_hurd_data->user_entry == 0) _dl_hurd_data->user_entry = (vm_address_t) ENTRY_POINT; -unfmh(); /* XXX */ - #if 0 /* XXX make this work for real someday... */ if (_dl_hurd_data->user_entry == (vm_address_t) ENTRY_POINT) /* We were invoked as a command, not as the program interpreter. @@ -257,8 +224,6 @@ unfmh(); /* XXX */ /* Initialize frequently used global variable. */ GLRO(dl_pagesize) = __getpagesize (); -fmh(); /* XXX */ - /* See hurd/hurdstartup.c; this deals with getting information from the exec server and slicing up the arguments. Then it will call `go', above. */
reply other threads:[~2021-08-16 17:15 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20210816171525.200BC3951ECB@sourceware.org \ --to=maskray@sourceware.org \ --cc=glibc-cvs@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: linkBe 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).