diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2021-08-16 11:20:38 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2021-08-16 11:20:38 +0200 |
commit | cbb2aa337bc3a5f1cb9936781c3a7f5036d4262e (patch) | |
tree | 3bc2494f5cd1842789e390b3a4fed1d9b7725c5a /sysdeps | |
parent | 6e8a0aac2f883a23efb1683b120499138f9e6021 (diff) | |
download | glibc-cbb2aa337bc3a5f1cb9936781c3a7f5036d4262e.zip glibc-cbb2aa337bc3a5f1cb9936781c3a7f5036d4262e.tar.gz glibc-cbb2aa337bc3a5f1cb9936781c3a7f5036d4262e.tar.bz2 |
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.
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/mach/hurd/dl-sysdep.c | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/sysdeps/mach/hurd/dl-sysdep.c b/sysdeps/mach/hurd/dl-sysdep.c index 4b2072e..968a58f 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. */ |