Remove the bulk of the NaCl port.

The NaCl port has not been actively maintained since before the 2.25
release.  The complementary GCC back-end was never contributed to GCC,
and we are given to understand that the current NaCl SDK has switched
to Clang and therefore cannot be used to build glibc anymore, so we
doubt that the port remains useful.

This commit simply removes the sysdeps/arm/nacl and sysdeps/nacl
directories and the abi-tags entry.

	Remove the NaCl port.
	* abi-tags: Remove .*-.*-nacl.* entry.
	* sysdeps/arm/nacl: Remove directory and contents.
	* sysdeps/nacl: Likewise.
This commit is contained in:
Zack Weinberg 2017-05-11 20:28:07 -04:00
parent a429d2ff07
commit 42a844c6a2
152 changed files with 10 additions and 8627 deletions

View File

@ -1,3 +1,10 @@
2017-05-20 Zack Weinberg <zackw@panix.com>
Remove the NaCl port.
* sysdeps/arm/nacl: Remove directory and contents.
* sysdeps/nacl: Remove directory and contents.
* abi-tags: Remove .*-.*-nacl.* entry.
2017-05-19 Rical Jasan <ricaljasan@pacific.net> 2017-05-19 Rical Jasan <ricaljasan@pacific.net>
* manual/errno.texi: Convert @comment-based errno documentation to * manual/errno.texi: Convert @comment-based errno documentation to

3
NEWS
View File

@ -63,6 +63,9 @@ Version 2.26
* The obsolete <sys/ultrasound.h> header file has been removed. * The obsolete <sys/ultrasound.h> header file has been removed.
* The port to Native Client running on ARMv7-A (--host=arm-nacl) has been
removed.
Security related changes: Security related changes:
* The DNS stub resolver limits the advertised UDP buffer size to 1200 bytes, * The DNS stub resolver limits the advertised UDP buffer size to 1200 bytes,

View File

@ -28,7 +28,5 @@
.*-.*-syllable.* 5 2.0.0 # just an arbitrary value .*-.*-syllable.* 5 2.0.0 # just an arbitrary value
.*-.*-nacl.* 6 42.0.0 # earliest compatible Chromium version
# There is no catch-all default here because every supported OS that uses # There is no catch-all default here because every supported OS that uses
# ELF must have its own unique ABI tag. # ELF must have its own unique ABI tag.

View File

@ -1,2 +0,0 @@
arm/nptl
init_array

View File

@ -1,33 +0,0 @@
# Makefile fragment for ARM/NaCl configurations.
# Copyright (C) 2015-2017 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
# The GNU C Library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
# You should have received a copy of the GNU Lesser General Public
# License along with the GNU C Library; if not, see
# <http://www.gnu.org/licenses/>.
# sysdeps/nacl/Makefile needs this set to the architecture suffix used in
# the NaCl SDK.
nacl-sdk-arch = arm
# We don't really support TLSDESC, even though the compiler thinks it does.
have-arm-tls-desc = no
ifeq ($(subdir),csu)
sysdep_routines += aeabi_read_tp
endif
ifeq ($(subdir),elf)
sysdep-rtld-routines += aeabi_read_tp
endif

View File

@ -1,47 +0,0 @@
/* longjmp that validates stack addresses. ARM/NaCl version.
Copyright (C) 2015-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library. If not, see
<http://www.gnu.org/licenses/>. */
#include <sysdep.h>
.section .rodata.str1.1,"aMS",%progbits,1
.type longjmp_msg,%object
longjmp_msg:
.string "longjmp causes uninitialized stack frame"
.size longjmp_msg, .-longjmp_msg
.text
/* We don't have sigaltstack and so any longjmp must be to an outer frame. */
.macro check_sp reg
cmp sp, \reg
bls .Lok
#ifdef PIC
movw r0, #:lower16:longjmp_msg-(.LPIC0+8)
movt r0, #:upper16:longjmp_msg-(.LPIC0+8)
.LPIC0: add r0, r0, pc
#else
movw r0, #:lower16:longjmp_msg
movt r0, #:upper16:longjmp_msg
#endif
b HIDDEN_JUMPTARGET(__fortify_fail)
.Lok:
.endm
#define CHECK_SP(reg) check_sp reg
#define __longjmp ____longjmp_chk
#include <__longjmp.S>

View File

@ -1,44 +0,0 @@
/* ARM EABI helper function for reading the thread pointer. NaCl version.
Copyright (C) 2015-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
In addition to the permissions in the GNU Lesser General Public
License, the Free Software Foundation gives you unlimited
permission to link the compiled version of this file with other
programs, and to distribute those programs without any restriction
coming from the use of this file. (The GNU Lesser General Public
License restrictions do apply in other respects; for example, they
cover modification of the file, and distribution when not linked
into another program.)
Note that people who make modified versions of this file are not
obligated to grant this special exception for their modified
versions; it is their choice whether to do so. The GNU Lesser
General Public License gives permission to release a modified
version without this exception; this exception also makes it
possible to release a modified version which carries forward this
exception.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library. If not, see
<http://www.gnu.org/licenses/>. */
#include <sysdep.h>
/* GCC will emit calls to this routine under -mtp=soft. */
.hidden __aeabi_read_tp
ENTRY (__aeabi_read_tp)
ldr r0, [r9]
sfi_bx lr
END (__aeabi_read_tp)

View File

@ -1,43 +0,0 @@
/* Macros to test for CPU features on ARM. NaCl version.
Copyright (C) 2015-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library. If not, see
<http://www.gnu.org/licenses/>. */
#ifndef _NACL_ARM_FEATURES_H
#define _NACL_ARM_FEATURES_H 1
#ifdef __SOFTFP__
# error NaCl should always have VFP enabled
#endif
/* NaCl does not support iWMMXt at all. */
#define ARM_ASSUME_NO_IWMMXT 1
/* NaCl does not allow instructions to target the pc register. */
#define ARM_ALWAYS_BX 1
/* Computed branch targets must be bundle-aligned, which is to 16 bytes. */
#define ARM_BX_ALIGN_LOG2 4
/* Two-register addressing modes are never allowed. */
#define ARM_NO_INDEX_REGISTER 1
/* Only ARM mode code is allowed, never Thumb mode. */
#define NO_THUMB
#include_next <arm-features.h>
#endif /* arm-features.h */

View File

@ -1,53 +0,0 @@
/* Machine-dependent ELF dynamic relocation inline functions. ARM/NaCl version.
Copyright (C) 2015-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library. If not, see
<http://www.gnu.org/licenses/>. */
#ifndef dl_machine_h
/* This is only needed for handling TEXTRELs and NaCl will never
support TEXTRELs at all. */
#define CLEAR_CACHE(start, end) __builtin_trap ()
#endif
/* The rest is just machine-specific.
This #include is outside the #ifndef because the parts of
dl-machine.h used only by dynamic-link.h are outside the guard. */
#include <sysdeps/arm/dl-machine.h>
#ifdef dl_machine_h
/* Initial entry point code for the dynamic linker.
The C function `_dl_start' is the real entry point;
its return value is the user program's entry point. */
#undef RTLD_START
#define RTLD_START asm ("\
.text\n\
.globl _start\n\
.type _start, %function\n\
.p2align 4\n\
_start:\n\
@ r0 has the pointer to the info block (see nacl_startup.h)\n\
mov r1, sp @ Save stack base for __libc_stack_end.\n\
push {r0-r3} @ Push those, maintaining alignment to 16.\n\
mov r0, sp @ Pointer to {info, sp} is argument.\n\
sfi_bl _dl_start\n\
pop {r1-r4} @ Restore stack, getting info block into r1.\n\
mov lr, #0 @ Return address for noreturn call.\n\
b _dl_start_user");
#endif

View File

@ -1,278 +0,0 @@
/* PLT trampolines. ARM/NaCl version.
Copyright (C) 2015-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library. If not, see
<http://www.gnu.org/licenses/>. */
#include <sysdep.h>
.syntax unified
.text
@ Change &GOT[n+3] into 8*n. Note relocs are 8 bytes each.
.macro compute_reloc_arg pltgot, got2
sub r1, \pltgot, \got2 @ r1 = &GOT[n+3] - &GOT[2] = 4*(n-1)
sub r1, r1, #4 @ r1 = 4*n
add r1, r1, r1 @ r1 *= 2 = 8*n
.endm
CFI_SECTIONS
.globl _dl_runtime_resolve
.type _dl_runtime_resolve, %function
.p2align 4
_dl_runtime_resolve:
cfi_startproc
cfi_adjust_cfa_offset (8)
@ We get called with:
@ lr contains the return address from this call
@ stack[1] contains &GOT[n+3] (pointer to function)
@ stack[0] points to &GOT[2]
ldr ip, [sp] @ ip gets &GOT[2]
@ Save the argument registers and the return address.
@ r4 doesn't need to be saved, but it makes the total
@ adjustment to sp (including the two words pushed by
@ the PLT code) an even eight words, so sp stays aligned.
push {r0-r4, lr}
cfi_adjust_cfa_offset (24)
cfi_rel_offset (r0, 0)
cfi_rel_offset (r1, 4)
cfi_rel_offset (r2, 8)
cfi_rel_offset (r3, 12)
cfi_rel_offset (r4, 16)
cfi_rel_offset (lr, 20)
ldr r1, [sp, #28] @ r1 gets &GOT[n+3]
@ Get the 'struct link_map *' for the first argument to _dl_fixup.
sfi_breg ip, ldr r0, [\B, #-4]
@ Get the reloc offset for the second argument to _dl_fixup.
compute_reloc_arg r1, ip
@ This does the real work, and returns the real call target.
sfi_bl _dl_fixup
mov ip, r0
@ Restore the saved registers.
pop {r0-r4, lr}
cfi_adjust_cfa_offset (-24)
cfi_restore (r0)
cfi_restore (r1)
cfi_restore (r2)
cfi_restore (r3)
cfi_restore (r4)
cfi_restore (lr)
@ Now compensate for the two words pushed by the PLT code.
sfi_sp add sp, #8
cfi_adjust_cfa_offset (-8)
@ Finally, jump to the newfound call target.
sfi_bx ip
cfi_endproc
.size _dl_runtime_resolve, .-_dl_runtime_resolve
#ifndef PROF
.globl _dl_runtime_profile
.type _dl_runtime_profile, #function
.p2align 4
_dl_runtime_profile:
cfi_startproc
cfi_adjust_cfa_offset (8)
@ We get called with:
@ lr contains the return address from this call
@ stack[1] contains &GOT[n+3] (pointer to function)
@ stack[0] points to &GOT[2]
@ Stack layout:
@ sp + 204 framesize returned from pltenter
@ sp + 12 La_arm_regs
@ sp + 4 Saved two arguments to _dl_profile_fixup
@ sp + 0 outgoing argument to _dl_profile_fixup
@ For now, we only save the general purpose registers.
# define PLTEXIT_ARGS 4
# define LA_ARM_REGS (PLTEXIT_ARGS + 8)
# define LA_ARM_REGS_SIZE (4 * (4 + 1 + 1 + 42))
# define PLTENTER_FRAMESIZE (LA_ARM_REGS + LA_ARM_REGS_SIZE)
# define FRAMESIZE (((PLTENTER_FRAMESIZE + 4) + 15) & -16)
@ The NaCl ABI requires that sp be aligned to 16 bytes at call
@ sites. Assuming that was met on entry to the PLT, sp is
@ now exactly 8 bytes misaligned.
sfi_sp sub sp, #(FRAMESIZE - 8)
cfi_def_cfa_offset (FRAMESIZE)
@ Store the argument registers in La_arm_regs.
strd r0, r1, [sp, #LA_ARM_REGS]
cfi_offset (r0, LA_ARM_REGS + 0)
cfi_offset (r1, LA_ARM_REGS + 4)
strd r2, r3, [sp, #(LA_ARM_REGS + 8)]
cfi_offset (r2, LA_ARM_REGS + 8)
cfi_offset (r3, LA_ARM_REGS + 12)
ldr ip, [sp, #(FRAMESIZE - 8)] @ ip gets &GOT[2]
ldr r3, [sp, #(FRAMESIZE - 4)] @ r3 gets &GOT[n+3]
@ Recover the incoming sp and lr and save those in La_arm_regs.
add r0, sp, #FRAMESIZE
mov r1, lr
strd r0, r1, [sp, #(LA_ARM_REGS + 16)]
cfi_offset (sp, LA_ARM_REGS + 16)
cfi_offset (lr, LA_ARM_REGS + 20)
@ Get the 'struct link_map *' for the first arg to _dl_profile_fixup.
sfi_breg ip, ldr r0, [\B, #-4]
@ Get the reloc offset for the second argument to _dl_profile_fixup.
compute_reloc_arg r3, ip
@ The third argument is the original return address, still in lr.
mov r2, lr
@ Compute the fourth argument, the La_arm_regs pointer.
add r3, sp, #PLTEXIT_ARGS
@ Compute the fifth argument, the address of the 'framesize'
@ out parameter, and store it at the top of the stack.
add ip, sp, #PLTENTER_FRAMESIZE
str ip, [sp]
@ Save away the first two arguments, which we will need
@ again for _dl_call_pltexit, below.
strd r0, r1, [sp, #PLTEXIT_ARGS]
@ This does the real work, and returns the real call target.
sfi_bl _dl_profile_fixup
@ The address to call is now in r0.
@ Check whether we're wrapping this function,
@ i.e. if the framesize out parameter is >= 0.
ldr ip, [sp, #PLTENTER_FRAMESIZE]
cmp ip, #0
bge 1f
cfi_remember_state
@ Save _dl_profile_fixup's return value: the real call target.
mov ip, r0
@ Restore the registers from the La_arm_regs (perhaps as modified
@ by audit modules' pltenter functions).
add r1, sp, #LA_ARM_REGS
sfi_sp sfi_breg r1, ldmia \B, {r0-r3, sp, lr}
cfi_def_cfa_offset (0)
cfi_restore (r0)
cfi_restore (r1)
cfi_restore (r2)
cfi_restore (r3)
cfi_restore (sp)
cfi_restore (lr)
@ Finally, jump to the newfound call target.
sfi_bx ip
1: cfi_restore_state
@ The new frame size is in ip.
@ Save the fp in the stack slot previously used for the fifth
@ argument to _dl_profile_fixup.
str fp, [sp]
cfi_offset (fp, 0)
@ Save the result of _dl_profile_fixup, the real call target.
@ We'll reuse the stack slot just used for the 'framesize'
@ out parameter to _dl_profile_fixup.
str r0, [sp, #PLTENTER_FRAMESIZE]
@ Stack layout:
@ fp + 264 call target
@ fp + 72 La_arm_regs
@ fp + 68 Saved two arguments to _dl_profile_fixup
@ fp + 64 saved fp
@ fp + 0 La_arm_retval
@ sp..fp copied incoming stack space (plus alignment)
@ For now, we only save the general purpose registers.
# define FP_LA_ARM_RETVAL 0
# define LA_ARM_RETVAL_SIZE (4 * (4 + 12))
# define FP_SAVED_FP LA_ARM_RETVAL_SIZE
# define FP_PLTEXIT_ARGS (FP_SAVED_FP + 4)
# define FP_LA_ARM_REGS (FP_PLTEXIT_ARGS + 8)
# define FP_CALL_TARGET (FP_LA_ARM_REGS + LA_ARM_REGS_SIZE)
# define FP_FRAMESIZE (FP_CALL_TARGET + 4)
sub fp, sp, #(FP_FRAMESIZE - FRAMESIZE)
cfi_def_cfa (fp, FP_FRAMESIZE)
sub r1, fp, ip
@ This doesn't need sfi_sp because we just include the
@ sandboxing mask along with the alignment mask.
bic sp, r1, #0xc000000f
@ Copy the stack arguments. The audit modules' pltenter
@ function(s) decided how much needs to be copied.
@ Load the sp as modified by pltenter functions, rather
@ than what we think the incoming sp was (fp + FP_FRAMESIZE).
sfi_breg fp, ldr r1, [\B, #(FP_LA_ARM_REGS + 16)]
mov r0, sp
mov r2, ip
sfi_bl memcpy
@ Load up the arguments from La_arm_regs and call the user's function.
sfi_breg fp, ldr ip, [\B, #FP_CALL_TARGET]
sfi_breg fp, ldrd r0, r1, [\B, #FP_LA_ARM_REGS]
sfi_breg fp, ldrd r2, r3, [\B, #(FP_LA_ARM_REGS + 8)]
sfi_blx ip
@ Stash the return value registers in La_arm_retval.
sfi_breg fp, strd r0, r1, [\B, #FP_LA_ARM_RETVAL]
sfi_breg fp, strd r2, r3, [\B, #(FP_LA_ARM_RETVAL + 8)]
@ Call pltexit. We saved the first two arguments earlier--they
@ are the same ones passed to _dl_profile_fixup. The latter two
@ arguments are La_arm_regs and La_arm_retval blocks, respectively.
sfi_breg fp, ldrd r0, r1, [\B, #FP_PLTEXIT_ARGS]
add r2, fp, #FP_LA_ARM_REGS
add r3, fp, #FP_LA_ARM_RETVAL
sfi_bl _dl_call_pltexit
@ Reload the saved return value registers for the caller.
sfi_breg fp, ldrd r0, r1, [\B, #FP_LA_ARM_RETVAL]
sfi_breg fp, ldrd r2, r3, [\B, #(FP_LA_ARM_RETVAL + 8)]
@ Unwind the frame.
sfi_sp mov sp, fp
cfi_def_cfa_register (sp)
ldr fp, [sp, #FP_SAVED_FP]
cfi_restore (fp)
@ Reload the lr and sp values from La_arm_regs, where they
@ might have been modified by pltenter functions, rather than
@ computing what we think the incoming value was.
ldr lr, [sp, #(FP_LA_ARM_REGS + 20)]
cfi_restore (lr)
sfi_sp ldr sp, [sp, #(FP_LA_ARM_REGS + 16)]
cfi_def_cfa_offset (0)
@ Finally, return to the caller.
sfi_bx lr
cfi_endproc
.size _dl_runtime_profile, .-_dl_runtime_profile
#endif
.previous

View File

@ -1,41 +0,0 @@
/* Private jmp_buf-related definitions. NaCl/ARM version.
Copyright (C) 2015-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library. If not, see
<http://www.gnu.org/licenses/>. */
#ifndef _INCLUDE_BITS_SETJMP_H
#define _INCLUDE_BITS_SETJMP_H 1
#ifndef __ASSEMBLER__
/* Get the public declarations. */
# include <sysdeps/arm/bits/setjmp.h>
#endif
# ifndef _ISOMAC
/* Register list for a ldm/stm instruction to load/store
the general registers from a __jmp_buf.
The generic ARM definition includes r9 (v6), which is not
permitted under NaCl. We add r3 even though it's call-clobbered,
just to keep the size the same as the generic version. */
#define JMP_BUF_REGLIST {r3, v1-v5, sl, fp}
/* Index of __jmp_buf where the sp register resides. */
#define __JMP_BUF_SP 0
# endif /* _ISOMAC */
#endif /* include/bits/setjmp.h */

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +0,0 @@
# Library=version Earliest symbol set (optional)
# --------------- ------------------------------
ld=ld-nacl-arm.so.1

View File

@ -1 +0,0 @@
#include <sysdeps/nacl/start.c>

View File

@ -1,69 +0,0 @@
/* Assembler macros for ARM/NaCl.
Copyright (C) 2015-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library. If not, see
<http://www.gnu.org/licenses/>. */
#ifndef _ARM_NACL_SYSDEP_H
#define _ARM_NACL_SYSDEP_H 1
#ifdef __ASSEMBLER__
# ifndef NO_THUMB
# define NO_THUMB
# endif
# define ARM_SFI_MACROS 1
/* The compiler driver primes the assembler with a standard set of
macros that includes sfi_breg and sfi_sp. The sfi_pld macro is
redundant with sfi_breg, but libc code uses it so as not to run
afoul of the assembler's parsing bug in versions prior to 2.23.2.
NaCl never uses an assembler that has this bug. */
.macro sfi_pld basereg, offset=#0
sfi_breg \basereg, pld [\basereg, \offset]
.endm
#endif
#include <sysdeps/arm/sysdep.h>
#ifdef __ASSEMBLER__
# undef eabi_fnstart
# define eabi_fnstart
# undef eabi_fnend
# define eabi_fnend
# undef eabi_save
# define eabi_save(...)
# undef eabi_cantunwind
# define eabi_cantunwind
# undef eabi_pad
# define eabi_pad(n)
/* NaCl has its own special way of getting the thread pointer. */
# undef GET_TLS
# define GET_TLS(tmp) ldr r0, [r9]
/* Rather than macroizing the code any more, we can just define a few
mnemonics as macros here. */
# define bl sfi_bl
# define bx sfi_bx
# define blx sfi_blx
# define bxeq sfi_bxeq /* Only condition now in use. */
#endif /* __ASSEMBLER__ */
#endif /* sysdep.h */

View File

@ -1,2 +0,0 @@
#include <sysdeps/arm/nptl/tls.h>
#include <sysdeps/nacl/tls.h>

View File

@ -1,20 +0,0 @@
/* Constant values for the uname function to return. NaCl/ARM version.
Copyright (C) 2015-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#define UNAME_MACHINE "arm"
#include <sysdeps/nacl/uname-values.h>

View File

@ -1,3 +0,0 @@
nptl
posix
gnu

View File

@ -1,145 +0,0 @@
# Makefile fragment for NaCl configurations.
# Copyright (C) 2015-2017 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
# The GNU C Library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
# You should have received a copy of the GNU Lesser General Public
# License along with the GNU C Library; if not, see
# <http://www.gnu.org/licenses/>.
# The libthread_db code does not compile for NaCl because there is no
# sys/procfs.h supplying the register layout types. But since libthread_db
# will probably never be useful for NaCl, just elide the directory rather
# than implementing stuff to make it compile (and never get used).
subdirs := $(filter-out nptl_db,$(subdirs))
sorted-subdirs := $(filter-out nptl_db,$(sorted-subdirs))
# The (required) --with-headers option to configure sets sysheaders to the
# location of the native_client/.. source directory. We'll get necessary
# headers directly from there.
naclsrc = $(sysheaders)/native_client/src
# How to find the directory containing this Makefile.
nacl = $(..)sysdeps/nacl
# Generate our bits/errno.h with the numbers from NaCl's sys/errno.h file.
nacl-errno = $(naclsrc)/trusted/service_runtime/include/sys/errno.h
bits-errno = $(common-objpfx)bits/errno.h
$(bits-errno): $(common-objpfx)stamp-errnos ;
$(common-objpfx)stamp-errnos: $(nacl)/errnos.awk $(..)manual/errno.texi \
$(nacl-errno)
$(make-target-directory)
$(AWK) -f $^ > $(bits-errno)-tmp
# Make it unwritable so noone will edit it by mistake.
-chmod a-w $(bits-errno)-tmp
$(move-if-change) $(bits-errno)-tmp $(bits-errno)
touch $@
common-generated += stamp-errnos bits/errno.h
before-compile += $(bits-errno)
# Massage NaCl's irt.h (and irt_dev.h) into something we can use.
# See irt.sed for details.
nacl-irt.h = $(common-objpfx)nacl-irt.h
$(nacl-irt.h): $(nacl)/irt.sed \
$(naclsrc)/untrusted/irt/irt.h \
$(naclsrc)/untrusted/irt/irt_dev.h
sed -f $^ > $@.new
mv -f $@.new $@
common-generated += nacl-irt.h
before-compile += $(nacl-irt.h)
$(common-objpfx)nacl-interfaces.v.i: $(nacl)/nacl-interfaces.mk.in \
$(nacl)/nacl-interface-list.h
-include $(common-objpfx)nacl-interfaces.v
common-generated += nacl-interfaces.v
before-compile += $(common-objpfx)nacl-interfaces.v
nacl-all-interfaces = $(nacl-mandatory-interfaces) $(nacl-optional-interfaces)
nacl-interface-routines = $(nacl-all-interfaces:%=nacl-interface-%)
define nacl-interface-table-command
(echo '#define INTERFACE_CATEGORY $1'; \
echo '#define INTERFACE_MODULE $(firstword $(subst -, ,$*))'; \
echo '#define INTERFACE_TYPE $(word 2,$(subst -, ,$*))'; \
echo '#define INTERFACE_STRING $(nacl-$*-string)'; \
echo '#include "nacl-interface-table.c"' \
) > $@T
mv -f $@T $@
endef
nacl-interface-pattern = $(objpfx)nacl-interface-%.c
$(nacl-mandatory-interfaces:%=$(nacl-interface-pattern)): \
$(nacl-interface-pattern): $(nacl)/Makefile $(common-objpfx)nacl-interfaces.v
$(make-target-directory)
$(call nacl-interface-table-command,mandatory)
$(nacl-optional-interfaces:%=$(nacl-interface-pattern)): \
$(nacl-interface-pattern): $(nacl)/Makefile $(common-objpfx)nacl-interfaces.v
$(make-target-directory)
$(call nacl-interface-table-command,optional)
nacl-routines-of = $(filter nacl-interface-$1-%,$(nacl-interface-routines))
# Run the NaCl code validator on binaries after we link them, so the
# build does not succeed with any binary that won't pass validation.
# Moving the file around makes sure that we don't leave a target
# appearing complete after it fails validation.
define after-link
mv -f $1 $1.prevalidation
$(nacl)/nacl-after-link.sh '${READELF}' $1.prevalidation
mv -f $1.prevalidation $1
endef
# The test wrapper script takes care of running things under NaCl's sel_ldr.
test-wrapper-env-only = $(nacl)/nacl-test-wrapper.sh --arch=$(nacl-sdk-arch)
test-wrapper-env = $(test-wrapper-env-only)
test-wrapper = $(test-wrapper-env) --
ifeq ($(subdir),csu)
sysdep_routines += nacl_interface_query nacl_interface_ext_supply \
nacl-interfaces $(call nacl-routines-of,libc)
endif
ifeq ($(subdir),elf)
sysdep-dl-routines += $(call nacl-routines-of,rtld)
sysdep-rtld-routines += nacl-interfaces $(call nacl-routines-of,rtld)
endif
ifeq ($(subdir),io)
sysdep_routines += xstatconv
endif
ifeq ($(subdir),nptl)
# We do not need any wrappers in libpthread.
libpthread-routines := \
$(filter-out $(pthread-compat-wrappers),$(libpthread-routines))
endif
ifeq ($(subdir),misc)
# We reuse the Linux file since the bits match. The file lives in the
# top-level source tree so we can use it without reference to any
# sysdeps/.../linux/ directories, but it's still a sysdeps decision to
# install it.
sysdep_headers += bits/mman-linux.h
# This defeats sysdeps/gnu/Makefile's addition of sys/mtio.h, which
# we do not want. This is a total kludge, but it seems no worse for
# now than making the sysdeps/gnu/Makefile code conditional on a
# variable we set here. If some sysdeps/.../Makefile that is later
# in the list than sysdeps/gnu needed to add to sysdep_headers, this
# would break it. But sysdeps/gnu is close to last in the list and
# this coming up seems unlikely.
override sysdep_headers := $(sysdep_headers)
endif

View File

@ -1,3 +0,0 @@
inet
resolv
nss

View File

@ -1,23 +0,0 @@
ld {
GLIBC_PRIVATE {
__nacl_irt_*;
__nacl_supply_interface_rtld;
}
}
libc {
GLIBC_2.22 {
nacl_interface_query;
nacl_interface_ext_supply;
}
GLIBC_PRIVATE {
# These are used by libpthread.
__libc_write;
__libc_open;
__libc_close;
__libc_fork;
__nacl_irt_*;
}
}

View File

@ -1,35 +0,0 @@
/* _exit -- low-level program termination. NaCl version.
Copyright (C) 2015-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#include <unistd.h>
#include <stdlib.h>
#include <nacl-interfaces.h>
void
_exit (int status)
{
__nacl_irt_basic.exit (status);
/* That never returns unless something is severely and unrecoverably wrong.
If it ever does, try to make sure we crash. */
while (1)
__builtin_trap ();
}
libc_hidden_def (_exit)
rtld_hidden_def (_exit)
weak_alias (_exit, _Exit)

View File

@ -1,35 +0,0 @@
/* Check file access permission. NaCl version.
Copyright (C) 2015-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#include <unistd.h>
#include <nacl-interfaces.h>
/* Test for access to FILE without setting errno. */
int
__access_noerrno (const char *file, int type)
{
return NACL_CALL_NOERRNO (__nacl_irt_dev_filename.access (file, type), 0);
}
/* Test for access to FILE. */
int
__access (const char *file, int type)
{
return NACL_CALL (__nacl_irt_dev_filename.access (file, type), 0);
}
weak_alias (__access, access)

View File

@ -1 +0,0 @@
#include <sysdeps/x86_64/backtrace.c>

View File

@ -1,52 +0,0 @@
/* Directory entry structure `struct dirent'. NaCl version.
Copyright (C) 2015-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#ifndef _DIRENT_H
# error "Never use <bits/dirent.h> directly; include <dirent.h> instead."
#endif
/* Note that __ino_t and __ino64_t are the same type.
Likewise __off_t and __off64_t are the same type. */
struct dirent
{
__ino_t d_ino; /* File serial number. */
__off_t d_off; /* File position of this entry. */
unsigned short int d_reclen; /* Length of the whole `struct dirent'. */
/* Only this member is in the POSIX standard. */
char d_name[256]; /* We must not include limits.h! */
};
#ifdef __USE_LARGEFILE64
/* This is completely identical to `struct dirent'. */
struct dirent64
{
__ino_t d_ino; /* File serial number. */
__off_t d_off; /* File position of this entry. */
unsigned short int d_reclen; /* Length of the whole `struct dirent'. */
/* Only this member is in the POSIX standard. */
char d_name[256]; /* We must not include limits.h! */
};
#endif
#define d_fileno d_ino /* Backwards compatibility. */
#define _DIRENT_HAVE_D_RECLEN 1
#define _DIRENT_MATCHES_DIRENT64 1

View File

@ -1,145 +0,0 @@
/* O_*, F_*, FD_* bit values. NaCl version.
Copyright (C) 2015-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#ifndef _FCNTL_H
#error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
#endif
/* File access modes for `open' and `fcntl'. */
#define O_RDONLY 0 /* Open read-only. */
#define O_WRONLY 1 /* Open write-only. */
#define O_RDWR 2 /* Open read/write. */
/* Bits OR'd into the second argument to open. */
#define O_CREAT 00100 /* Create file if it doesn't exist. */
#define O_EXCL 00200 /* Fail if file already exists. */
#define O_TRUNC 01000 /* Truncate file to zero length. */
#define O_NOCTTY 0 /* Don't assign a controlling terminal. */
#define O_ASYNC 020000 /* Send SIGIO to owner when data is ready. */
#define O_FSYNC 010000 /* Synchronous writes. */
#define O_SYNC O_FSYNC
#ifdef __USE_XOPEN2K8
# define O_DIRECTORY 00200000 /* Must be a directory. */
# define O_NOFOLLOW 00400000 /* Do not follow links. */
# define O_CLOEXEC 02000000 /* Set close_on_exec. */
#endif
#if defined __USE_POSIX199309 || defined __USE_UNIX98
# define O_DSYNC O_SYNC /* Synchronize data. */
# define O_RSYNC O_SYNC /* Synchronize read operations. */
#endif
/* All opens support large file sizes, so there is no flag bit for this. */
#ifdef __USE_LARGEFILE64
# define O_LARGEFILE 0
#endif
/* File status flags for `open' and `fcntl'. */
#define O_APPEND 02000 /* Writes append to the file. */
#define O_NONBLOCK 04000 /* Non-blocking I/O. */
#ifdef __USE_MISC
# define O_NDELAY O_NONBLOCK
#endif
#ifdef __USE_MISC
/* Bits in the file status flags returned by F_GETFL.
These are all the O_* flags, plus FREAD and FWRITE, which are
independent bits set by which of O_RDONLY, O_WRONLY, and O_RDWR, was
given to `open'. */
# define FREAD 1
# define FWRITE 2
/* Traditional BSD names the O_* bits. */
# define FASYNC O_ASYNC
# define FFSYNC O_FSYNC
# define FSYNC O_SYNC
# define FAPPEND O_APPEND
# define FNDELAY O_NDELAY
#endif
/* Mask for file access modes. This is system-dependent in case
some system ever wants to define some other flavor of access. */
#define O_ACCMODE (O_RDONLY|O_WRONLY|O_RDWR)
/* Values for the second argument to `fcntl'. */
#define F_DUPFD 0 /* Duplicate file descriptor. */
#define F_GETFD 1 /* Get file descriptor flags. */
#define F_SETFD 2 /* Set file descriptor flags. */
#define F_GETFL 3 /* Get file status flags. */
#define F_SETFL 4 /* Set file status flags. */
#if defined __USE_UNIX98 || defined __USE_XOPEN2K8
#define F_GETOWN 5 /* Get owner (receiver of SIGIO). */
#define F_SETOWN 6 /* Set owner (receiver of SIGIO). */
#endif
#define F_GETLK 7 /* Get record locking info. */
#define F_SETLK 8 /* Set record locking info (non-blocking). */
#define F_SETLKW 9 /* Set record locking info (blocking). */
/* Not necessary, we always have 64-bit offsets. */
#define F_GETLK64 F_GETLK /* Get record locking info. */
#define F_SETLK64 F_SETLK /* Set record locking info (non-blocking). */
#define F_SETLKW64 F_SETLKW/* Set record locking info (blocking). */
#ifdef __USE_XOPEN2K8
# define F_DUPFD_CLOEXEC 12 /* Duplicate file descriptor with
close-on-exec set. */
#endif
/* File descriptor flags used with F_GETFD and F_SETFD. */
#define FD_CLOEXEC 1 /* Close on exec. */
#include <bits/types.h>
/* The structure describing an advisory lock. This is the type of the third
argument to `fcntl' for the F_GETLK, F_SETLK, and F_SETLKW requests. */
struct flock
{
short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
__off_t l_start; /* Offset where the lock begins. */
__off_t l_len; /* Size of the locked area; zero means until EOF. */
__pid_t l_pid; /* Process holding the lock. */
};
#ifdef __USE_LARGEFILE64
/* Note this matches struct flock exactly. */
struct flock64
{
short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
__off_t l_start; /* Offset where the lock begins. */
__off_t l_len; /* Size of the locked area; zero means until EOF. */
__pid_t l_pid; /* Process holding the lock. */
};
#endif
/* Values for the `l_type' field of a `struct flock'. */
#define F_RDLCK 1 /* Read lock. */
#define F_WRLCK 2 /* Write lock. */
#define F_UNLCK 3 /* Remove lock. */
/* Advice to `posix_fadvise'. */
#ifdef __USE_XOPEN2K
# define POSIX_FADV_NORMAL 0 /* No further special treatment. */
# define POSIX_FADV_RANDOM 1 /* Expect random page references. */
# define POSIX_FADV_SEQUENTIAL 2 /* Expect sequential page references. */
# define POSIX_FADV_WILLNEED 3 /* Will need these pages. */
# define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */
# define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */
#endif

View File

@ -1,64 +0,0 @@
/* Minimum guaranteed maximum values for system limits. NaCl version.
Copyright (C) 2015-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation; either version 2.1 of the
License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library. If not, see
<http://www.gnu.org/licenses/>. */
#define NAME_MAX 255
#define PATH_MAX 4096
#define NGROUPS_MAX 65536
/* The number of data keys per process. */
#define _POSIX_THREAD_KEYS_MAX 128
/* This is the value this implementation supports. */
#define PTHREAD_KEYS_MAX 1024
/* Controlling the iterations of destructors for thread-specific data. */
#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
/* Number of iterations this implementation does. */
#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS
/* The number of threads per process. */
#define _POSIX_THREAD_THREADS_MAX 64
/* We have no predefined limit on the number of threads. */
#undef PTHREAD_THREADS_MAX
/* Maximum amount by which a process can descrease its asynchronous I/O
priority level. */
#define AIO_PRIO_DELTA_MAX 20
/* Minimum size for a thread. We are free to choose a reasonable value. */
#define PTHREAD_STACK_MIN 131072
/* Maximum number of timer expiration overruns. */
#define DELAYTIMER_MAX 2147483647
/* Maximum tty name length. */
#define TTY_NAME_MAX 32
/* Maximum login name length. This is arbitrary. */
#define LOGIN_NAME_MAX 256
/* Maximum host name length. */
#define HOST_NAME_MAX 64
/* Maximum message queue priority level. */
#define MQ_PRIO_MAX 32768
/* Maximum value the semaphore can have. */
#define SEM_VALUE_MAX (2147483647)

View File

@ -1,24 +0,0 @@
/* Definitions for POSIX memory map interface. NaCl version.
Copyright (C) 2015-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#ifndef _SYS_MMAN_H
# error "Never use <bits/mman.h> directly; include <sys/mman.h> instead."
#endif
/* NaCl uses the Linux bits for this. */
#include <bits/mman-linux.h>

View File

@ -1,23 +0,0 @@
/* Old-style Unix parameters and limits. NaCl version.
Copyright (C) 2012-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#ifndef _SYS_PARAM_H
# error "Never use <bits/param.h> directly; include <sys/param.h> instead."
#endif
#define EXEC_PAGESIZE 0x10000

View File

@ -1,210 +0,0 @@
/* Define POSIX options for NaCl.
Copyright (C) 2015-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation; either version 2.1 of the
License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, see <http://www.gnu.org/licenses/>. */
#ifndef _BITS_POSIX_OPT_H
#define _BITS_POSIX_OPT_H 1
/* Job control is supported. (Not really, but the APIs exist.) */
#define _POSIX_JOB_CONTROL 1
/* Processes have a saved set-user-ID and a saved set-group-ID. */
#define _POSIX_SAVED_IDS 1
/* Priority scheduling is supported. ??? */
#define _POSIX_PRIORITY_SCHEDULING 200809L
/* Synchronizing file data is supported. ??? */
#define _POSIX_SYNCHRONIZED_IO 200809L
/* The fsync function is present. */
#define _POSIX_FSYNC 200809L
/* Mapping of files to memory is supported. */
#define _POSIX_MAPPED_FILES 200809L
/* Locking of all memory is not supported. */
#define _POSIX_MEMLOCK -1
/* Locking of ranges of memory is not supported. */
#define _POSIX_MEMLOCK_RANGE -1
/* Setting of memory protections is supported. */
#define _POSIX_MEMORY_PROTECTION 200809L
/* Some filesystems allow all users to change file ownership. */
#define _POSIX_CHOWN_RESTRICTED 0
/* `c_cc' member of 'struct termios' structure can be disabled by
using the value _POSIX_VDISABLE. ??? */
#define _POSIX_VDISABLE '\0'
/* Filenames are not silently truncated. */
#define _POSIX_NO_TRUNC 1
/* X/Open realtime support is not fully available. This requires the
following set of POSIX.1 features, not all of which NaCl supports:
_POSIX_FSYNC
_POSIX_MEMLOCK
_POSIX_MEMLOCK_RANGE
_POSIX_MESSAGE_PASSING
_POSIX_PRIORITIZED_IO
_POSIX_PRIORITY_SCHEDULING
_POSIX_SHARED_MEMORY_OBJECTS
_POSIX_SYNCHRONIZED_IO
*/
#define _XOPEN_REALTIME -1
/* X/Open thread realtime support is not available. This requires the
following set of POSIX.1 features, none of which NaCl supports:
_POSIX_THREAD_PRIO_INHERIT
_POSIX_THREAD_PRIO_PROTECT
_POSIX_THREAD_PRIORITY_SCHEDULING
_POSIX_THREAD_ROBUST_PRIO_INHERIT
_POSIX_THREAD_ROBUST_PRIO_PROTECT
*/
#define _XOPEN_REALTIME_THREADS -1
/* XPG4.2 shared memory is not supported.
??? What is this? shm* interfaces?
*/
#define _XOPEN_SHM -1
/* POSIX threads are supported. */
#define _POSIX_THREADS 200809L
/* We have the reentrant functions described in POSIX. */
#define _POSIX_REENTRANT_FUNCTIONS 1
#define _POSIX_THREAD_SAFE_FUNCTIONS 200809L
/* We do not provide priority scheduling for threads. */
#define _POSIX_THREAD_PRIORITY_SCHEDULING -1
/* We support user-defined stack sizes. */
#define _POSIX_THREAD_ATTR_STACKSIZE 200809L
/* We support user-defined stacks. */
#define _POSIX_THREAD_ATTR_STACKADDR 200809L
/* We do not support priority inheritence. */
#define _POSIX_THREAD_PRIO_INHERIT -1
/* We do not support priority protection. */
#define _POSIX_THREAD_PRIO_PROTECT -1
#ifdef __USE_XOPEN2K8
/* We do not support priority inheritence for robust mutexes. */
# define _POSIX_THREAD_ROBUST_PRIO_INHERIT -1
/* We do not support priority protection for robust mutexes. */
# define _POSIX_THREAD_ROBUST_PRIO_PROTECT -1
#endif
/* We support POSIX.1b semaphores. */
#define _POSIX_SEMAPHORES 200809L
/* Real-time signals are supported. ??? */
#define _POSIX_REALTIME_SIGNALS 200809L
/* We support asynchronous I/O. */
#define _POSIX_ASYNCHRONOUS_IO 200809L
#define _POSIX_ASYNC_IO 1
/* Alternative name for Unix98. */
#define _LFS_ASYNCHRONOUS_IO 1
/* Support for prioritization is not available. */
#define _POSIX_PRIORITIZED_IO -1
/* The LFS support in asynchronous I/O is also available. */
#define _LFS64_ASYNCHRONOUS_IO 1
/* The rest of the LFS is also available. */
#define _LFS_LARGEFILE 1
#define _LFS64_LARGEFILE 1
#define _LFS64_STDIO 1
/* POSIX shared memory objects are implemented. */
#define _POSIX_SHARED_MEMORY_OBJECTS 200809L
/* Process CPU-time clocks are not supported. */
#define _POSIX_CPUTIME -1
/* Thread CPU-time locks are supported. */
#define _POSIX_THREAD_CPUTIME 200809L
/* GNU libc provides regular expression handling. */
#define _POSIX_REGEXP 1
/* Reader/Writer locks are available. */
#define _POSIX_READER_WRITER_LOCKS 200809L
/* We have a POSIX shell. */
#define _POSIX_SHELL 1
/* We support the Timeouts option. */
#define _POSIX_TIMEOUTS 200809L
/* We support spinlocks. */
#define _POSIX_SPIN_LOCKS 200809L
/* The `spawn' function family is supported. */
#define _POSIX_SPAWN 200809L
/* We have POSIX timers. */
#define _POSIX_TIMERS 200809L
/* The barrier functions are available. */
#define _POSIX_BARRIERS 200809L
/* POSIX message queues are not available. */
#define _POSIX_MESSAGE_PASSING -1
/* Thread process-shared synchronization is not supported. */
#define _POSIX_THREAD_PROCESS_SHARED -1
/* The monotonic clock is available. */
#define _POSIX_MONOTONIC_CLOCK 200809L
/* The clock selection interfaces are available. ??? Actually only
clock_nanosleep works, and pthread_condattr_setclock does not. */
#define _POSIX_CLOCK_SELECTION 200809L
/* Advisory information interfaces are available. */
#define _POSIX_ADVISORY_INFO 200809L
/* IPv6 support is available. */
#define _POSIX_IPV6 200809L
/* Raw socket support is available. */
#define _POSIX_RAW_SOCKETS 200809L
/* We have at least one terminal. */
#define _POSIX2_CHAR_TERM 200809L
/* Neither process nor thread sporadic server interfaces is available. */
#define _POSIX_SPORADIC_SERVER -1
#define _POSIX_THREAD_SPORADIC_SERVER -1
/* trace.h is not available. */
#define _POSIX_TRACE -1
#define _POSIX_TRACE_EVENT_FILTER -1
#define _POSIX_TRACE_INHERIT -1
#define _POSIX_TRACE_LOG -1
/* Typed memory objects are not available. */
#define _POSIX_TYPED_MEMORY_OBJECTS -1
#endif /* bits/posix_opt.h */

View File

@ -1,147 +0,0 @@
/* 'struct stat' and related definitions. NaCl version.
Copyright (C) 2015-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#if !defined _SYS_STAT_H && !defined _FCNTL_H
# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
#endif
#ifndef _BITS_STAT_H
#define _BITS_STAT_H 1
/* Versions of the `struct stat' data structure. */
#define _STAT_VER_NACL 0
#define _STAT_VER_LINUX 1
#define _STAT_VER _STAT_VER_LINUX
struct stat
{
__dev_t st_dev; /* Device. */
__ino_t st_ino; /* File serial number. */
__nlink_t st_nlink; /* Link count. */
__mode_t st_mode; /* File mode. */
__uid_t st_uid; /* User ID of the file's owner. */
__gid_t st_gid; /* Group ID of the file's group.*/
int __pad0;
__dev_t st_rdev; /* Device number, if device. */
__off_t st_size; /* Size of file, in bytes. */
__blksize_t st_blksize; /* Optimal block size for I/O. */
__blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */
#if defined __USE_XOPEN2K8
/* Nanosecond resolution timestamps are stored in a format
equivalent to 'struct timespec'. This is the type used
whenever possible but the Unix namespace rules do not allow the
identifier 'timespec' to appear in the <sys/stat.h> header.
Therefore we have to handle the use of this header in strictly
standard-compliant sources special. */
struct timespec st_atim; /* Time of last access. */
struct timespec st_mtim; /* Time of last modification. */
struct timespec st_ctim; /* Time of last status change. */
# define st_atime st_atim.tv_sec /* Backward compatibility. */
# define st_mtime st_mtim.tv_sec
# define st_ctime st_ctim.tv_sec
#else
__time_t st_atime; /* Time of last access. */
__uint64_t st_atimensec; /* Nsecs of last access. */
__time_t st_mtime; /* Time of last modification. */
__uint64_t st_mtimensec; /* Nsecs of last modification. */
__time_t st_ctime; /* Time of last status change. */
__uint64_t st_ctimensec; /* Nsecs of last status change. */
#endif
__int64_t __unused[3];
};
#ifdef __USE_LARGEFILE64
/* Note stat64 has the same shape as stat for NaCl. */
struct stat64
{
__dev_t st_dev; /* Device. */
__ino_t st_ino; /* File serial number. */
__nlink_t st_nlink; /* Link count. */
__mode_t st_mode; /* File mode. */
__uid_t st_uid; /* User ID of the file's owner. */
__gid_t st_gid; /* Group ID of the file's group.*/
int __pad0;
__dev_t st_rdev; /* Device number, if device. */
__off_t st_size; /* Size of file, in bytes. */
__blksize_t st_blksize; /* Optimal block size for I/O. */
__blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */
# if defined __USE_XOPEN2K8
/* Nanosecond resolution timestamps are stored in a format
equivalent to 'struct timespec'. This is the type used
whenever possible but the Unix namespace rules do not allow the
identifier 'timespec' to appear in the <sys/stat.h> header.
Therefore we have to handle the use of this header in strictly
standard-compliant sources special. */
struct timespec st_atim; /* Time of last access. */
struct timespec st_mtim; /* Time of last modification. */
struct timespec st_ctim; /* Time of last status change. */
# define st_atime st_atim.tv_sec /* Backward compatibility. */
# define st_mtime st_mtim.tv_sec
# define st_ctime st_ctim.tv_sec
# else
__time_t st_atime; /* Time of last access. */
__uint64_t st_atimensec; /* Nsecs of last access. */
__time_t st_mtime; /* Time of last modification. */
__uint64_t st_mtimensec; /* Nsecs of last modification. */
__time_t st_ctime; /* Time of last status change. */
__uint64_t st_ctimensec; /* Nsecs of last status change. */
# endif
__int64_t __unused[3];
};
#endif
/* Tell code we have these members. */
#define _STATBUF_ST_BLKSIZE 1
#define _STATBUF_ST_RDEV 1
/* Nanosecond resolution time values are supported. */
#define _STATBUF_ST_NSEC 1
/* Encoding of the file mode. */
#define __S_IFMT 0170000 /* These bits determine file type. */
/* File types. */
#define __S_IFDIR 0040000 /* Directory. */
#define __S_IFCHR 0020000 /* Character device. */
#define __S_IFBLK 0060000 /* Block device. */
#define __S_IFREG 0100000 /* Regular file. */
#define __S_IFIFO 0010000 /* FIFO. */
#define __S_IFLNK 0120000 /* Symbolic link. */
#define __S_IFSOCK 0140000 /* Socket. */
/* POSIX.1b objects. Note that these macros always evaluate to zero. But
they do it by enforcing the correct use of the macros. */
#define __S_TYPEISMQ(buf) ((buf)->st_mode - (buf)->st_mode)
#define __S_TYPEISSEM(buf) ((buf)->st_mode - (buf)->st_mode)
#define __S_TYPEISSHM(buf) ((buf)->st_mode - (buf)->st_mode)
/* Protection bits. */
#define __S_ISUID 04000 /* Set user ID on execution. */
#define __S_ISGID 02000 /* Set group ID on execution. */
#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */
#define __S_IREAD 0400 /* Read by owner. */
#define __S_IWRITE 0200 /* Write by owner. */
#define __S_IEXEC 0100 /* Execute by owner. */
#ifdef __USE_ATFILE
/* XXX missing: UTIME_NOW, UTIME_OMIT */
#endif
#endif /* bits/stat.h */

View File

@ -1,72 +0,0 @@
/* bits/typesizes.h -- underlying types for *_t. NaCl version.
Copyright (C) 2015-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#ifndef _BITS_TYPES_H
# error "Never include <bits/typesizes.h> directly; use <sys/types.h> instead."
#endif
#ifndef _BITS_TYPESIZES_H
#define _BITS_TYPESIZES_H 1
/* See <bits/types.h> for the meaning of these macros. This file exists so
that <bits/types.h> need not vary across different GNU platforms. */
#define __DEV_T_TYPE __UQUAD_TYPE
#define __UID_T_TYPE __U32_TYPE
#define __GID_T_TYPE __U32_TYPE
#define __INO_T_TYPE __UQUAD_TYPE
#define __INO64_T_TYPE __INO_T_TYPE
#define __MODE_T_TYPE __U32_TYPE
#define __NLINK_T_TYPE __UWORD_TYPE
#define __OFF_T_TYPE __SQUAD_TYPE
#define __OFF64_T_TYPE __OFF_T_TYPE
#define __PID_T_TYPE __S32_TYPE
#define __RLIM_T_TYPE __UQUAD_TYPE
#define __RLIM64_T_TYPE __RLIM_T_TYPE
#define __BLKCNT_T_TYPE __SQUAD_TYPE
#define __BLKCNT64_T_TYPE __BLKCNT_T_TYPE
#define __FSBLKCNT_T_TYPE __UQUAD_TYPE
#define __FSBLKCNT64_T_TYPE __FSBLKCNT_T_TYPE
#define __FSFILCNT_T_TYPE __UQUAD_TYPE
#define __FSFILCNT64_T_TYPE __FSFILCNT_T_TYPE
#define __FSWORD_T_TYPE __SWORD_TYPE
#define __ID_T_TYPE __U32_TYPE
#define __CLOCK_T_TYPE __SLONGWORD_TYPE
#define __TIME_T_TYPE __SQUAD_TYPE
#define __USECONDS_T_TYPE __U32_TYPE
#define __SUSECONDS_T_TYPE __SLONGWORD_TYPE
#define __DADDR_T_TYPE __S32_TYPE
#define __KEY_T_TYPE __S32_TYPE
#define __CLOCKID_T_TYPE __S32_TYPE
#define __TIMER_T_TYPE void *
#define __BLKSIZE_T_TYPE __SLONGWORD_TYPE
#define __FSID_T_TYPE struct { int __val[2]; }
#define __SSIZE_T_TYPE __SWORD_TYPE
#define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE
#define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE
#define __CPU_MASK_TYPE __ULONGWORD_TYPE
/* All our foo64_t types match their foo_t counterparts. */
#define __OFF_T_MATCHES_OFF64_T 1
#define __INO_T_MATCHES_INO64_T 1
/* Number of descriptors that can fit in an `fd_set'. */
#define __FD_SETSIZE 1024
#endif /* bits/typesizes.h */

View File

@ -1,92 +0,0 @@
/* brk -- Adjust the "break" at the end of initial data. NaCl version.
Copyright (C) 2015-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#include <errno.h>
#include <stdint.h>
#include <sys/mman.h>
#include <sys/param.h>
#include <unistd.h>
/* sbrk.c expects this. */
void *__curbrk;
static uintptr_t
page_above (void *addr)
{
return ALIGN_UP ((uintptr_t) addr, EXEC_PAGESIZE);
}
/* Set the end of the process's data space to ADDR.
Return 0 if successful, -1 if not. */
int
__brk (void *addr)
{
/* The NaCl sysbrk call is deprecated, so we do not use it here. Other
libc code expects that __sbrk can be used at least a little bit, so
rather than a plain stub we have a minimal __brk implementation here.
It just uses mmap/munmap to grow or shrink the break area, punting as
soon as mmap fails to use the same contiguous area. */
if (__glibc_unlikely (__curbrk == NULL))
{
/* This is the first call. We must initialize the record
of the current position. It starts out at the end of the
main program's data segment. */
/* XXX dynamic case??? */
extern char _end[];
__curbrk = _end;
}
if (__glibc_unlikely (addr == NULL))
/* This is a call just to ensure that __curbrk is set up. */
return 0;
uintptr_t old_limit = page_above (__curbrk);
uintptr_t new_limit = page_above (addr);
if (old_limit > new_limit)
{
/* We're shrinking the old heap enough to release some pages. */
if (__munmap ((void *) new_limit, old_limit - new_limit) != 0)
return -1;
}
else if (old_limit < new_limit)
{
/* We're growing the old heap enough to need some more pages.
See if they are available. */
void *new_space = __mmap ((void *) old_limit, new_limit - old_limit,
PROT_READ | PROT_WRITE, MAP_ANON, -1, 0);
if (new_space != (void *) old_limit)
{
if (new_space != MAP_FAILED)
{
/* mmap chose some different place for the pages
because the contiguous area was not available.
Oh well. We can't use that. */
__munmap (new_space, new_limit - old_limit);
__set_errno (ENOMEM);
}
return -1;
}
}
__curbrk = addr;
return 0;
}
weak_alias (__brk, brk)

View File

@ -1,28 +0,0 @@
/* Change current working directory. NaCl version.
Copyright (C) 2015-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#include <unistd.h>
#include <nacl-interfaces.h>
/* Change the current directory to PATH. */
int
__chdir (const char *path)
{
return NACL_CALL (__nacl_irt_dev_filename.chdir (path), 0);
}
weak_alias (__chdir, chdir)

View File

@ -1,23 +0,0 @@
/* Check inherited file descriptors for sanity at startup. NaCl version.
Copyright (C) 2015-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
/* Nothing to do here. */
void
__libc_check_standard_fds (void)
{
}

View File

@ -1,28 +0,0 @@
/* Change a file's permissions. NaCl version.
Copyright (C) 2015-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#include <unistd.h>
#include <nacl-interfaces.h>
/* Change the protections of FILE to MODE. */
int
__chmod (const char *file, mode_t mode)
{
return NACL_CALL (__nacl_irt_dev_filename.chmod (file, mode), 0);
}
weak_alias (__chmod, chmod)

View File

@ -1,29 +0,0 @@
/* Return the time used by the program so far. NaCl version.
Copyright (C) 2015-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#include <time.h>
#include <nacl-interfaces.h>
/* Return the time used by the program so far (user time + system time). */
clock_t
clock (void)
{
nacl_irt_clock_t result;
return NACL_CALL (__nacl_irt_basic.clock (&result), result);
}

View File

@ -1,28 +0,0 @@
/* Get the resolution of a clock. NaCl version.
Copyright (C) 2015-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#include <time.h>
#include <nacl-interfaces.h>
/* Get resolution of clock. */
int
__clock_getres (clockid_t clock_id, struct timespec *res)
{
return NACL_CALL (__nacl_irt_clock.clock_getres (clock_id, res), 0);
}
weak_alias (__clock_getres, clock_getres)

View File

@ -1,29 +0,0 @@
/* Get the current value of a clock. NaCl version.
Copyright (C) 2015-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#include <time.h>
#include <nacl-interfaces.h>
/* Get current value of CLOCK and store it in TP. */
int
__clock_gettime (clockid_t clock_id, struct timespec *tp)
{
return NACL_CALL (__nacl_irt_clock.clock_gettime (clock_id, tp), 0);
}
libc_hidden_def (__clock_gettime)
weak_alias (__clock_gettime, clock_gettime)

View File

@ -1,31 +0,0 @@
/* Close a file descriptor. NaCl version.
Copyright (C) 2015-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#include <unistd.h>
#include <nacl-interfaces.h>
/* Close the file descriptor FD. */
int
__close (int fd)
{
return NACL_CALL (__nacl_irt_fdio.close (fd), 0);
}
libc_hidden_def (__close)
strong_alias (__close, __libc_close)
weak_alias (__close, close)

View File

@ -1,18 +0,0 @@
# This file is generated from configure.ac by Autoconf. DO NOT EDIT!
# Local configure fragment for sysdeps/nacl.
nacl_probe_file=native_client/src/trusted/service_runtime/include/sys/errno.h
# sysheaders is set by the --with-headers=... option to configure.
# For NaCl, we require that the option be given and point to the
# native_client/.. source tree directory.
test -n "$sysheaders" || {
as_fn_error $? "must supply --with-headers=DIR with native_client source tree" "$LINENO" 5
}
test -r "$sysheaders/$nacl_probe_file" || {
as_fn_error $? "$sysheaders does not appear to be a native_client source tree" "$LINENO" 5
}
# nscd is extremely useless in the NaCl context.
build_nscd=no
use_nscd=no

View File

@ -1,18 +0,0 @@
GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
# Local configure fragment for sysdeps/nacl.
nacl_probe_file=native_client/src/trusted/service_runtime/include/sys/errno.h
# sysheaders is set by the --with-headers=... option to configure.
# For NaCl, we require that the option be given and point to the
# native_client/.. source tree directory.
test -n "$sysheaders" || {
AC_MSG_ERROR([must supply --with-headers=DIR with native_client source tree])
}
test -r "$sysheaders/$nacl_probe_file" || {
AC_MSG_ERROR([$sysheaders does not appear to be a native_client source tree])
}
# nscd is extremely useless in the NaCl context.
build_nscd=no
use_nscd=no

View File

@ -1,47 +0,0 @@
/* Low-level thread creation for NPTL. NaCl version.
Copyright (C) 2015-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#include <nacl-interfaces.h>
#include <pthread-pids.h>
/* See the comments in pthread_create.c for the requirements for these
two macros and the create_thread function. */
#define START_THREAD_DEFN \
static void __attribute__ ((noreturn)) start_thread (void)
#define START_THREAD_SELF THREAD_SELF
/* pthread_create.c defines this using START_THREAD_DEFN
We need a forward declaration here so we can take its address. */
static void start_thread (void) __attribute__ ((noreturn));
static int
create_thread (struct pthread *pd, const struct pthread_attr *attr,
bool *stopped_start, STACK_VARIABLES_PARMS, bool *thread_ran)
{
pd->tid = __nacl_get_tid (pd);
pd->stopped_start = *stopped_start;
if (__glibc_unlikely (*stopped_start))
/* See CONCURRENCY NOTES in nptl/pthread_create.c. */
lll_lock (pd->lock, LLL_PRIVATE);
TLS_DEFINE_INIT_TP (tp, pd);
return __nacl_irt_thread.thread_create (&start_thread, stackaddr, tp);
}

View File

@ -1,8 +0,0 @@
/* Bypass sysdeps/posix/dl-fileid.h, which relies on st_dev/st_ino being
reliable. Under NaCl, we cannot always expect them to be useful.
Fortunately, in the ways NaCl is used it's far less likely that two
different names for the same file would be used in dlopen or the like,
so failing to notice re-opening the same file is not so likely to be a
problem in practice. */
#include <sysdeps/generic/dl-fileid.h>

View File

@ -1,269 +0,0 @@
/* Map in a shared object's segments. NaCl version.
Copyright (C) 2015-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#ifndef _NACL_DL_MAP_SEGMENTS_H
#define _NACL_DL_MAP_SEGMENTS_H 1
#include <assert.h>
#include <dl-load.h>
#include <errno.h>
#include <stdbool.h>
#include <unistd.h>
#include <libc-pointer-arith.h>
/* This is basically pread, but with iteration after short reads. */
static bool
read_in_data (int fd, void *data, size_t len, off_t pos)
{
if (__glibc_unlikely (__lseek (fd, pos, SEEK_SET) == (off_t) -1))
return true;
while (len > 0)
{
ssize_t n = __read (fd, data, len);
if (__glibc_unlikely (n < 0))
return true;
if (__glibc_unlikely (n == 0))
{
errno = EFTYPE;
return true;
}
data += n;
len -= n;
}
return false;
}
static const char *
_dl_map_segments (struct link_map *l, int fd,
const ElfW(Ehdr) *header, int type,
const struct loadcmd loadcmds[], size_t nloadcmds,
const size_t maplength, bool has_holes,
struct link_map *loader)
{
if (__glibc_likely (type == ET_DYN))
{
/* This is a position-independent shared object. Let the system
choose where to place it.
As a refinement, sometimes we have an address that we would
prefer to map such objects at; but this is only a preference,
the OS can do whatever it likes. */
ElfW(Addr) mappref
= (ELF_PREFERRED_ADDRESS (loader, maplength,
loadcmds[0].mapstart & GLRO(dl_use_load_bias))
- MAP_BASE_ADDR (l));
uintptr_t mapstart;
if (__glibc_likely (loadcmds[0].prot & PROT_EXEC))
{
/* When there is a code segment, we must use the
allocate_code_data interface to choose a location. */
uintptr_t code_size = loadcmds[0].allocend - loadcmds[0].mapstart;
uintptr_t data_offset;
size_t data_size;
if (__glibc_likely (nloadcmds > 1))
{
data_offset = loadcmds[1].mapstart - loadcmds[0].mapstart;
data_size = ALIGN_UP (maplength - data_offset,
GLRO(dl_pagesize));
}
else
{
data_offset = 0;
data_size = 0;
}
int error = __nacl_irt_code_data_alloc.allocate_code_data
(mappref, code_size, data_offset, data_size, &mapstart);
if (__glibc_unlikely (error))
{
errno = error;
return DL_MAP_SEGMENTS_ERROR_MAP_SEGMENT;
}
}
else
{
/* With no code pages involved, plain mmap works fine. */
void *mapped = __mmap ((void *) mappref, maplength,
PROT_NONE, MAP_ANON, -1, 0);
if (__glibc_unlikely (mapped == MAP_FAILED))
return DL_MAP_SEGMENTS_ERROR_MAP_SEGMENT;
mapstart = (uintptr_t) mapped;
}
l->l_addr = mapstart - loadcmds[0].mapstart;
}
/* Remember which part of the address space this object uses. */
l->l_map_start = loadcmds[0].mapstart + l->l_addr;
l->l_map_end = l->l_map_start + maplength;
l->l_contiguous = !has_holes;
/* Now actually map (or read) in each segment. */
for (const struct loadcmd *c = loadcmds; c < &loadcmds[nloadcmds]; ++c)
if (__glibc_likely (c->mapend > c->mapstart))
{
/* Unlike POSIX mmap, NaCl's mmap does not reliably handle COW
faults in the remainder of the final partial page. So to get
the expected behavior for the unaligned boundary between data
and bss, it's necessary to allocate the final partial page of
data as anonymous memory rather than mapping it from the file. */
size_t maplen = c->mapend - c->mapstart;
if (c->mapend > c->dataend && c->allocend > c->dataend)
maplen = (c->dataend & -GLRO(dl_pagesize)) - c->mapstart;
/* Map the segment contents from the file. */
if (__glibc_unlikely (__mmap ((void *) (l->l_addr + c->mapstart),
maplen, c->prot,
MAP_FIXED|MAP_COPY|MAP_FILE,
fd, c->mapoff)
== MAP_FAILED))
{
switch (errno)
{
case EINVAL:
case ENOTSUP:
case ENOSYS:
break;
default:
return DL_MAP_SEGMENTS_ERROR_MAP_SEGMENT;
}
/* No mmap support for this file. */
if (c->prot & PROT_EXEC)
{
/* Read the data into a temporary buffer. */
const size_t len = c->mapend - c->mapstart;
void *data = __mmap (NULL, len, PROT_READ | PROT_WRITE,
MAP_ANON|MAP_PRIVATE, -1, 0);
if (__glibc_unlikely (data == MAP_FAILED))
return DL_MAP_SEGMENTS_ERROR_MAP_ZERO_FILL;
if (read_in_data (fd, data, len, c->mapoff))
return DL_MAP_SEGMENTS_ERROR_MAP_SEGMENT;
/* Now validate and install the code. */
int error = __nacl_irt_dyncode.dyncode_create
((void *) (l->l_addr + c->mapstart), data, len);
__munmap (data, len);
if (__glibc_unlikely (error))
{
errno = error;
return DL_MAP_SEGMENTS_ERROR_MAP_SEGMENT;
}
if (__glibc_unlikely (type != ET_DYN))
{
/* A successful PROT_EXEC mmap would have implicitly
updated the bookkeeping so that a future
allocate_code_data call would know that this range
of the address space is already occupied. That
doesn't happen implicitly with dyncode_create, so
it's necessary to do an explicit call to update the
bookkeeping. */
uintptr_t allocated_address;
error = __nacl_irt_code_data_alloc.allocate_code_data
(l->l_addr + c->mapstart, len, 0, 0, &allocated_address);
if (__glibc_unlikely (error))
{
errno = error;
return DL_MAP_SEGMENTS_ERROR_MAP_SEGMENT;
}
if (__glibc_unlikely
(allocated_address != l->l_addr + c->mapstart))
{
/* This is not a very helpful error for this case,
but there isn't really anything better to use. */
errno = ENOMEM;
return DL_MAP_SEGMENTS_ERROR_MAP_SEGMENT;
}
}
}
else
{
/* Allocate the pages. */
if (__mmap ((void *) (l->l_addr + c->mapstart),
c->mapend - c->mapstart, c->prot | PROT_WRITE,
MAP_FIXED|MAP_ANON|MAP_PRIVATE, -1, 0)
== MAP_FAILED)
return DL_MAP_SEGMENTS_ERROR_MAP_ZERO_FILL;
/* Now read in the data. */
if (read_in_data (fd, (void *) (l->l_addr + c->mapstart),
c->dataend - c->mapstart, c->mapoff))
return DL_MAP_SEGMENTS_ERROR_MAP_SEGMENT;
/* Now that we've filled the pages, reset the page
protections to what they should be. */
if (!(c->prot & PROT_WRITE)
&& __mprotect ((void *) (l->l_addr + c->mapstart),
c->mapend - c->mapstart, c->prot) < 0)
return DL_MAP_SEGMENTS_ERROR_MPROTECT;
}
}
else if (c->allocend > c->dataend)
{
/* Extra zero pages should appear at the end of this segment,
after the data mapped from the file. */
uintptr_t allocend = c->mapend;
if (c->mapend > c->dataend)
{
/* The final data page was partial. So we didn't map it in.
Instead, we must allocate an anonymous page to fill. */
if (c->prot & PROT_WRITE)
/* Do the whole allocation right here. */
allocend = c->allocend;
if (__mmap ((void *) (l->l_addr + c->mapstart + maplen),
allocend - (c->mapstart + maplen), c->prot,
MAP_FIXED|MAP_ANON|MAP_PRIVATE, -1, 0)
== MAP_FAILED)
return DL_MAP_SEGMENTS_ERROR_MAP_ZERO_FILL;
if (read_in_data (fd,
(void *) (l->l_addr + c->mapstart + maplen),
c->dataend & (GLRO(dl_pagesize) - 1),
c->mapoff + maplen))
return DL_MAP_SEGMENTS_ERROR_MAP_SEGMENT;
/* Now that we've filled the page, reset its
protections to what they should be. */
if (!(c->prot & PROT_WRITE)
&& __mprotect ((void *) (l->l_addr + c->mapstart + maplen),
c->mapend - (c->mapstart + maplen),
c->prot) < 0)
return DL_MAP_SEGMENTS_ERROR_MPROTECT;
}
/* Now allocate the pure zero-fill pages. */
if (allocend < c->allocend
&& (__mmap ((void *) (l->l_addr + c->mapstart + allocend),
c->allocend - (c->mapstart + allocend), c->prot,
MAP_FIXED|MAP_ANON|MAP_PRIVATE, -1, 0)
== MAP_FAILED))
return DL_MAP_SEGMENTS_ERROR_MAP_ZERO_FILL;
}
_dl_postprocess_loadcmd (l, header, c);
}
/* Notify ELF_PREFERRED_ADDRESS that we have to load this one
fixed. */
ELF_FIXED_ADDRESS (loader, c->mapstart);
return NULL;
}
#endif /* dl-map-segments.h */

View File

@ -1,34 +0,0 @@
/* DL_SYSDEP_OSCHECK macro for NaCl.
Copyright (C) 2015-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#ifndef _DL_OSINFO_H
#define _DL_OSINFO_H 1
#include <sysdeps/generic/dl-osinfo.h>
#include "nacl-interfaces.h"
#ifndef SHARED
/* This doesn't really have anything to do with the purpose for
which this macro is used in Linux configurations. But it is
called at the right place in __libc_start_main. */
# define DL_SYSDEP_OSCHECK(fatal) __nacl_initialize_interfaces ()
#endif
#endif /* dl-osinfo.h */

View File

@ -1,40 +0,0 @@
/* System-specific call to open a shared object by name. NaCl version.
Copyright (C) 2015-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#ifndef _DL_SYSDEP_OPEN_H
#define _DL_SYSDEP_OPEN_H 1
#include <stddef.h>
/* NAME is a name without slashes, as it appears in a DT_NEEDED entry
or a dlopen call's argument or suchlike. NAMELEN is (strlen (NAME) + 1).
Find NAME in an OS-dependent fashion, and return its "real" name.
Optionally fill in *FD with a file descriptor open on that file (or
else leave its initial value of -1). The return value is a new
malloc'd string, which will be free'd by the caller. If NAME is
resolved to an actual file that can be opened, then the return
value should name that file (and if *FD was not set, then a normal
__open call on that string will be made). If *FD was set by some
other means than a normal open and there is no "real" name to use,
then __strdup (NAME) is fine (modulo error checking). */
extern char *_dl_sysdep_open_object (const char *name, size_t namelen, int *fd)
internal_function attribute_hidden;
#endif /* dl-sysdep-open.h */

View File

@ -1,112 +0,0 @@
/* Operating system support for run-time dynamic linker. NaCl version.
Copyright (C) 2015-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#ifdef SHARED
# include <assert.h>
# include <ldsodefs.h>
# include <stdint.h>
# include <nacl-interfaces.h>
/* NaCl's elf32.h is incompatible with the real <elf.h>. */
# define NATIVE_CLIENT_SRC_INCLUDE_ELF32_H_
# include <native_client/src/untrusted/nacl/nacl_startup.h>
/* The RTLD_START code sets up the pointer that gets to these
macros as COOKIE to point to two words:
[0] the argument to the entry point from the system (see nacl_startup.h)
[1] the stack base
*/
# define DL_FIND_ARG_COMPONENTS(cookie, argc, argv, envp, auxp) \
do { \
uint32_t *_info = ((void **) (cookie))[0]; \
(argc) = nacl_startup_argc (_info); \
(argv) = nacl_startup_argv (_info); \
(envp) = nacl_startup_envp (_info); \
(auxp) = nacl_startup_auxv (_info); \
} while (0)
# define DL_STACK_END(cookie) (((void **) (cookie))[1])
/* This is called from the entry point (_start), defined by the RTLD_START
macro in the machine-specific dl-machine.h file. At this point, dynamic
linking has been completed and the first argument is the application's
entry point. */
attribute_hidden internal_function __attribute__ ((noreturn))
void
_dl_start_user (void (*user_entry) (uint32_t info[]), uint32_t info[])
{
if (_dl_skip_args > 0)
{
/* There are some arguments that the user program should not see.
Just slide up the INFO pointer so its NACL_STARTUP_ARGV points
to what should now be argv[0], and copy back the earlier fields. */
assert (nacl_startup_argc (info) >= _dl_skip_args);
assert (NACL_STARTUP_ARGV == 3);
uint32_t envc = info[NACL_STARTUP_ENVC];
uint32_t argc = info[NACL_STARTUP_ARGC];
info += _dl_skip_args;
info[NACL_STARTUP_ENVC] = envc;
info[NACL_STARTUP_ARGC] = argc - _dl_skip_args;
}
/* Pass our finalizer function to the user. */
info[NACL_STARTUP_FINI] = (uintptr_t) &_dl_fini;
/* Run initializers. */
_dl_init (GL(dl_ns)[0]._ns_loaded,
nacl_startup_argc (info),
nacl_startup_argv (info),
nacl_startup_envp (info));
/* Call the user's entry point. This should never return. */
(*user_entry) (info);
/* Fail clearly just in case it did return. */
__builtin_trap ();
}
# define DL_SYSDEP_INIT __nacl_initialize_interfaces ()
#endif /* SHARED */
#include <elf/dl-sysdep.c>
#include <dl-sysdep-open.h>
#include <nacl-interfaces.h>
#include <assert.h>
#include <string.h>
#include <unistd.h>
char *
internal_function
_dl_sysdep_open_object (const char *name, size_t namelen, int *fd)
{
int error = __nacl_irt_resource_open.open_resource (name, fd);
if (error)
return NULL;
assert (*fd != -1);
char *realname = __strdup (name);
if (__glibc_unlikely (realname == NULL))
{
__close (*fd);
*fd = -1;
}
return realname;
}

View File

@ -1,30 +0,0 @@
/* System-specific settings for dynamic linker code. NaCl version.
Copyright (C) 2015-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
/* No multiple inclusion protection needed here because it's just macros.
We don't want to use _DL_SYSDEP_H in case we are #include_next'd. */
#include_next <dl-sysdep.h>
/* We use AT_SYSINFO for a different purpose than Linux does,
but we too want to store its value. */
#define NEED_DL_SYSINFO 1
#define DL_SYSINFO_DEFAULT 0
/* sysdeps/arm/dl-sysdep.h defines this but it does not apply to NaCl. */
#undef DL_ARGV_NOT_RELRO

View File

@ -1,65 +0,0 @@
/* Unmap a shared object's segments. NaCl version.
Copyright (C) 2015-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#ifndef _DL_UNMAP_SEGMENTS_H
#define _DL_UNMAP_SEGMENTS_H 1
#include <link.h>
#include <sys/mman.h>
/* There is always a big gap between the executable segment and the data
segments. Other code segments and data pages lie in there. So we must
unmap each segment individually (except for a codeless module). */
static void __always_inline
_dl_unmap_segments (struct link_map *l)
{
if (l->l_contiguous)
/* Simple case. */
__munmap ((void *) l->l_map_start, l->l_map_end - l->l_map_start);
else
{
/* Normally l_phdr points into the RODATA segment, which we will
unmap in one iteration of the loop. So we cannot use it directly
throughout. */
struct { ElfW(Addr) start, end; } segments[l->l_phnum], *seg = segments;
for (const ElfW(Phdr) *ph = l->l_phdr; ph < &l->l_phdr[l->l_phnum]; ++ph)
if (ph->p_type == PT_LOAD)
{
seg->start = (l->l_addr + ph->p_vaddr) & -GLRO(dl_pagesize);
seg->end = (l->l_addr + ph->p_vaddr + ph->p_memsz
+ GLRO(dl_pagesize) - 1) & -GLRO(dl_pagesize);
if (seg > segments && seg[-1].end == seg->start)
/* Coalesce two adjacent segments into one munmap call. */
seg[-1].end = seg->end;
else
++seg;
}
do
{
--seg;
__munmap ((void *) seg->start, seg->end - seg->start);
}
while (seg > segments);
}
}
#endif /* dl-unmap-segments.h */

View File

@ -1,45 +0,0 @@
/* Message-writing for the dynamic linker. NaCl version.
Copyright (C) 2015-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#include <sys/uio.h>
#include <nacl-interfaces.h>
/* This is used from only one place: dl-misc.c:_dl_debug_vdprintf.
Hence it's in a header with the expectation it will be inlined.
This is writev, but with a constraint added and others loosened:
1. Under RTLD_PRIVATE_ERRNO, it must not clobber the private errno
when another thread holds the dl_load_lock.
2. It is not obliged to detect and report errors at all.
3. It's not really obliged to deliver a single atomic write
(though it may be preferable). */
static inline void
_dl_writev (int fd, const struct iovec *iov, size_t niov)
{
for (size_t i = 0; i < niov; ++i)
{
size_t wrote;
if (__nacl_irt_fdio.write (fd, iov[i].iov_base, iov[i].iov_len,
&wrote) != 0
|| wrote != iov[i].iov_len)
/* The write failed, so don't bother trying any more. */
break;
}
}

View File

@ -1,31 +0,0 @@
/* Duplicate a file descriptor. NaCl version.
Copyright (C) 2015-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#include <unistd.h>
#include <nacl-interfaces.h>
/* Duplicate FD, returning a new file descriptor open on the same file. */
int
__dup (int fd)
{
int result;
return NACL_CALL (__nacl_irt_fdio.dup (fd, &result), result);
}
libc_hidden_def (__dup)
weak_alias (__dup, dup)

View File

@ -1,31 +0,0 @@
/* Duplicate a file descriptor to a chosen number. NaCl version.
Copyright (C) 2015-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#include <unistd.h>
#include <nacl-interfaces.h>
/* Duplicate FD to FD2, closing the old FD2 and making FD2 be
open the same file as FD is. Return FD2 or -1. */
int
__dup2 (int fd, int fd2)
{
return NACL_CALL (__nacl_irt_fdio.dup2 (fd, fd2), fd2);
}
libc_hidden_def (__dup2)
weak_alias (__dup2, dup2)

View File

@ -1,6 +0,0 @@
#ifndef __ASSEMBLY__
# include <stdint.h>
extern void _start (uint32_t info[]) attribute_hidden;
#endif
#define ENTRY_POINT _start

View File

@ -1,87 +0,0 @@
# Script to produce bits/errno.h for NaCl.
# Copyright (C) 2015-2017 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
# The GNU C Library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
# You should have received a copy of the GNU Lesser General Public
# License along with the GNU C Library; if not, see
# <http://www.gnu.org/licenses/>.
BEGIN { maxerrno = 0 }
$1 == "#define" && $2 ~ /NACL_ABI_E[A-Z0-9_]+/ && $3 ~ /[0-9]+/ {
ename = $2;
sub(/NACL_ABI_/, "", ename);
errno = $3 + 0;
if (errno > maxerrno) maxerrno = errno;
errnos[errno] = ename;
errnos_by_name[ename] = errno;
if ($4 == "/*" && !(ename in errno_text)) {
etext = $5;
for (i = 6; i <= NF && $i != "*/"; ++i)
etext = etext " " $i;
errno_text[ename] = etext;
}
next;
}
$1 == "@comment" && $2 == "errno.h" { errnoh=1; next }
errnoh == 1 && $1 == "@comment" {
++errnoh;
etext = $3;
for (i = 4; i <= NF; ++i)
etext = etext " " $i;
next;
}
errnoh == 2 && $1 == "@deftypevr" && $2 == "Macro" && $3 == "int" {
ename = $4;
errno_text[ename] = etext;
next;
}
function define_errno(errno, ename) {
etext = errno_text[ename];
if (length(ename) < 8) ename = ename "\t";
printf "#define\t%s\t%d\t/* %s */\n", ename, errno, etext;
}
END {
print "\
/* This file generated by errnos.awk. */\n\
\n\
#if !defined __Emath_defined && (defined _ERRNO_H || defined __need_Emath)\n\
#undef __need_Emath\n\
#define __Emath_defined 1";
emath["EDOM"] = emath["EILSEQ"] = emath["ERANGE"] = 1;
for (ename in emath) {
errno = errnos_by_name[ename];
define_errno(errno, ename);
delete errnos[errno];
}
print "\
#endif\n\
\n\
#ifdef _ERRNO_H\n";
for (i = 1; i <= maxerrno; ++i)
if (i in errnos) define_errno(i, errnos[i]);
print "\n\
#define EWOULDBLOCK EAGAIN\n\
#define ENOTSUP EOPNOTSUPP\n\
\n\
extern __thread int errno __attribute__ ((__tls_model__ (\"initial-exec\")));\n\
#define errno errno\n\
\n\
#endif";
}

View File

@ -1,29 +0,0 @@
/* Check file access permission. NaCl version.
Copyright (C) 2015-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#include <unistd.h>
/* Test for access to FILE. */
int
__euidaccess (const char *file, int type)
{
/* No NaCl process will ever be set-ID, so access and euidaccess are one. */
return __access (file, type);
}
weak_alias (__euidaccess, euidaccess)
weak_alias (__euidaccess, eaccess)

View File

@ -1,80 +0,0 @@
/* Call to terminate the current thread. NaCl version.
Copyright (C) 2015-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#include <assert.h>
#include <atomic.h>
#include <futex-internal.h>
#include <nacl-interfaces.h>
#include <nptl/pthreadP.h>
/* This causes the current thread to exit, without affecting other
threads in the process if there are any. If there are no other
threads left, then this has the effect of _exit (0). */
static inline void __attribute__ ((noreturn, always_inline, unused))
__exit_thread (void)
{
struct pthread *pd = THREAD_SELF;
/* The generic logic for pthread_join and stack/descriptor reuse is
based on the Linux kernel feature that will clear and futex-wake
a designated address as a final part of thread teardown. Correct
synchronization relies on the fact that these happen only after
there is no possibility of user code touching or examining the
late thread's stack.
The NaCl system interface implements half of this: it clears a
word after the thread's user stack is safely dead, but it does
not futex-wake the location. So, some shenanigans are required.
We change and futex-wake the location here, so as to wake up any
blocked pthread_join (i.e. lll_wait_tid) or pthread_timedjoin_np
(i.e. lll_timedwait_tid). However, that's before we have safely
vacated the stack. So instead of clearing the location, we set
it to a special magic value, NACL_EXITING_TID. This counts as a
"live thread" value for all the generic logic, but is recognized
specially in lll_wait_tid and lll_timedwait_tid (lowlevellock.h).
Once it has this value, lll_wait_tid will busy-wait for the
location to be cleared to zero by the NaCl system code. Only then
is the stack actually safe to reuse. */
if (!IS_DETACHED (pd))
{
/* The magic value must not be one that could ever be a valid
TID value. See pthread-pids.h about the low bit. */
assert (NACL_EXITING_TID & 1);
/* The magic value must not be one that has the "free" flag
(i.e. sign bit) set. If that bit is set, then the
descriptor could be reused for a new thread. */
assert (NACL_EXITING_TID > 0);
atomic_store_relaxed (&pd->tid, NACL_EXITING_TID);
futex_wake ((unsigned int *) &pd->tid, 1, FUTEX_PRIVATE);
}
/* This clears PD->tid some time after the thread stack can never
be touched again. Unfortunately, it does not also do a
futex-wake at that time (as Linux does via CLONE_CHILD_CLEARTID
and set_tid_address). So lll_wait_tid does some busy-waiting. */
__nacl_irt_thread.thread_exit (&pd->tid);
/* That never returns unless something is severely and unrecoverably wrong.
If it ever does, try to make sure we crash. */
while (1)
__builtin_trap ();
}

View File

@ -1,28 +0,0 @@
/* Change working directory given a file descriptor. NaCl version.
Copyright (C) 2015-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#include <unistd.h>
#include <nacl-interfaces.h>
/* Change the current directory to FD. */
int
__fchdir (int fd)
{
return NACL_CALL (__nacl_irt_dev_fdio.fchdir (fd), 0);
}
weak_alias (__fchdir, fchdir)

View File

@ -1,28 +0,0 @@
/* Change a file's permissions given a file descriptor. NaCl version.
Copyright (C) 2015-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#include <unistd.h>
#include <nacl-interfaces.h>
/* Change the permissions of the file referenced by FD to MODE. */
int
__fchmod (int fd, mode_t mode)
{
return NACL_CALL (__nacl_irt_dev_fdio.fchmod (fd, mode), 0);
}
weak_alias (__fchmod, fchmod)

View File

@ -1,28 +0,0 @@
/* Make all changes done to file data actually appear on disk. NaCl version.
Copyright (C) 2015-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#include <unistd.h>
#include <nacl-interfaces.h>
/* Synchronize at least the data part of a file with the underlying
media. */
int
fdatasync (int fd)
{
return NACL_CALL (__nacl_irt_dev_fdio.fdatasync (fd), 0);
}

View File

@ -1,32 +0,0 @@
/* Open a directory stream from a file descriptor. NaCl version.
Copyright (C) 2015-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#include <assert.h>
#include <fcntl.h>
/* Since NaCl does not have a useful fcntl, stub it out.
fdopendir will not detect an fd open for writing only,
but readdir will fail with EBADF so that's close enough. */
#define __fcntl(fd, command) \
({ \
assert ((command) == F_GETFL); \
O_RDONLY; \
})
#include <sysdeps/posix/fdopendir.c>

View File

@ -1,3 +0,0 @@
/* Get the stub, bypassing the "generic" NPTL code. */
#include <posix/fork.c>
strong_alias (__fork, __libc_fork)

View File

@ -1,27 +0,0 @@
/* Make all changes done to FD actually appear on disk. NaCl version.
Copyright (C) 2015-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#include <unistd.h>
#include <nacl-interfaces.h>
/* Make all changes done to FD actually appear on disk. */
int
fsync (int fd)
{
return NACL_CALL (__nacl_irt_dev_fdio.fsync (fd), 0);
}

View File

@ -1,32 +0,0 @@
/* Truncate a file. NaCl version.
Copyright (C) 2015-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#include <unistd.h>
#include <nacl-interfaces.h>
/* Truncate the file referenced by FD to LENGTH bytes. */
int
__ftruncate (int fd, off_t length)
{
return NACL_CALL (__nacl_irt_dev_fdio.ftruncate (fd, length), 0);
}
weak_alias (__ftruncate, ftruncate)
/* ftruncate64 is the same as ftruncate. */
strong_alias (__ftruncate, __ftruncate64)
weak_alias (__ftruncate64, ftruncate64)

View File

@ -1 +0,0 @@
/* ftruncate64 is the same as ftruncate. */

View File

@ -1,248 +0,0 @@
/* futex operations for glibc-internal use. NaCl version.
Copyright (C) 2014-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#ifndef FUTEX_INTERNAL_H
#define FUTEX_INTERNAL_H
#include <sysdeps/nptl/futex-internal.h>
#include <errno.h>
#include <lowlevellock-futex.h>
#include <nacl-interfaces.h>
#include <nptl/pthreadP.h>
/* See sysdeps/nptl/futex-internal.h for documentation; this file only
contains NaCl-specific comments.
There is no support yet for shared futexes nor for exact relative
timeouts. */
/* See sysdeps/nptl/futex-internal.h for constraints on the value of the
FUTEX_PRIVATE and FUTEX_SHARED constants.
Shared futexes are not yet supported, and we never allow clients to
actually request shared futexes. Therefore, we do not need a different
value. */
#undef FUTEX_SHARED
#define FUTEX_SHARED FUTEX_PRIVATE
/* FUTEX_SHARED is not yet supported. */
static __always_inline int
futex_supports_pshared (int pshared)
{
if (__glibc_likely (pshared == PTHREAD_PROCESS_PRIVATE))
return 0;
else if (pshared == PTHREAD_PROCESS_SHARED)
return ENOTSUP;
else
return EINVAL;
}
/* Relative timeouts are only emulated via absolute timeouts using the
system clock. */
static __always_inline bool
futex_supports_exact_relative_timeouts (void)
{
return false;
}
/* See sysdeps/nptl/futex-internal.h for details. */
static __always_inline int
futex_wait (unsigned int *futex_word, unsigned int expected, int private)
{
int err = lll_futex_timed_wait (futex_word, expected, NULL, private);
switch (err)
{
case 0:
case -EAGAIN:
case -EINTR:
return -err;
case -ETIMEDOUT: /* Cannot have happened as we provided no timeout. */
case -EFAULT: /* Must have been caused by a glibc or application bug. */
case -EINVAL: /* Either due to wrong alignment or due to the timeout not
being normalized. Must have been caused by a glibc or
application bug. */
case -ENOSYS: /* Must have been caused by a glibc bug. */
/* No other errors are documented at this time. */
default:
futex_fatal_error ();
}
}
/* See sysdeps/nptl/futex-internal.h for details. */
static __always_inline int
futex_wait_cancelable (unsigned int *futex_word, unsigned int expected,
int private)
{
int oldtype;
oldtype = __pthread_enable_asynccancel ();
int err = lll_futex_timed_wait (futex_word, expected, NULL, private);
__pthread_disable_asynccancel (oldtype);
switch (err)
{
case 0:
case -EAGAIN:
case -EINTR:
return -err;
case -ETIMEDOUT: /* Cannot have happened as we provided no timeout. */
case -EFAULT: /* Must have been caused by a glibc or application bug. */
case -EINVAL: /* Either due to wrong alignment or due to the timeout not
being normalized. Must have been caused by a glibc or
application bug. */
case -ENOSYS: /* Must have been caused by a glibc bug. */
/* No other errors are documented at this time. */
default:
futex_fatal_error ();
}
}
/* See sysdeps/nptl/futex-internal.h for details. */
static __always_inline int
futex_reltimed_wait (unsigned int *futex_word, unsigned int expected,
const struct timespec *reltime, int private)
{
int err = lll_futex_timed_wait (futex_word, expected, reltime, private);
switch (err)
{
case 0:
case -EAGAIN:
case -EINTR:
case -ETIMEDOUT:
return -err;
case -EFAULT: /* Must have been caused by a glibc or application bug. */
case -EINVAL: /* Either due to wrong alignment or due to the timeout not
being normalized. Must have been caused by a glibc or
application bug. */
case -ENOSYS: /* Must have been caused by a glibc bug. */
/* No other errors are documented at this time. */
default:
futex_fatal_error ();
}
}
/* See sysdeps/nptl/futex-internal.h for details. */
static __always_inline int
futex_reltimed_wait_cancelable (unsigned int *futex_word,
unsigned int expected,
const struct timespec *reltime, int private)
{
int oldtype;
oldtype = __pthread_enable_asynccancel ();
int err = lll_futex_timed_wait (futex_word, expected, reltime, private);
__pthread_disable_asynccancel (oldtype);
switch (err)
{
case 0:
case -EAGAIN:
case -EINTR:
case -ETIMEDOUT:
return -err;
case -EFAULT: /* Must have been caused by a glibc or application bug. */
case -EINVAL: /* Either due to wrong alignment or due to the timeout not
being normalized. Must have been caused by a glibc or
application bug. */
case -ENOSYS: /* Must have been caused by a glibc bug. */
/* No other errors are documented at this time. */
default:
futex_fatal_error ();
}
}
/* See sysdeps/nptl/futex-internal.h for details. */
static __always_inline int
futex_abstimed_wait (unsigned int *futex_word, unsigned int expected,
const struct timespec *abstime, int private)
{
int err = __nacl_irt_futex.futex_wait_abs ((volatile int *) futex_word,
expected, abstime);
switch (err)
{
case 0:
case EAGAIN:
case EINTR:
case ETIMEDOUT:
return err;
case EFAULT: /* Must have been caused by a glibc or application bug. */
case EINVAL: /* Either due to wrong alignment or due to the timeout not
being normalized. Must have been caused by a glibc or
application bug. */
case ENOSYS: /* Must have been caused by a glibc bug. */
/* No other errors are documented at this time. */
default:
futex_fatal_error ();
}
}
/* See sysdeps/nptl/futex-internal.h for details. */
static __always_inline int
futex_abstimed_wait_cancelable (unsigned int *futex_word,
unsigned int expected,
const struct timespec *abstime, int private)
{
int oldtype;
oldtype = __pthread_enable_asynccancel ();
int err = __nacl_irt_futex.futex_wait_abs ((volatile int *) futex_word,
expected, abstime);
__pthread_disable_asynccancel (oldtype);
switch (err)
{
case 0:
case EAGAIN:
case EINTR:
case ETIMEDOUT:
return err;
case EFAULT: /* Must have been caused by a glibc or application bug. */
case EINVAL: /* Either due to wrong alignment or due to the timeout not
being normalized. Must have been caused by a glibc or
application bug. */
case ENOSYS: /* Must have been caused by a glibc bug. */
/* No other errors are documented at this time. */
default:
futex_fatal_error ();
}
}
/* See sysdeps/nptl/futex-internal.h for details. */
static __always_inline void
futex_wake (unsigned int *futex_word, int processes_to_wake, int private)
{
int res = lll_futex_wake (futex_word, processes_to_wake, private);
/* No error. Ignore the number of woken processes. */
if (res >= 0)
return;
switch (res)
{
case -EFAULT: /* Could have happened due to memory reuse. */
case -EINVAL: /* Could be either due to incorrect alignment (a bug in
glibc or in the application) or due to memory being
reused for a PI futex. We cannot distinguish between the
two causes, and one of them is correct use, so we do not
act in this case. */
return;
case -ENOSYS: /* Must have been caused by a glibc bug. */
/* No other errors are documented at this time. */
default:
futex_fatal_error ();
}
}
#endif /* futex-internal.h */

View File

@ -1,45 +0,0 @@
/* Get stat information from a file descriptor. NaCl version.
Copyright (C) 2015-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
/* Avoid the declaration so the compiler doesn't complain about the alias
with a different type signature. It doesn't know that 'struct stat'
and 'struct stat64' are ABI-compatible. */
#define __fxstat64 __fxstat64_avoid
#include <sys/stat.h>
#undef __fxstat64
#include <errno.h>
#include <stddef.h>
#include <xstatconv.h>
#undef fstat
/* Get information about the file descriptor FD in BUF. */
int
__fxstat (int vers, int fd, struct stat *buf)
{
nacl_abi_stat_t abi_buf;
return NACL_CALL (__nacl_irt_fdio.fstat (fd, &abi_buf),
__xstat_conv (vers, &abi_buf, buf));
}
hidden_def (__fxstat)
weak_alias (__fxstat, _fxstat)
strong_alias (__fxstat, __fxstat64)
hidden_ver (__fxstat, __fxstat64)

View File

@ -1 +0,0 @@
/* fxstat.c defines __fxstat64 as an alias. */

View File

@ -1,56 +0,0 @@
/* Get current working directory. NaCl version.
Copyright (C) 2015-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#include <unistd.h>
#include <limits.h>
#include <stdlib.h>
#include <nacl-interfaces.h>
/* Get the pathname of the current working directory,
and put it in SIZE bytes of BUF. Returns NULL if the
directory couldn't be determined or SIZE was too small.
If successful, returns BUF. In GNU, if BUF is NULL,
an array is allocated with `malloc'; the array is SIZE
bytes long, unless SIZE <= 0, in which case it is as
big as necessary. */
char *
__getcwd (char *buf, size_t size)
{
char *use_buf = buf;
if (buf == NULL)
{
if (size == 0)
size = PATH_MAX;
use_buf = malloc (size);
if (__glibc_unlikely (use_buf == NULL))
return NULL;
}
int error = __nacl_irt_dev_filename.getcwd (use_buf, size);
if (__glibc_unlikely (error))
{
if (use_buf != buf)
free (use_buf);
errno = error;
return NULL;
}
return use_buf;
}
weak_alias (__getcwd, getcwd)

View File

@ -1,29 +0,0 @@
/* Read directory entries from a file descriptor. NaCl version.
Copyright (C) 2015-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#include <dirent.h>
#include <nacl-interfaces.h>
ssize_t
internal_function
__getdents (int fd, char *buf, size_t nbytes)
{
size_t nread;
return NACL_CALL (__nacl_irt_fdio.getdents (fd, (void *) buf, nbytes, &nread),
nread);
}

View File

@ -1 +0,0 @@
/* We do not define a getdirentries or getdirentries64 entry point at all. */

View File

@ -1,29 +0,0 @@
/* getdtablesize -- Return the limit on file descriptor values. NaCl version.
Copyright (C) 2015-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#include <unistd.h>
/* Return the maximum number of file descriptors
the current process could possibly have. */
int
__getdtablesize (void)
{
/* There is no actual limit in NaCl, just memory. */
return -1;
}
weak_alias (__getdtablesize, getdtablesize)

View File

@ -1,45 +0,0 @@
/* Get current host's name. NaCl version.
Copyright (C) 2015-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#include <errno.h>
#include <string.h>
#include <unistd.h>
/* Put the name of the current host in no more than LEN bytes of NAME.
The result is null-terminated if LEN is large enough for the full
name and the terminator. */
int
__gethostname (char *name, size_t len)
{
static const char hostname[] = "naclhost";
int result = 0;
size_t copy = sizeof hostname;
if (len < copy)
{
errno = ENAMETOOLONG;
result = -1;
copy = len;
}
memcpy (name, hostname, copy);
return result;
}
weak_alias (__gethostname, gethostname)

View File

@ -1 +0,0 @@
#include <sysdeps/unix/getpagesize.c>

View File

@ -1,32 +0,0 @@
/* Get the process ID of the calling process. NaCl version.
Copyright (C) 2015-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#include <errno.h>
#include <unistd.h>
#include <nacl-interfaces.h>
/* Get the process ID of the calling process. */
pid_t
__getpid (void)
{
int pid;
return NACL_CALL (__nacl_irt_dev_getpid.getpid (&pid), pid);
}
libc_hidden_def (__getpid)
weak_alias (__getpid, getpid)
libc_hidden_weak (getpid)

View File

@ -1,65 +0,0 @@
/* getsysstats - Determine various system internal values. NaCl version.
Copyright (C) 2015-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#include <errno.h>
#include <sys/sysinfo.h>
#include <nacl-interfaces.h>
#undef __native_client__
#include "native_client/src/trusted/service_runtime/include/sys/unistd.h"
int
__get_nprocs_conf (void)
{
int nprocs;
if (__nacl_irt_basic.sysconf (NACL_ABI__SC_NPROCESSORS_ONLN, &nprocs) != 0)
/* On failure (which should be impossible), just report one processor. */
nprocs = 1;
return nprocs;
}
weak_alias (__get_nprocs_conf, get_nprocs_conf)
int
__get_nprocs (void)
{
return __get_nprocs_conf ();
}
weak_alias (__get_nprocs, get_nprocs)
long int
__get_phys_pages (void)
{
/* We have no general way to determine this value. */
__set_errno (ENOSYS);
return -1;
}
weak_alias (__get_phys_pages, get_phys_pages)
stub_warning (get_phys_pages)
long int
__get_avphys_pages (void)
{
/* We have no general way to determine this value. */
__set_errno (ENOSYS);
return -1;
}
weak_alias (__get_avphys_pages, get_avphys_pages)
stub_warning (get_avphys_pages)

View File

@ -1,40 +0,0 @@
/* Get the current wall clock time. NaCl version.
Copyright (C) 2015-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#include <errno.h>
#include <sys/time.h>
#include <nacl-interfaces.h>
/* Get the current time of day and timezone information,
putting it into *TV and *TZ. If TZ is NULL, *TZ is not filled.
Returns 0 on success, -1 on errors. */
int
__gettimeofday (struct timeval *tv, struct timezone *tz)
{
if (__glibc_unlikely (tz != NULL))
{
tz->tz_minuteswest = 0;
tz->tz_dsttime = 0;
}
return NACL_CALL (__nacl_irt_basic.gettod (tv), 0);
}
libc_hidden_def (__gettimeofday)
weak_alias (__gettimeofday, gettimeofday)
libc_hidden_weak (gettimeofday)

View File

@ -1,2 +0,0 @@
/* Fetch the version that defines glob64 as an alias. */
#include <sysdeps/wordsize-64/glob.c>

View File

@ -1 +0,0 @@
#include <sysdeps/wordsize-64/glob64.c>

View File

@ -1,2 +0,0 @@
/* Bypass the sysdeps/gnu version to get the plain stub. */
#include <inet/ifaddrs.c>

View File

@ -1,27 +0,0 @@
/* Initialization code run first thing by the ELF startup code. NaCl version.
Copyright (C) 2015-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#ifdef SHARED
# include <nacl-interfaces.h>
# define VDSO_SETUP __nacl_initialize_interfaces
#endif
#include <csu/init-first.c>

View File

@ -1,26 +0,0 @@
/* Open a stream from a file descriptor. NaCl version.
Copyright (C) 2015-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#include <fcntl.h>
/* NaCl does not have a functioning fcntl, so don't use the stub and fail. */
#undef F_GETFL
#undef F_SETFL
#define __fcntl(...) ???should not be called???
#include <libio/iofdopen.c>

View File

@ -1,12 +0,0 @@
# This sed script massages native_client/src/untrusted/irt/irt.h into
# the nacl-irt.h used to build libc, by rewriting foo_t and struct bar
# to nacl_abi_foo_t and nacl_abi_bar_t (and eliding forward declarations).
# It doesn't perturb any struct CamelCaps cases, since such names will
# be used only in NaCl-specific interfaces.
/^struct \([a-z][a-z]*\);$/d
/^#include "irt\.h"$/d
/(/!b
s/\([a-z0-9_][a-z0-9_]*\)_t\>/nacl_abi_\1_t/g
s/struct \([a-z0-9_][a-z0-9_]*\)/nacl_abi_\1_t/g
s/nacl_abi_\(u*int[3264ptr]*_t\)/\1/g
s/nacl_abi_\(nacl_irt_\)/\1/g

View File

@ -1,38 +0,0 @@
/* Determine if a file descriptor refers to a terminal. NaCl version.
Copyright (C) 2015-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#include <errno.h>
#include <unistd.h>
#include <nacl-interfaces.h>
/* Return 1 if FD is a terminal, 0 if not. */
int
__isatty (int fd)
{
int result;
int error = __nacl_irt_dev_fdio.isatty (fd, &result);
if (error == 0)
{
if (result)
return 1;
error = ENOTTY;
}
errno = error;
return 0;
}
weak_alias (__isatty, isatty)

View File

@ -1,21 +0,0 @@
/* Set flags signalling availability of certain operating system features.
Copyright (C) 2015-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
/* This file can define __ASSUME_* macros checked by certain source files.
Almost none of these are used outside of sysdeps/unix/sysv/linux code.
But those referring to POSIX-level features like O_* flags can be. */

View File

@ -1,10 +0,0 @@
GLIBC_2.22 GLIBC_2.22 A
GLIBC_2.22 __libc_stack_end D 0x4
GLIBC_2.22 __stack_chk_guard D 0x4
GLIBC_2.22 __tls_get_addr F
GLIBC_2.22 _dl_mcount F
GLIBC_2.22 _r_debug D 0x14
GLIBC_2.22 calloc F
GLIBC_2.22 free F
GLIBC_2.22 malloc F
GLIBC_2.22 realloc F

View File

@ -1,35 +0,0 @@
/* Run-time dynamic linker data structures for loaded ELF shared objects. NaCl.
Copyright (C) 2015-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#ifndef _LDSODEFS_H
/* We have the auxiliary vector. */
#define HAVE_AUX_VECTOR 1
/* Get the real definitions. */
#include_next <ldsodefs.h>
/* Now define our stuff. */
/* Used by static binaries to check the auxiliary vector. */
extern void _dl_aux_init (ElfW(auxv_t) *av) internal_function;
/* Initialization which is normally done by the dynamic linker. */
extern void _dl_non_dynamic_init (void) internal_function;
#endif /* ldsodefs.h */

View File

@ -1,2 +0,0 @@
GLIBC_2.22 GLIBC_2.22 A
GLIBC_2.22 __ctype_get_mb_cur_max F

View File

@ -1,5 +0,0 @@
GLIBC_2.22 GLIBC_2.22 A
GLIBC_2.22 gai_cancel F
GLIBC_2.22 gai_error F
GLIBC_2.22 gai_suspend F
GLIBC_2.22 getaddrinfo_a F

View File

@ -1,4 +0,0 @@
/* We can compute the location of auxv without a loop, so we might as well
pass it in. */
#define LIBC_START_MAIN_AUXVEC_ARG
#include <csu/libc-start.c>

View File

@ -1,8 +0,0 @@
GLIBC_2.22 GLIBC_2.22 A
GLIBC_2.22 crypt F
GLIBC_2.22 crypt_r F
GLIBC_2.22 encrypt F
GLIBC_2.22 encrypt_r F
GLIBC_2.22 fcrypt F
GLIBC_2.22 setkey F
GLIBC_2.22 setkey_r F

View File

@ -1,10 +0,0 @@
GLIBC_2.22 GLIBC_2.22 A
GLIBC_2.22 dladdr F
GLIBC_2.22 dladdr1 F
GLIBC_2.22 dlclose F
GLIBC_2.22 dlerror F
GLIBC_2.22 dlinfo F
GLIBC_2.22 dlmopen F
GLIBC_2.22 dlopen F
GLIBC_2.22 dlsym F
GLIBC_2.22 dlvsym F

View File

@ -1,430 +0,0 @@
GLIBC_2.22 GLIBC_2.22 A
GLIBC_2.22 _LIB_VERSION D 0x4
GLIBC_2.22 __acos_finite F
GLIBC_2.22 __acosf_finite F
GLIBC_2.22 __acosh_finite F
GLIBC_2.22 __acoshf_finite F
GLIBC_2.22 __asin_finite F
GLIBC_2.22 __asinf_finite F
GLIBC_2.22 __atan2_finite F
GLIBC_2.22 __atan2f_finite F
GLIBC_2.22 __atanh_finite F
GLIBC_2.22 __atanhf_finite F
GLIBC_2.22 __clog10 F
GLIBC_2.22 __clog10f F
GLIBC_2.22 __clog10l F
GLIBC_2.22 __cosh_finite F
GLIBC_2.22 __coshf_finite F
GLIBC_2.22 __exp10_finite F
GLIBC_2.22 __exp10f_finite F
GLIBC_2.22 __exp2_finite F
GLIBC_2.22 __exp2f_finite F
GLIBC_2.22 __exp_finite F
GLIBC_2.22 __expf_finite F
GLIBC_2.22 __finite F
GLIBC_2.22 __finitef F
GLIBC_2.22 __finitel F
GLIBC_2.22 __fmod_finite F
GLIBC_2.22 __fmodf_finite F
GLIBC_2.22 __fpclassify F
GLIBC_2.22 __fpclassifyf F
GLIBC_2.22 __gamma_r_finite F
GLIBC_2.22 __gammaf_r_finite F
GLIBC_2.22 __hypot_finite F
GLIBC_2.22 __hypotf_finite F
GLIBC_2.22 __issignaling F
GLIBC_2.22 __issignalingf F
GLIBC_2.22 __j0_finite F
GLIBC_2.22 __j0f_finite F
GLIBC_2.22 __j1_finite F
GLIBC_2.22 __j1f_finite F
GLIBC_2.22 __jn_finite F
GLIBC_2.22 __jnf_finite F
GLIBC_2.22 __lgamma_r_finite F
GLIBC_2.22 __lgammaf_r_finite F
GLIBC_2.22 __log10_finite F
GLIBC_2.22 __log10f_finite F
GLIBC_2.22 __log2_finite F
GLIBC_2.22 __log2f_finite F
GLIBC_2.22 __log_finite F
GLIBC_2.22 __logf_finite F
GLIBC_2.22 __pow_finite F
GLIBC_2.22 __powf_finite F
GLIBC_2.22 __remainder_finite F
GLIBC_2.22 __remainderf_finite F
GLIBC_2.22 __scalb_finite F
GLIBC_2.22 __scalbf_finite F
GLIBC_2.22 __signbit F
GLIBC_2.22 __signbitf F
GLIBC_2.22 __sinh_finite F
GLIBC_2.22 __sinhf_finite F
GLIBC_2.22 __sqrt_finite F
GLIBC_2.22 __sqrtf_finite F
GLIBC_2.22 __y0_finite F
GLIBC_2.22 __y0f_finite F
GLIBC_2.22 __y1_finite F
GLIBC_2.22 __y1f_finite F
GLIBC_2.22 __yn_finite F
GLIBC_2.22 __ynf_finite F
GLIBC_2.22 acos F
GLIBC_2.22 acosf F
GLIBC_2.22 acosh F
GLIBC_2.22 acoshf F
GLIBC_2.22 acoshl F
GLIBC_2.22 acosl F
GLIBC_2.22 asin F
GLIBC_2.22 asinf F
GLIBC_2.22 asinh F
GLIBC_2.22 asinhf F
GLIBC_2.22 asinhl F
GLIBC_2.22 asinl F
GLIBC_2.22 atan F
GLIBC_2.22 atan2 F
GLIBC_2.22 atan2f F
GLIBC_2.22 atan2l F
GLIBC_2.22 atanf F
GLIBC_2.22 atanh F
GLIBC_2.22 atanhf F
GLIBC_2.22 atanhl F
GLIBC_2.22 atanl F
GLIBC_2.22 cabs F
GLIBC_2.22 cabsf F
GLIBC_2.22 cabsl F
GLIBC_2.22 cacos F
GLIBC_2.22 cacosf F
GLIBC_2.22 cacosh F
GLIBC_2.22 cacoshf F
GLIBC_2.22 cacoshl F
GLIBC_2.22 cacosl F
GLIBC_2.22 carg F
GLIBC_2.22 cargf F
GLIBC_2.22 cargl F
GLIBC_2.22 casin F
GLIBC_2.22 casinf F
GLIBC_2.22 casinh F
GLIBC_2.22 casinhf F
GLIBC_2.22 casinhl F
GLIBC_2.22 casinl F
GLIBC_2.22 catan F
GLIBC_2.22 catanf F
GLIBC_2.22 catanh F
GLIBC_2.22 catanhf F
GLIBC_2.22 catanhl F
GLIBC_2.22 catanl F
GLIBC_2.22 cbrt F
GLIBC_2.22 cbrtf F
GLIBC_2.22 cbrtl F
GLIBC_2.22 ccos F
GLIBC_2.22 ccosf F
GLIBC_2.22 ccosh F
GLIBC_2.22 ccoshf F
GLIBC_2.22 ccoshl F
GLIBC_2.22 ccosl F
GLIBC_2.22 ceil F
GLIBC_2.22 ceilf F
GLIBC_2.22 ceill F
GLIBC_2.22 cexp F
GLIBC_2.22 cexpf F
GLIBC_2.22 cexpl F
GLIBC_2.22 cimag F
GLIBC_2.22 cimagf F
GLIBC_2.22 cimagl F
GLIBC_2.22 clog F
GLIBC_2.22 clog10 F
GLIBC_2.22 clog10f F
GLIBC_2.22 clog10l F
GLIBC_2.22 clogf F
GLIBC_2.22 clogl F
GLIBC_2.22 conj F
GLIBC_2.22 conjf F
GLIBC_2.22 conjl F
GLIBC_2.22 copysign F
GLIBC_2.22 copysignf F
GLIBC_2.22 copysignl F
GLIBC_2.22 cos F
GLIBC_2.22 cosf F
GLIBC_2.22 cosh F
GLIBC_2.22 coshf F
GLIBC_2.22 coshl F
GLIBC_2.22 cosl F
GLIBC_2.22 cpow F
GLIBC_2.22 cpowf F
GLIBC_2.22 cpowl F
GLIBC_2.22 cproj F
GLIBC_2.22 cprojf F
GLIBC_2.22 cprojl F
GLIBC_2.22 creal F
GLIBC_2.22 crealf F
GLIBC_2.22 creall F
GLIBC_2.22 csin F
GLIBC_2.22 csinf F
GLIBC_2.22 csinh F
GLIBC_2.22 csinhf F
GLIBC_2.22 csinhl F
GLIBC_2.22 csinl F
GLIBC_2.22 csqrt F
GLIBC_2.22 csqrtf F
GLIBC_2.22 csqrtl F
GLIBC_2.22 ctan F
GLIBC_2.22 ctanf F
GLIBC_2.22 ctanh F
GLIBC_2.22 ctanhf F
GLIBC_2.22 ctanhl F
GLIBC_2.22 ctanl F
GLIBC_2.22 drem F
GLIBC_2.22 dremf F
GLIBC_2.22 dreml F
GLIBC_2.22 erf F
GLIBC_2.22 erfc F
GLIBC_2.22 erfcf F
GLIBC_2.22 erfcl F
GLIBC_2.22 erff F
GLIBC_2.22 erfl F
GLIBC_2.22 exp F
GLIBC_2.22 exp10 F
GLIBC_2.22 exp10f F
GLIBC_2.22 exp10l F
GLIBC_2.22 exp2 F
GLIBC_2.22 exp2f F
GLIBC_2.22 exp2l F
GLIBC_2.22 expf F
GLIBC_2.22 expl F
GLIBC_2.22 expm1 F
GLIBC_2.22 expm1f F
GLIBC_2.22 expm1l F
GLIBC_2.22 fabs F
GLIBC_2.22 fabsf F
GLIBC_2.22 fabsl F
GLIBC_2.22 fdim F
GLIBC_2.22 fdimf F
GLIBC_2.22 fdiml F
GLIBC_2.22 feclearexcept F
GLIBC_2.22 fedisableexcept F
GLIBC_2.22 feenableexcept F
GLIBC_2.22 fegetenv F
GLIBC_2.22 fegetexcept F
GLIBC_2.22 fegetexceptflag F
GLIBC_2.22 fegetround F
GLIBC_2.22 feholdexcept F
GLIBC_2.22 feraiseexcept F
GLIBC_2.22 fesetenv F
GLIBC_2.22 fesetexceptflag F
GLIBC_2.22 fesetround F
GLIBC_2.22 fetestexcept F
GLIBC_2.22 feupdateenv F
GLIBC_2.22 finite F
GLIBC_2.22 finitef F
GLIBC_2.22 finitel F
GLIBC_2.22 floor F
GLIBC_2.22 floorf F
GLIBC_2.22 floorl F
GLIBC_2.22 fma F
GLIBC_2.22 fmaf F
GLIBC_2.22 fmal F
GLIBC_2.22 fmax F
GLIBC_2.22 fmaxf F
GLIBC_2.22 fmaxl F
GLIBC_2.22 fmin F
GLIBC_2.22 fminf F
GLIBC_2.22 fminl F
GLIBC_2.22 fmod F
GLIBC_2.22 fmodf F
GLIBC_2.22 fmodl F
GLIBC_2.22 frexp F
GLIBC_2.22 frexpf F
GLIBC_2.22 frexpl F
GLIBC_2.22 gamma F
GLIBC_2.22 gammaf F
GLIBC_2.22 gammal F
GLIBC_2.22 hypot F
GLIBC_2.22 hypotf F
GLIBC_2.22 hypotl F
GLIBC_2.22 ilogb F
GLIBC_2.22 ilogbf F
GLIBC_2.22 ilogbl F
GLIBC_2.22 j0 F
GLIBC_2.22 j0f F
GLIBC_2.22 j0l F
GLIBC_2.22 j1 F
GLIBC_2.22 j1f F
GLIBC_2.22 j1l F
GLIBC_2.22 jn F
GLIBC_2.22 jnf F
GLIBC_2.22 jnl F
GLIBC_2.22 ldexp F
GLIBC_2.22 ldexpf F
GLIBC_2.22 ldexpl F
GLIBC_2.22 lgamma F
GLIBC_2.22 lgamma_r F
GLIBC_2.22 lgammaf F
GLIBC_2.22 lgammaf_r F
GLIBC_2.22 lgammal F
GLIBC_2.22 lgammal_r F
GLIBC_2.22 llrint F
GLIBC_2.22 llrintf F
GLIBC_2.22 llrintl F
GLIBC_2.22 llround F
GLIBC_2.22 llroundf F
GLIBC_2.22 llroundl F
GLIBC_2.22 log F
GLIBC_2.22 log10 F
GLIBC_2.22 log10f F
GLIBC_2.22 log10l F
GLIBC_2.22 log1p F
GLIBC_2.22 log1pf F
GLIBC_2.22 log1pl F
GLIBC_2.22 log2 F
GLIBC_2.22 log2f F
GLIBC_2.22 log2l F
GLIBC_2.22 logb F
GLIBC_2.22 logbf F
GLIBC_2.22 logbl F
GLIBC_2.22 logf F
GLIBC_2.22 logl F
GLIBC_2.22 lrint F
GLIBC_2.22 lrintf F
GLIBC_2.22 lrintl F
GLIBC_2.22 lround F
GLIBC_2.22 lroundf F
GLIBC_2.22 lroundl F
GLIBC_2.22 matherr F
GLIBC_2.22 modf F
GLIBC_2.22 modff F
GLIBC_2.22 modfl F
GLIBC_2.22 nan F
GLIBC_2.22 nanf F
GLIBC_2.22 nanl F
GLIBC_2.22 nearbyint F
GLIBC_2.22 nearbyintf F
GLIBC_2.22 nearbyintl F
GLIBC_2.22 nextafter F
GLIBC_2.22 nextafterf F
GLIBC_2.22 nextafterl F
GLIBC_2.22 nexttoward F
GLIBC_2.22 nexttowardf F
GLIBC_2.22 nexttowardl F
GLIBC_2.22 pow F
GLIBC_2.22 pow10 F
GLIBC_2.22 pow10f F
GLIBC_2.22 pow10l F
GLIBC_2.22 powf F
GLIBC_2.22 powl F
GLIBC_2.22 remainder F
GLIBC_2.22 remainderf F
GLIBC_2.22 remainderl F
GLIBC_2.22 remquo F
GLIBC_2.22 remquof F
GLIBC_2.22 remquol F
GLIBC_2.22 rint F
GLIBC_2.22 rintf F
GLIBC_2.22 rintl F
GLIBC_2.22 round F
GLIBC_2.22 roundf F
GLIBC_2.22 roundl F
GLIBC_2.22 scalb F
GLIBC_2.22 scalbf F
GLIBC_2.22 scalbl F
GLIBC_2.22 scalbln F
GLIBC_2.22 scalblnf F
GLIBC_2.22 scalblnl F
GLIBC_2.22 scalbn F
GLIBC_2.22 scalbnf F
GLIBC_2.22 scalbnl F
GLIBC_2.22 signgam D 0x4
GLIBC_2.22 significand F
GLIBC_2.22 significandf F
GLIBC_2.22 significandl F
GLIBC_2.22 sin F
GLIBC_2.22 sincos F
GLIBC_2.22 sincosf F
GLIBC_2.22 sincosl F
GLIBC_2.22 sinf F
GLIBC_2.22 sinh F
GLIBC_2.22 sinhf F
GLIBC_2.22 sinhl F
GLIBC_2.22 sinl F
GLIBC_2.22 sqrt F
GLIBC_2.22 sqrtf F
GLIBC_2.22 sqrtl F
GLIBC_2.22 tan F
GLIBC_2.22 tanf F
GLIBC_2.22 tanh F
GLIBC_2.22 tanhf F
GLIBC_2.22 tanhl F
GLIBC_2.22 tanl F
GLIBC_2.22 tgamma F
GLIBC_2.22 tgammaf F
GLIBC_2.22 tgammal F
GLIBC_2.22 trunc F
GLIBC_2.22 truncf F
GLIBC_2.22 truncl F
GLIBC_2.22 y0 F
GLIBC_2.22 y0f F
GLIBC_2.22 y0l F
GLIBC_2.22 y1 F
GLIBC_2.22 y1f F
GLIBC_2.22 y1l F
GLIBC_2.22 yn F
GLIBC_2.22 ynf F
GLIBC_2.22 ynl F
GLIBC_2.23 GLIBC_2.23 A
GLIBC_2.23 __signgam D 0x4
GLIBC_2.23 lgamma F
GLIBC_2.23 lgammaf F
GLIBC_2.23 lgammal F
GLIBC_2.24 GLIBC_2.24 A
GLIBC_2.24 nextdown F
GLIBC_2.24 nextdownf F
GLIBC_2.24 nextdownl F
GLIBC_2.24 nextup F
GLIBC_2.24 nextupf F
GLIBC_2.24 nextupl F
GLIBC_2.25 GLIBC_2.25 A
GLIBC_2.25 __iseqsig F
GLIBC_2.25 __iseqsigf F
GLIBC_2.25 canonicalize F
GLIBC_2.25 canonicalizef F
GLIBC_2.25 canonicalizel F
GLIBC_2.25 fegetmode F
GLIBC_2.25 fesetexcept F
GLIBC_2.25 fesetmode F
GLIBC_2.25 fetestexceptflag F
GLIBC_2.25 fmaxmag F
GLIBC_2.25 fmaxmagf F
GLIBC_2.25 fmaxmagl F
GLIBC_2.25 fminmag F
GLIBC_2.25 fminmagf F
GLIBC_2.25 fminmagl F
GLIBC_2.25 fromfp F
GLIBC_2.25 fromfpf F
GLIBC_2.25 fromfpl F
GLIBC_2.25 fromfpx F
GLIBC_2.25 fromfpxf F
GLIBC_2.25 fromfpxl F
GLIBC_2.25 getpayload F
GLIBC_2.25 getpayloadf F
GLIBC_2.25 getpayloadl F
GLIBC_2.25 llogb F
GLIBC_2.25 llogbf F
GLIBC_2.25 llogbl F
GLIBC_2.25 roundeven F
GLIBC_2.25 roundevenf F
GLIBC_2.25 roundevenl F
GLIBC_2.25 setpayload F
GLIBC_2.25 setpayloadf F
GLIBC_2.25 setpayloadl F
GLIBC_2.25 setpayloadsig F
GLIBC_2.25 setpayloadsigf F
GLIBC_2.25 setpayloadsigl F
GLIBC_2.25 totalorder F
GLIBC_2.25 totalorderf F
GLIBC_2.25 totalorderl F
GLIBC_2.25 totalordermag F
GLIBC_2.25 totalordermagf F
GLIBC_2.25 totalordermagl F
GLIBC_2.25 ufromfp F
GLIBC_2.25 ufromfpf F
GLIBC_2.25 ufromfpl F
GLIBC_2.25 ufromfpx F
GLIBC_2.25 ufromfpxf F
GLIBC_2.25 ufromfpxl F

View File

@ -1,175 +0,0 @@
GLIBC_2.22 GLIBC_2.22 A
GLIBC_2.22 _IO_flockfile F
GLIBC_2.22 _IO_ftrylockfile F
GLIBC_2.22 _IO_funlockfile F
GLIBC_2.22 __errno_location F
GLIBC_2.22 __h_errno_location F
GLIBC_2.22 __libc_allocate_rtsig F
GLIBC_2.22 __libc_current_sigrtmax F
GLIBC_2.22 __libc_current_sigrtmin F
GLIBC_2.22 __pthread_cleanup_routine F
GLIBC_2.22 __pthread_getspecific F
GLIBC_2.22 __pthread_key_create F
GLIBC_2.22 __pthread_mutex_destroy F
GLIBC_2.22 __pthread_mutex_init F
GLIBC_2.22 __pthread_mutex_lock F
GLIBC_2.22 __pthread_mutex_trylock F
GLIBC_2.22 __pthread_mutex_unlock F
GLIBC_2.22 __pthread_mutexattr_destroy F
GLIBC_2.22 __pthread_mutexattr_init F
GLIBC_2.22 __pthread_mutexattr_settype F
GLIBC_2.22 __pthread_once F
GLIBC_2.22 __pthread_register_cancel F
GLIBC_2.22 __pthread_register_cancel_defer F
GLIBC_2.22 __pthread_rwlock_destroy F
GLIBC_2.22 __pthread_rwlock_init F
GLIBC_2.22 __pthread_rwlock_rdlock F
GLIBC_2.22 __pthread_rwlock_tryrdlock F
GLIBC_2.22 __pthread_rwlock_trywrlock F
GLIBC_2.22 __pthread_rwlock_unlock F
GLIBC_2.22 __pthread_rwlock_wrlock F
GLIBC_2.22 __pthread_setspecific F
GLIBC_2.22 __pthread_unregister_cancel F
GLIBC_2.22 __pthread_unregister_cancel_restore F
GLIBC_2.22 __pthread_unwind_next F
GLIBC_2.22 __res_state F
GLIBC_2.22 _pthread_cleanup_pop F
GLIBC_2.22 _pthread_cleanup_pop_restore F
GLIBC_2.22 _pthread_cleanup_push F
GLIBC_2.22 _pthread_cleanup_push_defer F
GLIBC_2.22 flockfile F
GLIBC_2.22 ftrylockfile F
GLIBC_2.22 funlockfile F
GLIBC_2.22 pthread_attr_destroy F
GLIBC_2.22 pthread_attr_getaffinity_np F
GLIBC_2.22 pthread_attr_getdetachstate F
GLIBC_2.22 pthread_attr_getguardsize F
GLIBC_2.22 pthread_attr_getinheritsched F
GLIBC_2.22 pthread_attr_getschedparam F
GLIBC_2.22 pthread_attr_getschedpolicy F
GLIBC_2.22 pthread_attr_getscope F
GLIBC_2.22 pthread_attr_getstack F
GLIBC_2.22 pthread_attr_getstackaddr F
GLIBC_2.22 pthread_attr_getstacksize F
GLIBC_2.22 pthread_attr_init F
GLIBC_2.22 pthread_attr_setaffinity_np F
GLIBC_2.22 pthread_attr_setdetachstate F
GLIBC_2.22 pthread_attr_setguardsize F
GLIBC_2.22 pthread_attr_setinheritsched F
GLIBC_2.22 pthread_attr_setschedparam F
GLIBC_2.22 pthread_attr_setschedpolicy F
GLIBC_2.22 pthread_attr_setscope F
GLIBC_2.22 pthread_attr_setstack F
GLIBC_2.22 pthread_attr_setstackaddr F
GLIBC_2.22 pthread_attr_setstacksize F
GLIBC_2.22 pthread_barrier_destroy F
GLIBC_2.22 pthread_barrier_init F
GLIBC_2.22 pthread_barrier_wait F
GLIBC_2.22 pthread_barrierattr_destroy F
GLIBC_2.22 pthread_barrierattr_getpshared F
GLIBC_2.22 pthread_barrierattr_init F
GLIBC_2.22 pthread_barrierattr_setpshared F
GLIBC_2.22 pthread_cancel F
GLIBC_2.22 pthread_cond_broadcast F
GLIBC_2.22 pthread_cond_destroy F
GLIBC_2.22 pthread_cond_init F
GLIBC_2.22 pthread_cond_signal F
GLIBC_2.22 pthread_cond_timedwait F
GLIBC_2.22 pthread_cond_wait F
GLIBC_2.22 pthread_condattr_destroy F
GLIBC_2.22 pthread_condattr_getclock F
GLIBC_2.22 pthread_condattr_getpshared F
GLIBC_2.22 pthread_condattr_init F
GLIBC_2.22 pthread_condattr_setclock F
GLIBC_2.22 pthread_condattr_setpshared F
GLIBC_2.22 pthread_create F
GLIBC_2.22 pthread_detach F
GLIBC_2.22 pthread_equal F
GLIBC_2.22 pthread_exit F
GLIBC_2.22 pthread_getaffinity_np F
GLIBC_2.22 pthread_getattr_default_np F
GLIBC_2.22 pthread_getattr_np F
GLIBC_2.22 pthread_getconcurrency F
GLIBC_2.22 pthread_getcpuclockid F
GLIBC_2.22 pthread_getname_np F
GLIBC_2.22 pthread_getschedparam F
GLIBC_2.22 pthread_getspecific F
GLIBC_2.22 pthread_join F
GLIBC_2.22 pthread_key_create F
GLIBC_2.22 pthread_key_delete F
GLIBC_2.22 pthread_kill F
GLIBC_2.22 pthread_kill_other_threads_np F
GLIBC_2.22 pthread_mutex_consistent F
GLIBC_2.22 pthread_mutex_consistent_np F
GLIBC_2.22 pthread_mutex_destroy F
GLIBC_2.22 pthread_mutex_getprioceiling F
GLIBC_2.22 pthread_mutex_init F
GLIBC_2.22 pthread_mutex_lock F
GLIBC_2.22 pthread_mutex_setprioceiling F
GLIBC_2.22 pthread_mutex_timedlock F
GLIBC_2.22 pthread_mutex_trylock F
GLIBC_2.22 pthread_mutex_unlock F
GLIBC_2.22 pthread_mutexattr_destroy F
GLIBC_2.22 pthread_mutexattr_getkind_np F
GLIBC_2.22 pthread_mutexattr_getprioceiling F
GLIBC_2.22 pthread_mutexattr_getprotocol F
GLIBC_2.22 pthread_mutexattr_getpshared F
GLIBC_2.22 pthread_mutexattr_getrobust F
GLIBC_2.22 pthread_mutexattr_getrobust_np F
GLIBC_2.22 pthread_mutexattr_gettype F
GLIBC_2.22 pthread_mutexattr_init F
GLIBC_2.22 pthread_mutexattr_setkind_np F
GLIBC_2.22 pthread_mutexattr_setprioceiling F
GLIBC_2.22 pthread_mutexattr_setprotocol F
GLIBC_2.22 pthread_mutexattr_setpshared F
GLIBC_2.22 pthread_mutexattr_setrobust F
GLIBC_2.22 pthread_mutexattr_setrobust_np F
GLIBC_2.22 pthread_mutexattr_settype F
GLIBC_2.22 pthread_once F
GLIBC_2.22 pthread_rwlock_destroy F
GLIBC_2.22 pthread_rwlock_init F
GLIBC_2.22 pthread_rwlock_rdlock F
GLIBC_2.22 pthread_rwlock_timedrdlock F
GLIBC_2.22 pthread_rwlock_timedwrlock F
GLIBC_2.22 pthread_rwlock_tryrdlock F
GLIBC_2.22 pthread_rwlock_trywrlock F
GLIBC_2.22 pthread_rwlock_unlock F
GLIBC_2.22 pthread_rwlock_wrlock F
GLIBC_2.22 pthread_rwlockattr_destroy F
GLIBC_2.22 pthread_rwlockattr_getkind_np F
GLIBC_2.22 pthread_rwlockattr_getpshared F
GLIBC_2.22 pthread_rwlockattr_init F
GLIBC_2.22 pthread_rwlockattr_setkind_np F
GLIBC_2.22 pthread_rwlockattr_setpshared F
GLIBC_2.22 pthread_self F
GLIBC_2.22 pthread_setaffinity_np F
GLIBC_2.22 pthread_setattr_default_np F
GLIBC_2.22 pthread_setcancelstate F
GLIBC_2.22 pthread_setcanceltype F
GLIBC_2.22 pthread_setconcurrency F
GLIBC_2.22 pthread_setname_np F
GLIBC_2.22 pthread_setschedparam F
GLIBC_2.22 pthread_setschedprio F
GLIBC_2.22 pthread_setspecific F
GLIBC_2.22 pthread_sigmask F
GLIBC_2.22 pthread_sigqueue F
GLIBC_2.22 pthread_spin_destroy F
GLIBC_2.22 pthread_spin_init F
GLIBC_2.22 pthread_spin_lock F
GLIBC_2.22 pthread_spin_trylock F
GLIBC_2.22 pthread_spin_unlock F
GLIBC_2.22 pthread_testcancel F
GLIBC_2.22 pthread_timedjoin_np F
GLIBC_2.22 pthread_tryjoin_np F
GLIBC_2.22 pthread_yield F
GLIBC_2.22 raise F
GLIBC_2.22 sem_close F
GLIBC_2.22 sem_destroy F
GLIBC_2.22 sem_getvalue F
GLIBC_2.22 sem_init F
GLIBC_2.22 sem_open F
GLIBC_2.22 sem_post F
GLIBC_2.22 sem_timedwait F
GLIBC_2.22 sem_trywait F
GLIBC_2.22 sem_unlink F
GLIBC_2.22 sem_wait F

View File

@ -1,92 +0,0 @@
GLIBC_2.22 GLIBC_2.22 A
GLIBC_2.22 __b64_ntop F
GLIBC_2.22 __b64_pton F
GLIBC_2.22 __dn_comp F
GLIBC_2.22 __dn_count_labels F
GLIBC_2.22 __dn_expand F
GLIBC_2.22 __dn_skipname F
GLIBC_2.22 __fp_nquery F
GLIBC_2.22 __fp_query F
GLIBC_2.22 __fp_resstat F
GLIBC_2.22 __hostalias F
GLIBC_2.22 __loc_aton F
GLIBC_2.22 __loc_ntoa F
GLIBC_2.22 __p_cdname F
GLIBC_2.22 __p_cdnname F
GLIBC_2.22 __p_class F
GLIBC_2.22 __p_class_syms D 0x54
GLIBC_2.22 __p_fqname F
GLIBC_2.22 __p_fqnname F
GLIBC_2.22 __p_option F
GLIBC_2.22 __p_query F
GLIBC_2.22 __p_rcode F
GLIBC_2.22 __p_secstodate F
GLIBC_2.22 __p_time F
GLIBC_2.22 __p_type F
GLIBC_2.22 __p_type_syms D 0x228
GLIBC_2.22 __putlong F
GLIBC_2.22 __putshort F
GLIBC_2.22 __res_close F
GLIBC_2.22 __res_dnok F
GLIBC_2.22 __res_hnok F
GLIBC_2.22 __res_hostalias F
GLIBC_2.22 __res_isourserver F
GLIBC_2.22 __res_mailok F
GLIBC_2.22 __res_mkquery F
GLIBC_2.22 __res_nameinquery F
GLIBC_2.22 __res_nmkquery F
GLIBC_2.22 __res_nquery F
GLIBC_2.22 __res_nquerydomain F
GLIBC_2.22 __res_nsearch F
GLIBC_2.22 __res_nsend F
GLIBC_2.22 __res_ownok F
GLIBC_2.22 __res_queriesmatch F
GLIBC_2.22 __res_query F
GLIBC_2.22 __res_querydomain F
GLIBC_2.22 __res_search F
GLIBC_2.22 __res_send F
GLIBC_2.22 __sym_ntop F
GLIBC_2.22 __sym_ntos F
GLIBC_2.22 __sym_ston F
GLIBC_2.22 _gethtbyaddr F
GLIBC_2.22 _gethtbyname F
GLIBC_2.22 _gethtbyname2 F
GLIBC_2.22 _gethtent F
GLIBC_2.22 _getlong F
GLIBC_2.22 _getshort F
GLIBC_2.22 _res_opcodes D 0x40
GLIBC_2.22 _sethtent F
GLIBC_2.22 inet_net_ntop F
GLIBC_2.22 inet_net_pton F
GLIBC_2.22 inet_neta F
GLIBC_2.22 ns_datetosecs F
GLIBC_2.22 ns_format_ttl F
GLIBC_2.22 ns_get16 F
GLIBC_2.22 ns_get32 F
GLIBC_2.22 ns_initparse F
GLIBC_2.22 ns_makecanon F
GLIBC_2.22 ns_msg_getflag F
GLIBC_2.22 ns_name_compress F
GLIBC_2.22 ns_name_ntol F
GLIBC_2.22 ns_name_ntop F
GLIBC_2.22 ns_name_pack F
GLIBC_2.22 ns_name_pton F
GLIBC_2.22 ns_name_rollback F
GLIBC_2.22 ns_name_skip F
GLIBC_2.22 ns_name_uncompress F
GLIBC_2.22 ns_name_unpack F
GLIBC_2.22 ns_parse_ttl F
GLIBC_2.22 ns_parserr F
GLIBC_2.22 ns_put16 F
GLIBC_2.22 ns_put32 F
GLIBC_2.22 ns_samedomain F
GLIBC_2.22 ns_samename F
GLIBC_2.22 ns_skiprr F
GLIBC_2.22 ns_sprintrr F
GLIBC_2.22 ns_sprintrrf F
GLIBC_2.22 ns_subdomain F
GLIBC_2.22 res_gethostbyaddr F
GLIBC_2.22 res_gethostbyname F
GLIBC_2.22 res_gethostbyname2 F
GLIBC_2.22 res_send_setqhook F
GLIBC_2.22 res_send_setrhook F

View File

@ -1,36 +0,0 @@
GLIBC_2.22 GLIBC_2.22 A
GLIBC_2.22 __mq_open_2 F
GLIBC_2.22 aio_cancel F
GLIBC_2.22 aio_cancel64 F
GLIBC_2.22 aio_error F
GLIBC_2.22 aio_error64 F
GLIBC_2.22 aio_fsync F
GLIBC_2.22 aio_fsync64 F
GLIBC_2.22 aio_init F
GLIBC_2.22 aio_read F
GLIBC_2.22 aio_read64 F
GLIBC_2.22 aio_return F
GLIBC_2.22 aio_return64 F
GLIBC_2.22 aio_suspend F
GLIBC_2.22 aio_suspend64 F
GLIBC_2.22 aio_write F
GLIBC_2.22 aio_write64 F
GLIBC_2.22 lio_listio F
GLIBC_2.22 lio_listio64 F
GLIBC_2.22 mq_close F
GLIBC_2.22 mq_getattr F
GLIBC_2.22 mq_notify F
GLIBC_2.22 mq_open F
GLIBC_2.22 mq_receive F
GLIBC_2.22 mq_send F
GLIBC_2.22 mq_setattr F
GLIBC_2.22 mq_timedreceive F
GLIBC_2.22 mq_timedsend F
GLIBC_2.22 mq_unlink F
GLIBC_2.22 shm_open F
GLIBC_2.22 shm_unlink F
GLIBC_2.22 timer_create F
GLIBC_2.22 timer_delete F
GLIBC_2.22 timer_getoverrun F
GLIBC_2.22 timer_gettime F
GLIBC_2.22 timer_settime F

View File

@ -1,7 +0,0 @@
GLIBC_2.22 GLIBC_2.22 A
GLIBC_2.22 forkpty F
GLIBC_2.22 login F
GLIBC_2.22 login_tty F
GLIBC_2.22 logout F
GLIBC_2.22 logwtmp F
GLIBC_2.22 openpty F

View File

@ -1,28 +0,0 @@
/* Make a hard link. NaCl version.
Copyright (C) 2015-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#include <unistd.h>
#include <nacl-interfaces.h>
/* Make a link to FROM called TO. */
int
__link (const char *from, const char *to)
{
return NACL_CALL (__nacl_irt_dev_filename.link (from, to), 0);
}
weak_alias (__link, link)

View File

@ -1,53 +0,0 @@
/* Timed low level locking for pthread library. NaCl version.
Copyright (C) 2015-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#include <assert.h>
#include <atomic.h>
#include <errno.h>
#include <lowlevellock.h>
#include <sys/time.h>
/* This behaves the same as the generic version in nptl/. It's simpler
because it doesn't need to convert an absolute timeout to a relative
one (and back again in the lll_futex_timed_wait macro). */
int
__lll_timedlock_wait (int *futex, const struct timespec *abstime, int private)
{
/* Reject invalid timeouts. */
if (__glibc_unlikely (abstime->tv_nsec < 0)
|| __glibc_unlikely (abstime->tv_nsec >= 1000000000))
return EINVAL;
/* Try locking. */
while (atomic_exchange_acq (futex, 2) != 0)
{
/* If *futex == 2, wait until woken or timeout. */
int err = __nacl_irt_futex.futex_wait_abs ((volatile int *) futex, 2,
abstime);
if (err != 0)
{
if (__glibc_likely (err == ETIMEDOUT))
return err;
assert (err == EAGAIN);
}
}
return 0;
}

View File

@ -1,61 +0,0 @@
/* Timed waiting for thread death. NaCl version.
Copyright (C) 2015-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#include <assert.h>
#include <atomic.h>
#include <errno.h>
#include <lowlevellock.h>
#include <sys/time.h>
int
__lll_timedwait_tid (int *tidp, const struct timespec *abstime)
{
/* Reject invalid timeouts. */
if (__glibc_unlikely (abstime->tv_nsec < 0)
|| __glibc_unlikely (abstime->tv_nsec >= 1000000000))
return EINVAL;
/* Repeat until thread terminated. */
int tid;
while ((tid = atomic_load_relaxed (tidp)) != 0)
{
/* See exit-thread.h for details. */
if (tid == NACL_EXITING_TID)
/* The thread should now be in the process of exiting, so it will
finish quick enough that the timeout doesn't matter. If any
thread ever stays in this state for long, there is something
catastrophically wrong. */
atomic_spin_nop ();
else
{
assert (tid > 0);
/* If *FUTEX == TID, wait until woken or timeout. */
int err = __nacl_irt_futex.futex_wait_abs ((volatile int *) tidp,
tid, abstime);
if (err != 0)
{
if (__glibc_likely (err == ETIMEDOUT))
return err;
assert (err == EAGAIN);
}
}
}
return 0;
}

Some files were not shown because too many files have changed in this diff Show More