This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 1/3] Mark ld.so internel mmap functions hidden


On Mon, Oct 19, 2015 at 1:45 PM, Richard Henderson <rth@twiddle.net> wrote:
> On 10/19/2015 09:31 AM, H.J. Lu wrote:
>>
>> +# if IS_IN (rtld)
>> +#  include <dl-mman.h>
>> +extern __typeof (__mprotect) __mprotect attribute_hidden;
>> +extern __typeof (__munmap) __munmap attribute_hidden;
>
>
> Surely if mmap can't be hidden, then munmap can't either.
>
> Surely you should just put all of these within dl-mman.h, even if in the end
> there are a few lines of overlap.
>

sysdeps/mach/hurd/Versions has

ld {
  GLIBC_2.0 {
    # variables that must be shared with libc
    __hurd_sigthread_stack_base; __hurd_sigthread_stack_end;
    __hurd_sigthread_variables;
    __hurd_threadvar_stack_mask;  __hurd_threadvar_stack_offset;

    # functions that must be shared with libc
    __close; __getcwd; __getpid;
    __mmap; __open; __xstat64; __fxstat64;
    _exit; _hurd_intr_rpc_mach_msg;
    abort;
  }
  GLIBC_2.2.6 {
    # this also must be shared with libc.
    __errno_location;
  }
  GLIBC_PRIVATE {
    _dl_init_first;

    # functions that must be shared with libc
    __libc_read; __libc_write; __libc_lseek64;
  }
}

__mprotect and __munmap are hidden in ld.so on Hurd.


-- 
H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]