unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [RFC PATCH v3 00/12] port C-SKY to glibc
@ 2018-06-29  7:58 Mao Han
  2018-06-29  7:58 ` [RFC PATCH v3 01/12] C-SKY: ABI related code Mao Han
                   ` (11 more replies)
  0 siblings, 12 replies; 22+ messages in thread
From: Mao Han @ 2018-06-29  7:58 UTC (permalink / raw
  To: libc-alpha; +Cc: Mao Han, c-sky_gcc_upstream, gnu-csky

It is the third RFC patchset for C-SKY port. Base on commit 
1c09524e4db3efd797ebcfcd8241bdb78f0b06f0 (6 Jun). Three abi combinations
are supported with this patch: C-SKY ABIV2 with (soft float & little endian,
hard float & little endian, soft float & big endian). CK807(ef), CK810(ef),
CK860 are the accroding supported processor cores to the C-SKY V2 abi;
f stands for FPU co-processor; e stands for DSP co-processor. Our 
gcc/binutil/linux upstream are still on going, so there maight be a quite
long time before glibc ready to get in. This patchset can not used for
real build as the arch_minimum_kernel set to 4.1x and the dynamic linker names
, EM_ number are different with the one in gcc. This patchset base
on gcc(6.3), binutil(2.27), linux(4.16), which have not updated to the latest
version yet. They can be found in our private git repository:

1. GCC git repo path:
https://github.com/c-sky/gcc
2. Binutils git repo path:
https://github.com/c-sky/binutils-gdb
3. Linux git repo path
https://github.com/c-sky/csky-linux

IFUNC, ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA, static PIE is not support
with this patchset.

The patchset is cross-tested on qemu system mode as some 
testscase(like sort-test) needquite large memory space, and I have not
got any board with ram larger than 1GB.
 
FAIL: elf/check-textrel
FAIL: elf/tst-prelink-cmp
FAIL: gmon/tst-gmon-gprof
FAIL: gmon/tst-gmon-pie-gprof
FAIL: gmon/tst-gmon-static-gprof
FAIL: malloc/tst-malloc-usable-tunables
UNSUPPORTED: malloc/tst-mallocstate
UNSUPPORTED: math/test-fesetexcept-traps
UNSUPPORTED: math/test-fexcept-traps
UNSUPPORTED: math/test-matherr
UNSUPPORTED: math/test-matherr-2
UNSUPPORTED: math/test-nearbyint-except
UNSUPPORTED: math/test-nearbyint-except-2
FAIL: misc/tst-clone3
UNSUPPORTED: misc/tst-pkey
UNSUPPORTED: misc/tst-ttyname
UNSUPPORTED: nptl/test-cond-printers
UNSUPPORTED: nptl/test-condattr-printers
UNSUPPORTED: nptl/test-mutex-printers
UNSUPPORTED: nptl/test-mutexattr-printers
UNSUPPORTED: nptl/test-rwlock-printers
UNSUPPORTED: nptl/test-rwlockattr-printers
FAIL: nptl/tst-_res1
FAIL: nptl/tst-thread_local1
UNSUPPORTED: posix/tst-glob_lstat_compat
UNSUPPORTED: posix/tst-sysconf-empty-chroot
UNSUPPORTED: resolv/tst-p_secstodate
UNSUPPORTED: resolv/tst-resolv-ai_idn
UNSUPPORTED: resolv/tst-resolv-ai_idn-latin1
UNSUPPORTED: resolv/tst-resolv-res_init
UNSUPPORTED: resolv/tst-resolv-res_init-thread
UNSUPPORTED: resolv/tst-resolv-threads
UNSUPPORTED: stdlib/test-bz22786
UNSUPPORTED: string/test-bcopy
UNSUPPORTED: string/test-memmove
FAIL: sunrpc/bug20790
UNSUPPORTED: time/tst-y2039
ummary of test results:
     10 FAIL
   4958 PASS
     27 UNSUPPORTED
     18 XFAIL

Detail result:
https://github.com/c-sky/test-result/blob/master/glibc/glibc_2.28_patch_v3_807_test_result.tar.gz

FAIL cases:
1. The following three cases will include f3 in the result:
   gmon/tst-gmon-gprof
   gmon/tst-gmon-pie-gprof
   gmon/tst-gmon-static-gprof
   I can not understand why f3 should not present here, and could not find root
   casue of it. 
--- expected
+++ actual
@@ -1,3 +1,4 @@
 f1 2000
 f2 1000
+f3 1
 main 1
FAIL

2. elf/tst-prelink-cmp
   symbol stdout is expect to be conflict here. I can not understand this
   case too.

3. The following three cases some time get into deadlock when the child
   return before the parent thread start to wait. I don know what is
   the expect behaviour under this condition.
   misc/tst-clone3
   tst-mallocfork
   tst-mallocfork2

4. nptl/tst-thread_local1
   seems lack c++ thread local support, have not found root casue of it.

4. sunrpc/bug20790
   It fails because the testing environment lacks native cpp

5. elf/check-textrel
   It fails because linker mark the symbol reference in eh-frame as textrel.
   Wait for our binutil to fix it.

6. malloc/tst-malloc-usable-tunables
   It fails because liunx use mmap to alloc space for vdso and cause brk
   fail. Wait for our linux kernel to fix it.

7. nptl/tst-_res1
   It fails because symbol _res static linked in the same file.
   Wait for our binutil to fix it.

Hard float will cause a lot of testcases fail as our fpu can not caculate
denormal values. The hardware will flush input denormal values to zero or
the smallest float number before caculation when the denormal exception
is not enable. Our QEMU does the similar thing like the hardware. I don't
know is that ok to just make QEMU can deal with denormal caculation, or I 
need denormal exception handling in linux kernel like arm does.

The test for big endian have not done yet, and will be added in
the next patch.

Changes since v2:
  - update the abilist
  - update ulps
  - cleanup unnecessary linux syscall
  - remove support for ABIV1
  - add one-line description for many files
  - put ABIV2 code into seperate folder
  - cleanup ucontext.h namespace
  - cleanup linux/csky/Version
  - add with_fp_cond support to distinguish soft float
  - remove PF_X in stackinfo
  - add abi check in preconfigure
  - support build-many-glibcs.py
  - fix pointer guard acquisition

Changes since v1:
  - update the changelog format
  - clean up unnecessary legacy code and odd comments
  - add rel description and fix EM_CSKY check
  - remove some arch-specific implementation
  - remove DEPRECATED linux syscall support
  - support pointer mangling

Mao Han (12):
  C-SKY: ABI related code
  C-SKY: TLS support
  C-SKY: Generic math Routines
  C-SKY: Hard Float Support
  C-SKY: Atomic and Locking Routines
  C-SKY: Linux Syscall Interface
  C-SKY: Linux ABI
  C-SKY: ABI Lists
  C-SKY: Linux Startup and Dynamic Loading Code
  C-SKY: Build Infastructure
  C-SKY: Add build-many-glibcs.py support
  C-SKY: Skeleton documentation

 ChangeLog                                          |  144 ++
 NEWS                                               |    3 +
 README                                             |    1 +
 elf/elf.h                                          |   67 +-
 scripts/build-many-glibcs.py                       |    7 +
 sysdeps/csky/Implies                               |    4 +
 sysdeps/csky/Makefile                              |   13 +
 sysdeps/csky/abiv2/__longjmp.S                     |   61 +
 sysdeps/csky/abiv2/csky-mcount.S                   |   62 +
 sysdeps/csky/abiv2/dl-trampoline.S                 |   48 +
 sysdeps/csky/abiv2/memcpy.S                        |  205 ++
 sysdeps/csky/abiv2/setjmp.S                        |   77 +
 sysdeps/csky/abiv2/start.S                         |  115 ++
 sysdeps/csky/abiv2/strcmp.S                        |  187 ++
 sysdeps/csky/abiv2/strcpy.S                        |  138 ++
 sysdeps/csky/abiv2/tls-macros.h                    |   55 +
 sysdeps/csky/abort-instr.h                         |    2 +
 sysdeps/csky/atomic-machine.h                      |   97 +
 sysdeps/csky/bits/endian.h                         |   10 +
 sysdeps/csky/bits/fenv.h                           |   92 +
 sysdeps/csky/bits/link.h                           |   55 +
 sysdeps/csky/bits/setjmp.h                         |   34 +
 sysdeps/csky/bsd-_setjmp.S                         |    1 +
 sysdeps/csky/bsd-setjmp.S                          |    1 +
 sysdeps/csky/configure                             |    4 +
 sysdeps/csky/configure.ac                          |    4 +
 sysdeps/csky/crti.S                                |   96 +
 sysdeps/csky/crtn.S                                |   50 +
 sysdeps/csky/dl-machine.h                          |  364 ++++
 sysdeps/csky/dl-procinfo.c                         |   62 +
 sysdeps/csky/dl-procinfo.h                         |   59 +
 sysdeps/csky/dl-sysdep.h                           |   23 +
 sysdeps/csky/dl-tls.h                              |   26 +
 sysdeps/csky/fpu/fclrexcpt.c                       |   42 +
 sysdeps/csky/fpu/fedisblxcpt.c                     |   41 +
 sysdeps/csky/fpu/feenablxcpt.c                     |   40 +
 sysdeps/csky/fpu/fegetenv.c                        |   37 +
 sysdeps/csky/fpu/fegetexcept.c                     |   32 +
 sysdeps/csky/fpu/fegetmode.c                       |   28 +
 sysdeps/csky/fpu/fegetround.c                      |   34 +
 sysdeps/csky/fpu/feholdexcpt.c                     |   34 +
 sysdeps/csky/fpu/fenv_libc.h                       |   30 +
 sysdeps/csky/fpu/fenv_private.h                    |  284 +++
 sysdeps/csky/fpu/fesetenv.c                        |   59 +
 sysdeps/csky/fpu/fesetexcept.c                     |   33 +
 sysdeps/csky/fpu/fesetmode.c                       |   33 +
 sysdeps/csky/fpu/fesetround.c                      |   32 +
 sysdeps/csky/fpu/feupdateenv.c                     |   46 +
 sysdeps/csky/fpu/fgetexcptflg.c                    |   32 +
 sysdeps/csky/fpu/fpu_control.h                     |  133 ++
 sysdeps/csky/fpu/fraiseexcpt.c                     |  126 ++
 sysdeps/csky/fpu/fsetexcptflg.c                    |   43 +
 sysdeps/csky/fpu/ftestexcept.c                     |   30 +
 sysdeps/csky/fpu/math_private.h                    |    7 +
 sysdeps/csky/gccframe.h                            |   21 +
 sysdeps/csky/jmpbuf-unwind.h                       |   48 +
 sysdeps/csky/ldsodefs.h                            |   42 +
 sysdeps/csky/libc-tls.c                            |   32 +
 sysdeps/csky/libm-test-ulps                        | 1694 ++++++++++++++++
 sysdeps/csky/libm-test-ulps-name                   |    1 +
 sysdeps/csky/linkmap.h                             |    4 +
 sysdeps/csky/machine-gmon.h                        |   32 +
 sysdeps/csky/math-tests.h                          |   32 +
 sysdeps/csky/memusage.h                            |   21 +
 sysdeps/csky/nofpu/Implies                         |    1 +
 sysdeps/csky/nptl/Makefile                         |   20 +
 sysdeps/csky/nptl/bits/pthreadtypes-arch.h         |   70 +
 sysdeps/csky/nptl/bits/semaphore.h                 |   35 +
 sysdeps/csky/nptl/pthread-offsets.h                |    5 +
 sysdeps/csky/nptl/pthreaddef.h                     |   32 +
 sysdeps/csky/nptl/tcb-offsets.sym                  |   10 +
 sysdeps/csky/nptl/tls.h                            |  156 ++
 sysdeps/csky/preconfigure                          |   37 +
 sysdeps/csky/sfp-machine.h                         |   50 +
 sysdeps/csky/sotruss-lib.c                         |   49 +
 sysdeps/csky/stackinfo.h                           |   29 +
 sysdeps/csky/sysdep.h                              |   45 +
 sysdeps/csky/tst-audit.h                           |   23 +
 sysdeps/unix/sysv/linux/csky/Implies               |    3 +
 sysdeps/unix/sysv/linux/csky/Makefile              |    8 +
 sysdeps/unix/sysv/linux/csky/Versions              |    5 +
 .../unix/sysv/linux/csky/abiv2/____longjmp_chk.S   |   81 +
 sysdeps/unix/sysv/linux/csky/abiv2/clone.S         |   88 +
 sysdeps/unix/sysv/linux/csky/abiv2/getcontext.S    |   73 +
 sysdeps/unix/sysv/linux/csky/abiv2/setcontext.S    |   96 +
 sysdeps/unix/sysv/linux/csky/abiv2/swapcontext.S   |   78 +
 sysdeps/unix/sysv/linux/csky/abiv2/syscall.S       |   61 +
 sysdeps/unix/sysv/linux/csky/abiv2/sysdep.S        |   65 +
 sysdeps/unix/sysv/linux/csky/abiv2/ucontext_i.sym  |   32 +
 sysdeps/unix/sysv/linux/csky/bits/mman.h           |   44 +
 sysdeps/unix/sysv/linux/csky/bits/shm.h            |  103 +
 sysdeps/unix/sysv/linux/csky/c++-types.data        |   67 +
 sysdeps/unix/sysv/linux/csky/configure             |    4 +
 sysdeps/unix/sysv/linux/csky/configure.ac          |    5 +
 sysdeps/unix/sysv/linux/csky/ipc_priv.h            |   21 +
 sysdeps/unix/sysv/linux/csky/jmp_buf-macros.h      |    6 +
 sysdeps/unix/sysv/linux/csky/kernel-features.h     |   23 +
 sysdeps/unix/sysv/linux/csky/ld.abilist            |    9 +
 sysdeps/unix/sysv/linux/csky/ldconfig.h            |   34 +
 .../unix/sysv/linux/csky/libBrokenLocale.abilist   |    1 +
 sysdeps/unix/sysv/linux/csky/libanl.abilist        |    4 +
 sysdeps/unix/sysv/linux/csky/libc.abilist          | 2079 ++++++++++++++++++++
 sysdeps/unix/sysv/linux/csky/libcrypt.abilist      |    7 +
 sysdeps/unix/sysv/linux/csky/libdl.abilist         |    9 +
 sysdeps/unix/sysv/linux/csky/libm.abilist          |  753 +++++++
 sysdeps/unix/sysv/linux/csky/libnsl.abilist        |  120 ++
 sysdeps/unix/sysv/linux/csky/libpthread.abilist    |  216 ++
 sysdeps/unix/sysv/linux/csky/libresolv.abilist     |   79 +
 sysdeps/unix/sysv/linux/csky/librt.abilist         |   35 +
 sysdeps/unix/sysv/linux/csky/libthread_db.abilist  |   40 +
 sysdeps/unix/sysv/linux/csky/libutil.abilist       |    6 +
 sysdeps/unix/sysv/linux/csky/localplt.data         |   19 +
 sysdeps/unix/sysv/linux/csky/makecontext.c         |   78 +
 sysdeps/unix/sysv/linux/csky/profil-counter.h      |   31 +
 sysdeps/unix/sysv/linux/csky/pt-vfork.S            |    1 +
 sysdeps/unix/sysv/linux/csky/register-dump.h       |  183 ++
 sysdeps/unix/sysv/linux/csky/shlib-versions        |    9 +
 sysdeps/unix/sysv/linux/csky/sigcontextinfo.h      |   38 +
 sysdeps/unix/sysv/linux/csky/sys/cachectl.h        |   38 +
 sysdeps/unix/sysv/linux/csky/sys/procfs.h          |  123 ++
 sysdeps/unix/sysv/linux/csky/sys/ucontext.h        |   97 +
 sysdeps/unix/sysv/linux/csky/sys/user.h            |   65 +
 sysdeps/unix/sysv/linux/csky/syscalls.list         |    2 +
 sysdeps/unix/sysv/linux/csky/sysdep.h              |  596 ++++++
 124 files changed, 11366 insertions(+), 1 deletion(-)
 create mode 100644 sysdeps/csky/Implies
 create mode 100644 sysdeps/csky/Makefile
 create mode 100644 sysdeps/csky/abiv2/__longjmp.S
 create mode 100644 sysdeps/csky/abiv2/csky-mcount.S
 create mode 100644 sysdeps/csky/abiv2/dl-trampoline.S
 create mode 100644 sysdeps/csky/abiv2/memcpy.S
 create mode 100644 sysdeps/csky/abiv2/setjmp.S
 create mode 100644 sysdeps/csky/abiv2/start.S
 create mode 100644 sysdeps/csky/abiv2/strcmp.S
 create mode 100644 sysdeps/csky/abiv2/strcpy.S
 create mode 100644 sysdeps/csky/abiv2/tls-macros.h
 create mode 100644 sysdeps/csky/abort-instr.h
 create mode 100644 sysdeps/csky/atomic-machine.h
 create mode 100644 sysdeps/csky/bits/endian.h
 create mode 100644 sysdeps/csky/bits/fenv.h
 create mode 100644 sysdeps/csky/bits/link.h
 create mode 100644 sysdeps/csky/bits/setjmp.h
 create mode 100644 sysdeps/csky/bsd-_setjmp.S
 create mode 100644 sysdeps/csky/bsd-setjmp.S
 create mode 100644 sysdeps/csky/configure
 create mode 100644 sysdeps/csky/configure.ac
 create mode 100644 sysdeps/csky/crti.S
 create mode 100644 sysdeps/csky/crtn.S
 create mode 100644 sysdeps/csky/dl-machine.h
 create mode 100644 sysdeps/csky/dl-procinfo.c
 create mode 100644 sysdeps/csky/dl-procinfo.h
 create mode 100644 sysdeps/csky/dl-sysdep.h
 create mode 100644 sysdeps/csky/dl-tls.h
 create mode 100644 sysdeps/csky/fpu/fclrexcpt.c
 create mode 100644 sysdeps/csky/fpu/fedisblxcpt.c
 create mode 100644 sysdeps/csky/fpu/feenablxcpt.c
 create mode 100644 sysdeps/csky/fpu/fegetenv.c
 create mode 100644 sysdeps/csky/fpu/fegetexcept.c
 create mode 100644 sysdeps/csky/fpu/fegetmode.c
 create mode 100644 sysdeps/csky/fpu/fegetround.c
 create mode 100644 sysdeps/csky/fpu/feholdexcpt.c
 create mode 100644 sysdeps/csky/fpu/fenv_libc.h
 create mode 100644 sysdeps/csky/fpu/fenv_private.h
 create mode 100644 sysdeps/csky/fpu/fesetenv.c
 create mode 100644 sysdeps/csky/fpu/fesetexcept.c
 create mode 100644 sysdeps/csky/fpu/fesetmode.c
 create mode 100644 sysdeps/csky/fpu/fesetround.c
 create mode 100644 sysdeps/csky/fpu/feupdateenv.c
 create mode 100644 sysdeps/csky/fpu/fgetexcptflg.c
 create mode 100644 sysdeps/csky/fpu/fpu_control.h
 create mode 100644 sysdeps/csky/fpu/fraiseexcpt.c
 create mode 100644 sysdeps/csky/fpu/fsetexcptflg.c
 create mode 100644 sysdeps/csky/fpu/ftestexcept.c
 create mode 100644 sysdeps/csky/fpu/math_private.h
 create mode 100644 sysdeps/csky/gccframe.h
 create mode 100644 sysdeps/csky/jmpbuf-unwind.h
 create mode 100644 sysdeps/csky/ldsodefs.h
 create mode 100644 sysdeps/csky/libc-tls.c
 create mode 100644 sysdeps/csky/libm-test-ulps
 create mode 100644 sysdeps/csky/libm-test-ulps-name
 create mode 100644 sysdeps/csky/linkmap.h
 create mode 100644 sysdeps/csky/machine-gmon.h
 create mode 100644 sysdeps/csky/math-tests.h
 create mode 100644 sysdeps/csky/memusage.h
 create mode 100644 sysdeps/csky/nofpu/Implies
 create mode 100644 sysdeps/csky/nptl/Makefile
 create mode 100644 sysdeps/csky/nptl/bits/pthreadtypes-arch.h
 create mode 100644 sysdeps/csky/nptl/bits/semaphore.h
 create mode 100644 sysdeps/csky/nptl/pthread-offsets.h
 create mode 100644 sysdeps/csky/nptl/pthreaddef.h
 create mode 100644 sysdeps/csky/nptl/tcb-offsets.sym
 create mode 100644 sysdeps/csky/nptl/tls.h
 create mode 100644 sysdeps/csky/preconfigure
 create mode 100644 sysdeps/csky/sfp-machine.h
 create mode 100644 sysdeps/csky/sotruss-lib.c
 create mode 100644 sysdeps/csky/stackinfo.h
 create mode 100644 sysdeps/csky/sysdep.h
 create mode 100644 sysdeps/csky/tst-audit.h
 create mode 100644 sysdeps/unix/sysv/linux/csky/Implies
 create mode 100644 sysdeps/unix/sysv/linux/csky/Makefile
 create mode 100644 sysdeps/unix/sysv/linux/csky/Versions
 create mode 100644 sysdeps/unix/sysv/linux/csky/abiv2/____longjmp_chk.S
 create mode 100644 sysdeps/unix/sysv/linux/csky/abiv2/clone.S
 create mode 100644 sysdeps/unix/sysv/linux/csky/abiv2/getcontext.S
 create mode 100644 sysdeps/unix/sysv/linux/csky/abiv2/setcontext.S
 create mode 100644 sysdeps/unix/sysv/linux/csky/abiv2/swapcontext.S
 create mode 100644 sysdeps/unix/sysv/linux/csky/abiv2/syscall.S
 create mode 100644 sysdeps/unix/sysv/linux/csky/abiv2/sysdep.S
 create mode 100644 sysdeps/unix/sysv/linux/csky/abiv2/ucontext_i.sym
 create mode 100644 sysdeps/unix/sysv/linux/csky/bits/mman.h
 create mode 100644 sysdeps/unix/sysv/linux/csky/bits/shm.h
 create mode 100644 sysdeps/unix/sysv/linux/csky/c++-types.data
 create mode 100644 sysdeps/unix/sysv/linux/csky/configure
 create mode 100644 sysdeps/unix/sysv/linux/csky/configure.ac
 create mode 100644 sysdeps/unix/sysv/linux/csky/ipc_priv.h
 create mode 100644 sysdeps/unix/sysv/linux/csky/jmp_buf-macros.h
 create mode 100644 sysdeps/unix/sysv/linux/csky/kernel-features.h
 create mode 100644 sysdeps/unix/sysv/linux/csky/ld.abilist
 create mode 100644 sysdeps/unix/sysv/linux/csky/ldconfig.h
 create mode 100644 sysdeps/unix/sysv/linux/csky/libBrokenLocale.abilist
 create mode 100644 sysdeps/unix/sysv/linux/csky/libanl.abilist
 create mode 100644 sysdeps/unix/sysv/linux/csky/libc.abilist
 create mode 100644 sysdeps/unix/sysv/linux/csky/libcrypt.abilist
 create mode 100644 sysdeps/unix/sysv/linux/csky/libdl.abilist
 create mode 100644 sysdeps/unix/sysv/linux/csky/libm.abilist
 create mode 100644 sysdeps/unix/sysv/linux/csky/libnsl.abilist
 create mode 100644 sysdeps/unix/sysv/linux/csky/libpthread.abilist
 create mode 100644 sysdeps/unix/sysv/linux/csky/libresolv.abilist
 create mode 100644 sysdeps/unix/sysv/linux/csky/librt.abilist
 create mode 100644 sysdeps/unix/sysv/linux/csky/libthread_db.abilist
 create mode 100644 sysdeps/unix/sysv/linux/csky/libutil.abilist
 create mode 100644 sysdeps/unix/sysv/linux/csky/localplt.data
 create mode 100644 sysdeps/unix/sysv/linux/csky/makecontext.c
 create mode 100644 sysdeps/unix/sysv/linux/csky/profil-counter.h
 create mode 100644 sysdeps/unix/sysv/linux/csky/pt-vfork.S
 create mode 100644 sysdeps/unix/sysv/linux/csky/register-dump.h
 create mode 100644 sysdeps/unix/sysv/linux/csky/shlib-versions
 create mode 100644 sysdeps/unix/sysv/linux/csky/sigcontextinfo.h
 create mode 100644 sysdeps/unix/sysv/linux/csky/sys/cachectl.h
 create mode 100644 sysdeps/unix/sysv/linux/csky/sys/procfs.h
 create mode 100644 sysdeps/unix/sysv/linux/csky/sys/ucontext.h
 create mode 100644 sysdeps/unix/sysv/linux/csky/sys/user.h
 create mode 100644 sysdeps/unix/sysv/linux/csky/syscalls.list
 create mode 100644 sysdeps/unix/sysv/linux/csky/sysdep.h

-- 
2.7.4


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [RFC PATCH v3 01/12] C-SKY: ABI related code
  2018-06-29  7:58 [RFC PATCH v3 00/12] port C-SKY to glibc Mao Han
@ 2018-06-29  7:58 ` Mao Han
  2018-06-29 16:40   ` Joseph Myers
  2018-06-29  7:58 ` [RFC PATCH v3 02/12] C-SKY: TLS support Mao Han
                   ` (10 subsequent siblings)
  11 siblings, 1 reply; 22+ messages in thread
From: Mao Han @ 2018-06-29  7:58 UTC (permalink / raw
  To: libc-alpha; +Cc: Mao Han, c-sky_gcc_upstream, gnu-csky

Codes in this patch contains lots of C-SKY ABI related code. They are written
accroding to the registers assgnments, relocations, assemblly described
in C-SKY CPU ABI Standards and C-SKY CPU manual.
This does not contain any linux related code.

	* sysdeps/csky/abiv2/__longjmp.S: New file.
	* sysdeps/csky/abiv2/csky-mcount.S: Likewise.
	* sysdeps/csky/abiv2/dl-trampoline.S: Likewise.
	* sysdeps/csky/abiv2/memcpy.S: Likewise.
	* sysdeps/csky/abiv2/setjmp.S: Likewise.
	* sysdeps/csky/abiv2/start.S: Likewise.
	* sysdeps/csky/abiv2/strcmp.S: Likewise.
	* sysdeps/csky/abiv2/strcpy.S: Likewise.
	* sysdeps/csky/abort-instr.h: Likewise.
	* sysdeps/csky/bits/endian.h: Likewise.
	* sysdeps/csky/bits/link.h: Likewise.
	* sysdeps/csky/bits/setjmp.h: Likewise.
	* sysdeps/csky/bsd-_setjmp.S: Likewise.
	* sysdeps/csky/bsd-setjmp.S: Likewise.
	* sysdeps/csky/crti.S: Likewise.
	* sysdeps/csky/crtn.S: Likewise.
	* sysdeps/csky/gccframe.h: Likewise.
	* sysdeps/csky/jmpbuf-unwind.h: Likewise.
	* sysdeps/csky/machine-gmon.h: Likewise.
	* sysdeps/csky/memusage.h: Likewise.
	* sysdeps/csky/stackinfo.h: Likewise.
	* sysdeps/csky/sysdep.h: Likewise.
---
 sysdeps/csky/abiv2/__longjmp.S     |  61 +++++++++++
 sysdeps/csky/abiv2/csky-mcount.S   |  62 +++++++++++
 sysdeps/csky/abiv2/dl-trampoline.S |  48 +++++++++
 sysdeps/csky/abiv2/memcpy.S        | 205 +++++++++++++++++++++++++++++++++++++
 sysdeps/csky/abiv2/setjmp.S        |  77 ++++++++++++++
 sysdeps/csky/abiv2/start.S         | 115 +++++++++++++++++++++
 sysdeps/csky/abiv2/strcmp.S        | 187 +++++++++++++++++++++++++++++++++
 sysdeps/csky/abiv2/strcpy.S        | 138 +++++++++++++++++++++++++
 sysdeps/csky/abort-instr.h         |   2 +
 sysdeps/csky/bits/endian.h         |  10 ++
 sysdeps/csky/bits/link.h           |  55 ++++++++++
 sysdeps/csky/bits/setjmp.h         |  34 ++++++
 sysdeps/csky/bsd-_setjmp.S         |   1 +
 sysdeps/csky/bsd-setjmp.S          |   1 +
 sysdeps/csky/crti.S                |  96 +++++++++++++++++
 sysdeps/csky/crtn.S                |  50 +++++++++
 sysdeps/csky/gccframe.h            |  21 ++++
 sysdeps/csky/jmpbuf-unwind.h       |  48 +++++++++
 sysdeps/csky/machine-gmon.h        |  32 ++++++
 sysdeps/csky/memusage.h            |  21 ++++
 sysdeps/csky/stackinfo.h           |  29 ++++++
 sysdeps/csky/sysdep.h              |  45 ++++++++
 22 files changed, 1338 insertions(+)
 create mode 100644 sysdeps/csky/abiv2/__longjmp.S
 create mode 100644 sysdeps/csky/abiv2/csky-mcount.S
 create mode 100644 sysdeps/csky/abiv2/dl-trampoline.S
 create mode 100644 sysdeps/csky/abiv2/memcpy.S
 create mode 100644 sysdeps/csky/abiv2/setjmp.S
 create mode 100644 sysdeps/csky/abiv2/start.S
 create mode 100644 sysdeps/csky/abiv2/strcmp.S
 create mode 100644 sysdeps/csky/abiv2/strcpy.S
 create mode 100644 sysdeps/csky/abort-instr.h
 create mode 100644 sysdeps/csky/bits/endian.h
 create mode 100644 sysdeps/csky/bits/link.h
 create mode 100644 sysdeps/csky/bits/setjmp.h
 create mode 100644 sysdeps/csky/bsd-_setjmp.S
 create mode 100644 sysdeps/csky/bsd-setjmp.S
 create mode 100644 sysdeps/csky/crti.S
 create mode 100644 sysdeps/csky/crtn.S
 create mode 100644 sysdeps/csky/gccframe.h
 create mode 100644 sysdeps/csky/jmpbuf-unwind.h
 create mode 100644 sysdeps/csky/machine-gmon.h
 create mode 100644 sysdeps/csky/memusage.h
 create mode 100644 sysdeps/csky/stackinfo.h
 create mode 100644 sysdeps/csky/sysdep.h

diff --git a/sysdeps/csky/abiv2/__longjmp.S b/sysdeps/csky/abiv2/__longjmp.S
new file mode 100644
index 0000000..ba4445e
--- /dev/null
+++ b/sysdeps/csky/abiv2/__longjmp.S
@@ -0,0 +1,61 @@
+/* longjmp for C-SKY ABIV2
+   Copyright (C) 2018 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>
+
+ENTRY (__longjmp)
+	mov	a2, a0
+	mov	a0, a1		/* get the return value in place */
+	cmpnei	a0, 0
+	bt	have_return
+	movi	a0, 1		/* can't let setjmp() return zero! */
+have_return:
+#ifdef CHECK_SP
+	ldw	r10, (a2, 0)	/* jmpbuf's sp */
+# ifdef PTR_MANGLE
+	PTR_DEMANGLE (r10, r10, a3)
+# endif
+	CHECK_SP (r10)
+#endif
+	ldw	sp, (a2, 0)
+	ldw	lr, (a2, 4)
+	ldw	r4, (a2, 8)
+	ldw	r5, (a2, 12)
+	ldw	r6, (a2, 16)
+	ldw	r7, (a2, 20)
+	ldw	r8, (a2, 24)
+	ldw	r9, (a2, 28)
+	ldw	r10, (a2, 32)
+	ldw	r11, (a2, 36)
+	ldw	r16, (a2, 40)
+	ldw	r17, (a2, 44)
+	ldw	r26, (a2, 48)
+	ldw	r27, (a2, 52)
+	ldw	r28, (a2, 56)
+	ldw	r29, (a2, 60)
+	ldw	r30, (a2, 64)
+	ldw	r31, (a2, 68)
+	addi	a2, 72
+
+#ifdef PTR_MANGLE
+	PTR_DEMANGLE (sp, sp, a3)
+	PTR_DEMANGLE2 (lr, lr, a3)
+#endif
+	jmp	lr
+
+END (__longjmp)
diff --git a/sysdeps/csky/abiv2/csky-mcount.S b/sysdeps/csky/abiv2/csky-mcount.S
new file mode 100644
index 0000000..61ecf6c
--- /dev/null
+++ b/sysdeps/csky/abiv2/csky-mcount.S
@@ -0,0 +1,62 @@
+/* Implementation of profiling support.  C-SKY ABIV2 version.
+   Copyright (C) 2018 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/>.  */
+
+/* Don't call mcount when calling mcount...  */
+#undef PROF
+
+#include <sysdep.h>
+
+/* Use an assembly stub with a special ABI.  The calling lr has been
+   pushed to the stack (which will be misaligned).  We should preserve
+   all registers except ip and pop a word off the stack.
+
+   NOTE: This assumes mcount_internal does not clobber any non-core
+   (coprocessor) registers.  Currently this is true, but may require
+   additional attention in the future.
+
+   The calling sequence looks something like:
+func:
+   push lr
+   jbsr __gnu_mount_nc
+   <function body>
+*/
+
+ENTRY (_mcount)
+	subi	sp,20
+	stw	a0,(sp, 0)
+	stw	a1,(sp, 4)
+	stw	a2,(sp, 8)
+	stw	a3,(sp, 12)
+	stw	lr,(sp, 16)
+	mov	a1, lr
+	ldw	a0, (sp, 20)
+	jbsr	__mcount_internal
+	ldw	a0,(sp, 0)
+	ldw	a1,(sp, 4)
+	ldw	a2,(sp, 8)
+	ldw	a3,(sp, 12)
+	ldw	t1,(sp, 16)
+	ldw	lr,(sp, 20)
+	addi	sp,24
+	jmp	t1
+END (_mcount)
+
+/* The canonical name for the function is `_mcount' in both C and asm,
+   but some old asm code might assume it's `mcount'.  */
+#undef mcount
+weak_alias (_mcount, mcount)
diff --git a/sysdeps/csky/abiv2/dl-trampoline.S b/sysdeps/csky/abiv2/dl-trampoline.S
new file mode 100644
index 0000000..6771efe
--- /dev/null
+++ b/sysdeps/csky/abiv2/dl-trampoline.S
@@ -0,0 +1,48 @@
+/* PLT trampolines.  C-SKY ABIV2 version.
+   Copyright (C) 2018 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 function is not called directly. It is jumped when attempting to use a
+   symbol that has not yet been resolved.
+
+   .plt*:
+     subi r0, 32
+     stw r2, (r0, 0)
+     stw r3, (r0, 4)
+     lrw r3, #offset
+     ldw r2, (gb, 8)
+     jmp r2
+ */
+
+#include <sysdep.h>
+
+	.text
+ENTRY (_dl_runtime_resolve)
+	subi	sp, 20
+	stm	a0-a3, (sp)
+	stw	lr, (sp, 16)
+	# a0 = id, a1 = offset(do it in plt*)
+	ldw	a0,  (gb, 4)
+	movi	a1, 12
+	mult	a1, t1
+	bsr	_dl_fixup
+	mov	t0, a0
+	ldw	lr, (sp, 16)
+	ldm	a0-a3, (sp)
+	addi	sp, 20
+	jmp	t0
+END (_dl_runtime_resolve)
diff --git a/sysdeps/csky/abiv2/memcpy.S b/sysdeps/csky/abiv2/memcpy.S
new file mode 100644
index 0000000..67c2f84
--- /dev/null
+++ b/sysdeps/csky/abiv2/memcpy.S
@@ -0,0 +1,205 @@
+/* The assembly function for memcpy.  C-SKY ABIV2 version.
+   Copyright (C) 2018 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>
+
+.macro	GET_FRONT_BITS rx ry
+#ifdef	__cskyLE__
+	lsr	\rx, \ry
+#else
+	lsl	\rx, \ry
+#endif
+.endm
+
+.macro	GET_AFTER_BITS rx ry
+#ifdef	__cskyLE__
+	lsl	\rx, \ry
+#else
+	lsr	\rx, \ry
+#endif
+.endm
+
+ENTRY (memcpy)
+	/* If len less than 4 bytes */
+	mov	r3, r0
+	cmplti	r2, 4
+	jbt	.L_copy_by_byte
+
+	mov	r12, r0
+	andi	r12, 3
+	/* If dest is not 4 bytes aligned */
+	bnez	r12, .L_dest_not_aligned
+.L0:
+	/* If dest is aligned, but src is not aligned */
+	mov	r12, r1
+	andi	r12, 3
+	bnez	r12, .L_dest_aligned_but_src_not_aligned
+
+	/* dest and src are all aligned */
+	cmplti	r2, 16
+	/* If len less than 16 bytes */
+	jbt	.L_aligned_and_len_less_16bytes
+
+	/* src and dst are all aligned, and len > 16 bytes */
+.L_aligned_and_len_larger_16bytes:
+	ldw	r18, (r1, 0)
+	ldw	r19, (r1, 4)
+	ldw	r20, (r1, 8)
+	ldw	r21, (r1, 12)
+	stw	r18, (r3, 0)
+	stw	r19, (r3, 4)
+	stw	r20, (r3, 8)
+	stw	r21, (r3, 12)
+	subi	r2, 16
+	addi	r1, 16
+	addi	r3, 16
+	cmplti	r2, 16
+	jbf	.L_aligned_and_len_larger_16bytes
+
+.L_aligned_and_len_less_16bytes:
+	cmplti	r2, 4
+	jbt	.L_copy_by_byte
+	ldw	r18, (r1, 0)
+	stw	r18, (r3, 0)
+	subi	r2, 4
+	addi	r1, 4
+	addi	r3, 4
+	jbr	.L_aligned_and_len_less_16bytes
+
+	/* len less than 4 bytes */
+.L_copy_by_byte:
+	cmpnei	r2, 0
+	jbf	.L_return
+	ldb	r18, (r1, 0)
+	stb	r18, (r3, 0)
+	subi	r2, 1
+	addi	r1, 1
+	addi	r3, 1
+	jbr	.L_copy_by_byte
+
+.L_return:
+	rts
+
+	/* If dest is not aligned, just copying some bytes makes the dest align.
+	After that, we judge whether the src is aligned. */
+
+	/* consider overlapped case */
+.L_dest_not_aligned:
+	rsub	r13, r1, r3
+	abs	r13, r13
+	cmplt	r13, r2
+	jbt	.L_copy_by_byte
+
+.L1:
+	/* makes the dest align. */
+	ldb	r18, (r1, 0)
+	stb	r18, (r3, 0)
+	addi	r12, 1
+	subi	r2, 1
+	addi	r1, 1
+	addi	r3, 1
+	cmpnei	r12, 4
+	jbt	.L1
+	cmplti	r2, 4
+	jbt	.L_copy_by_byte
+	/* judge whether the src is aligned. */
+	jbf	.L0
+
+	/* consider overlapped case */
+.L_dest_aligned_but_src_not_aligned:
+	rsub	r13, r1, r3
+	abs	r13, r13
+	cmplt	r13, r2
+	jbt	.L_copy_by_byte
+
+	bclri	r1, 0
+	bclri	r1, 1
+	ldw	r18, (r1, 0)
+	addi	r1, 4
+
+	/* r12 is used to store the misaligned bits */
+	movi	r13, 8
+	mult	r13, r12
+	mov	r24, r13
+	rsubi	r13, 32
+	mov	r25, r13
+
+	cmplti	r2, 16
+	jbt	.L_not_aligned_and_len_less_16bytes
+
+.L_not_aligned_and_len_larger_16bytes:
+	ldw	r20, (r1, 0)
+	ldw	r21, (r1, 4)
+	ldw	r22, (r1, 8)
+	ldw	r23, (r1, 12)
+
+	/* little or big endian? */
+	GET_FRONT_BITS	r18 r24
+	mov	r19, r20
+	GET_AFTER_BITS	r20 r25
+	or	r20, r18
+
+	GET_FRONT_BITS	r19 r24
+	mov	r18, r21
+	GET_AFTER_BITS	r21 r13
+	or	r21, r19
+
+	GET_FRONT_BITS	r18 r24
+	mov	r19, r22
+	GET_AFTER_BITS	r22 r25
+	or	r22, r18
+
+	GET_FRONT_BITS	r19 r24
+	mov	r18, r23
+	GET_AFTER_BITS	r23 r25
+	or	r23, r19
+
+	stw	r20, (r3, 0)
+	stw	r21, (r3, 4)
+	stw	r22, (r3, 8)
+	stw	r23, (r3, 12)
+	subi	r2, 16
+	addi	r1, 16
+	addi	r3, 16
+	cmplti	r2, 16
+	jbf	.L_not_aligned_and_len_larger_16bytes
+
+	.L_not_aligned_and_len_less_16bytes:
+	cmplti	r2, 4
+	jbf	.L2
+	/* r12 is used to stored the misaligned bits */
+	rsubi	r12, 4
+	/* initial the position */
+	subu	r1, r12
+	jbr	.L_copy_by_byte
+	.L2:
+	ldw	r21, (r1, 0)
+	GET_FRONT_BITS	r18 r24
+	mov	r19, r18
+	mov	r18, r21
+	GET_AFTER_BITS	r21 r25
+	or	r21, r19
+	stw	r21, (r3, 0)
+	subi	r2, 4
+	addi	r1, 4
+	addi	r3, 4
+	jbr	.L_not_aligned_and_len_less_16bytes
+END (memcpy)
+
+libc_hidden_builtin_def (memcpy)
+.weak memcpy
diff --git a/sysdeps/csky/abiv2/setjmp.S b/sysdeps/csky/abiv2/setjmp.S
new file mode 100644
index 0000000..a2dff37
--- /dev/null
+++ b/sysdeps/csky/abiv2/setjmp.S
@@ -0,0 +1,77 @@
+/* setjmp for C-SKY ABIV2
+   Copyright (C) 2018 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>
+
+ENTRY (setjmp)
+	movi	a1, 1
+	br	__sigsetjmp
+END (setjmp)
+
+ENTRY (_setjmp)
+	movi	a1, 0
+	br	__sigsetjmp
+END (_setjmp)
+
+libc_hidden_def (_setjmp)
+
+ENTRY (__sigsetjmp)
+	mov	a2, a0
+	/* Save registers */
+
+#ifdef PTR_MANGLE
+	PTR_MANGLE (t0, sp, a3)
+	stw	t0, (a2, 0)
+	PTR_MANGLE2 (t0, lr, a3)
+	stw	t0, (a2, 4)
+#else
+	stw	sp, (a2, 0)
+	stw	lr, (a2, 4)
+#endif
+	stw	r4, (a2, 8)
+	stw	r5, (a2, 12)
+	stw	r6, (a2, 16)
+	stw	r7, (a2, 20)
+	stw	r8, (a2, 24)
+	stw	r9, (a2, 28)
+	stw	r10, (a2, 32)
+	stw	r11, (a2, 36)
+	stw	r16, (a2, 40)
+	stw	r17, (a2, 44)
+	stw	r26, (a2, 48)
+	stw	r27, (a2, 52)
+	stw	r28, (a2, 56)
+	stw	r29, (a2, 60)
+	stw	r30, (a2, 64)
+	stw	r31, (a2, 68)
+	addi	a2, 72
+
+#ifdef __PIC__
+	grs	t1, .Lgetpc
+.Lgetpc:
+	lrw	t0, .Lgetpc@GOTPC
+	addu	t1, t0
+	lrw	a2, __sigjmp_save@PLT
+	ldr.w	a2, (t1, a2 << 0)
+	jmp	a2
+#else
+	jmpi	__sigjmp_save
+#endif	/* !__PIC__ */
+END (__sigsetjmp)
+
+hidden_def (__sigsetjmp)
diff --git a/sysdeps/csky/abiv2/start.S b/sysdeps/csky/abiv2/start.S
new file mode 100644
index 0000000..3327a0d
--- /dev/null
+++ b/sysdeps/csky/abiv2/start.S
@@ -0,0 +1,115 @@
+/* Startup code compliant to the ELF C-SKY ABIV2.
+   Copyright (C) 2018 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/>.  */
+
+/* We need to call:
+   __libc_start_main (int (*main) (int, char **, char **), int argc,
+		      char **argv, void (*init) (void), void (*fini) (void),
+		      void (*rtld_fini) (void), void *stack_end)
+*/
+
+#include <sysdep.h>
+
+.text
+ENTRY (_start)
+	/* Clear the frame pointer and link register since this is the outermost frame. */
+	movi	lr, 0
+	/* Pop argc off the stack and save a pointer to argv */
+	ldw	a1, (sp, 0)	/* __libc_start_main(arg1): argc */
+	addi	sp, 4
+	mov	a2, sp		/* __libc_start_main(arg2): argv */
+
+	subi	sp, 4
+	/* Push stack limit */
+	stw	a2, (sp, 0)
+	/* Push rtld_fini */
+	subi	sp, 4
+	stw	a0, (sp, 0)
+
+#ifdef SHARED
+	subi	sp, 8
+	stw	lr, (sp, 0)
+	stw	gb, (sp, 4)
+	bsr	.Lgetpc
+.Lgetpc:
+	lrw	gb, .Lgetpc@GOTPC
+	addu	gb, lr
+	lrw	a3, __libc_csu_fini@GOT
+	addu	a3, gb
+	ldw	a3, (a3)
+
+	subi	sp, 4
+	stw	a3, (sp, 0)
+
+	lrw	a3, __libc_csu_init@GOT
+	addu	a3, gb
+	ldw	a3, (a3, 0)
+
+	lrw	t0, main@GOT
+	addu	t0, gb
+	ldw	a0,(t0,0)
+	lrw	t1,__libc_start_main@PLT
+	addu	t1, gb
+	ldw	t1, (t1, 0)
+	jsr	t1
+
+	ldw	lr,(sp,0)
+	ldw	gb,(sp,4)
+	addi	sp, 8
+#else
+	/* Fetch address of __libc_csu_fini */
+	lrw	a0, __libc_csu_fini
+	/* Push __libc_csu_fini */
+	subi	sp,4
+	stw	a0, (sp,0)
+
+	/* Set up the other arguments in registers */
+	lrw	a0, main
+	lrw	a3, __libc_csu_init
+	/* __libc_start_main (main, argc, argv, init, fini, rtld_fini, stack_end) */
+	/* Let the libc call main and exit with its return code.  */
+	jsri	__libc_start_main
+#endif	/* !SHARED */
+
+	/* should never get here....*/
+	jsri	abort
+END (_start)
+
+/* Define a symbol for the first piece of initialized data.  */
+	.data
+	.globl __data_start
+__data_start:
+	.long 0
+	.weak data_start
+	data_start = __data_start
diff --git a/sysdeps/csky/abiv2/strcmp.S b/sysdeps/csky/abiv2/strcmp.S
new file mode 100644
index 0000000..b33cafd
--- /dev/null
+++ b/sysdeps/csky/abiv2/strcmp.S
@@ -0,0 +1,187 @@
+/* The assembly function for string compare. C-SKY ABIV2 version.
+   Copyright (C) 2018 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>
+
+ENTRY (strcmp)
+	mov	a3, a0
+
+	or	a0, a1
+	andi	a0, 0x3
+	bnez	a0, 4f
+
+1:
+	/* if aligned, load word each time. */
+	ldw	a0, (a3, 0)
+	ldw	t0, (a1, 0)
+	/* if d[i] != s[i], goto 1f */
+	cmpne	a0, t0
+	bt	1f
+	/* if d[i] == s[i], check if d or s is at the end. */
+	tstnbz	a0
+	/* if at the end, goto 3f (finish comparing) */
+	bf	3f
+
+	ldw	a0, (a3, 4)
+	ldw	t0, (a1, 4)
+	cmpne	a0, t0
+	bt	1f
+	tstnbz	a0
+	bf	3f
+
+	ldw	a0, (a3, 8)
+	ldw	t0, (a1, 8)
+	cmpne	a0, t0
+	bt	1f
+	tstnbz	a0
+	bf	3f
+
+	ldw	a0, (a3, 12)
+	ldw	t0, (a1, 12)
+	cmpne	a0, t0
+	bt	1f
+	tstnbz	a0
+	bf	3f
+
+	ldw	a0, (a3, 16)
+	ldw	t0, (a1, 16)
+	cmpne	a0, t0
+	bt	1f
+	tstnbz	a0
+	bf	3f
+
+	ldw	a0, (a3, 20)
+	ldw	t0, (a1, 20)
+	cmpne	a0, t0
+	bt	1f
+	tstnbz	a0
+	bf	3f
+
+	ldw	a0, (a3, 24)
+	ldw	t0, (a1, 24)
+	cmpne	a0, t0
+	bt	1f
+	tstnbz	a0
+	bf	3f
+
+	ldw	a0, (a3, 28)
+	ldw	t0, (a1, 28)
+	cmpne	a0, t0
+	bt	1f
+	tstnbz	a0
+	bf	3f
+
+	addi	a3, 32
+	addi	a1, 32
+
+	br	1b
+
+# ifdef __CSKYBE__
+	/* d[i] != s[i] in word, so we check byte 0 ? */
+1:
+	xtrb0	t1, a0
+	mov	a2, t1
+	xtrb0	t1, t0
+	cmpne	a2, t1
+	bt	2f
+	cmpnei	a2, 0
+	bf	2f
+
+	/* d[i] != s[i] in word, so we check byte 1 ? */
+	xtrb1	t1, a0
+	mov	a2, t1
+	xtrb1	t1, t0
+	cmpne	a2, t1
+	bt	2f
+	cmpnei	a2, 0
+	bf	2f
+
+	/* d[i] != s[i] in word, so we check byte 1 ? */
+	xtrb2	t1, a0
+	mov	a2, t1
+	xtrb2	t1, t0
+	cmpne	a2, t1
+        bt	2f
+	cmpnei	a2, 0
+	bf	2f
+
+	/* d[i] != s[i] in word, so we check byte 1 ? */
+	xtrb3	t1, a0
+	mov	a2, t1
+	xtrb3	t1, t0
+
+# else
+	/* d[i] != s[i] in word, so we check byte 0 ? */
+1:
+	xtrb3	t1, a0
+	mov	a2, t1
+	xtrb3	t1, t0
+	cmpne	a2, t1
+	bt	2f
+	cmpnei	a2, 0
+	bf	2f
+
+	/* d[i] != s[i] in word, so we check byte 1 ? */
+	xtrb2	t1, a0
+	mov	a2, t1
+	xtrb2	t1, t0
+	cmpne	a2, t1
+	bt	2f
+	cmpnei	a2, 0
+	bf	2f
+
+	/* d[i] != s[i] in word, so we check byte 1 ? */
+	xtrb1	t1, a0
+	mov	a2, t1
+	xtrb1	t1, t0
+	cmpne	a2, t1
+	bt	2f
+	cmpnei	a2, 0
+	bf	2f
+
+	/* d[i] != s[i] in word, so we check byte 1 ? */
+	xtrb0	t1, a0
+	mov	a2, t1
+	xtrb0	t1, t0
+
+# endif /* !__CSKYBE__ */
+	/* get the result when d[i] != s[i] */
+2:
+	subu	a2, t1
+	mov	a0, a2
+	jmp	r15
+
+	/* return when d[i] == s[i] */
+3:
+	subu	a0, t0
+	jmp	r15
+
+	/* cmp when d or s is not aligned */
+4:
+	ldb	a0, (a3, 0)
+	ldb	t0, (a1, 0)
+	cmpne	a0, t0
+	bt	3b
+	addi	a1, 1
+	addi	a3, 1
+	bnez	a0, 4b
+	jmp	r15
+END (strcmp)
+
+libc_hidden_def (strcmp)
+.weak strcmp
diff --git a/sysdeps/csky/abiv2/strcpy.S b/sysdeps/csky/abiv2/strcpy.S
new file mode 100644
index 0000000..bb39f8f
--- /dev/null
+++ b/sysdeps/csky/abiv2/strcpy.S
@@ -0,0 +1,138 @@
+/* The assembly function for string copy.  C-SKY ABIV2 version.
+   Copyright (C) 2018 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>
+
+ENTRY (strcpy)
+	mov	a3, a0
+	or	a2, a1, a3
+	andi	t0, a2, 3
+	bez	t0, 2f
+	mov	t0, a1
+1:
+	ld.b	a2, (t0)
+	stb	a2, (a3)
+	addi	t0, t0, 1
+	addi	a3, a3, 1
+	bnez	a2, 1b
+
+	jmp	r15
+
+2:
+	ldw	a2, (a1)
+	tstnbz	a2
+	bf	11f
+	stw	a2, (a3)
+
+	ldw	a2, (a1, 4)
+	tstnbz	a2
+	bf	4f
+	stw	a2, (a3, 4)
+
+	ldw	a2, (a1, 8)
+	tstnbz	a2
+	bf	5f
+	stw	a2, (a3, 8)
+
+	ldw	a2, (a1, 12)
+	tstnbz	a2
+	bf	6f
+	stw	a2, (a3, 12)
+
+	ldw	a2, (a1, 16)
+	tstnbz	a2
+	bf	7f
+	stw	a2, (a3, 16)
+
+	ldw	a2, (a1, 20)
+	tstnbz	a2
+	bf	8f
+	stw	a2, (a3, 20)
+
+	ldw	a2, (a1, 24)
+	tstnbz	a2
+	bf	9f
+	stw	a2, (a3, 24)
+
+	ldw	a2, (a1, 28)
+	tstnbz	a2
+	bf	10f
+	stw	a2, (a3, 28)
+
+	addi	a3, 32
+	addi	a1, 32
+	br	2b
+
+
+4:
+	addi	a3, 4
+	br	11f
+
+5:
+	addi	a3, 8
+	br	11f
+
+6:
+	addi	a3, 12
+	br	11f
+
+7:
+	addi	a3, 16
+	br	11f
+
+8:
+	addi	a3, 20
+	br	11f
+
+9:
+	addi	a3, 24
+	br	11f
+
+10:
+	addi	a3, 28
+11:
+# ifdef __CSKYBE__
+	xtrb0	t0, a2
+	st.b	t0, (a3)
+	bez	t0, 5f
+	xtrb1	t0, a2
+	st.b	t0, (a3, 1)
+	bez	t0, 5f
+	xtrb2	t0, a2
+	st.b	t0, (a3, 2)
+	bez	t0, 5f
+	stw	a2, (a3)
+# else
+	xtrb3	t0, a2
+	st.b	t0, (a3)
+	bez	t0, 5f
+	xtrb2	t0, a2
+	st.b	t0, (a3, 1)
+	bez	t0, 5f
+	xtrb1	t0, a2
+	st.b	t0, (a3, 2)
+	bez	t0, 5f
+	stw	a2, (a3)
+# endif	/* !__CSKYBE__ */
+5:
+	jmp	r15
+
+END (strcpy)
+
+libc_hidden_def (strcpy)
+.weak strcpy
diff --git a/sysdeps/csky/abort-instr.h b/sysdeps/csky/abort-instr.h
new file mode 100644
index 0000000..27a3536
--- /dev/null
+++ b/sysdeps/csky/abort-instr.h
@@ -0,0 +1,2 @@
+/* An instruction which should crash any program is a breakpoint.  */
+#define ABORT_INSTRUCTION asm ("bkpt")
diff --git a/sysdeps/csky/bits/endian.h b/sysdeps/csky/bits/endian.h
new file mode 100644
index 0000000..faee072
--- /dev/null
+++ b/sysdeps/csky/bits/endian.h
@@ -0,0 +1,10 @@
+#ifndef _ENDIAN_H
+# error "Never use <bits/endian.h> directly; include <endian.h> instead."
+#endif
+
+/* C-SKY can be either big or little endian.  */
+#ifdef __CSKYBE__
+# define __BYTE_ORDER __BIG_ENDIAN
+#else
+# define __BYTE_ORDER __LITTLE_ENDIAN
+#endif
diff --git a/sysdeps/csky/bits/link.h b/sysdeps/csky/bits/link.h
new file mode 100644
index 0000000..4cd2846
--- /dev/null
+++ b/sysdeps/csky/bits/link.h
@@ -0,0 +1,55 @@
+/* Machine-specific declarations for dynamic linker interface.  C-SKY version.
+   Copyright (C) 2018 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	_LINK_H
+# error "Never include <bits/link.h> directly; use <link.h> instead."
+#endif
+
+/* Registers for entry into PLT on C-SKY.  */
+typedef struct La_csky_regs
+{
+  uint32_t lr_reg[4];
+  uint32_t lr_sp;
+  uint32_t lr_lr;
+} La_csky_regs;
+
+/* Return values for calls from PLT on C-SKY.  */
+typedef struct La_csky_retval
+{
+  /* Up to four integer registers can be used for a return value.  */
+  uint32_t lrv_reg[4];
+  uint32_t lrv_v0;
+} La_csky_retval;
+
+__BEGIN_DECLS
+
+extern Elf32_Addr la_csky_gnu_pltenter (Elf32_Sym *__sym, unsigned int __ndx,
+				        uintptr_t *__refcook,
+				        uintptr_t *__defcook,
+				        La_csky_regs *__regs,
+				        unsigned int *__flags,
+				        const char *__symname,
+				        long int *__framesizep);
+extern unsigned int la_csky_gnu_pltexit (Elf32_Sym *__sym, unsigned int __ndx,
+					 uintptr_t *__refcook,
+					 uintptr_t *__defcook,
+					 const La_csky_regs *__inregs,
+					 La_csky_retval *__outregs,
+					 const char *__symname);
+
+__END_DECLS
diff --git a/sysdeps/csky/bits/setjmp.h b/sysdeps/csky/bits/setjmp.h
new file mode 100644
index 0000000..e5f71a6
--- /dev/null
+++ b/sysdeps/csky/bits/setjmp.h
@@ -0,0 +1,34 @@
+/* Define the machine-dependent type `jmp_buf'. C-SKY version
+   Copyright (C) 2018 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 _CSKY_BITS_SETJMP_H
+#define _CSKY_BITS_SETJMP_H 1
+
+typedef struct __jmp_buf_str
+  {
+    /* Stack pointer.  */
+    int __sp;
+    int __lr;
+    /* The actual core defines which registers should be saved. The
+       buffer contains 32 words, keep space for future growth.
+       Callee-saved registers:
+       r4 ~ r11, r16 ~ r17, r26 ~r31 for abiv2; r8 ~ r14 for abiv1. */
+    int __regs[32];
+  } __jmp_buf[1];
+
+#endif
diff --git a/sysdeps/csky/bsd-_setjmp.S b/sysdeps/csky/bsd-_setjmp.S
new file mode 100644
index 0000000..4e6a2da
--- /dev/null
+++ b/sysdeps/csky/bsd-_setjmp.S
@@ -0,0 +1 @@
+/* _setjmp is in setjmp.S  */
diff --git a/sysdeps/csky/bsd-setjmp.S b/sysdeps/csky/bsd-setjmp.S
new file mode 100644
index 0000000..1da848d
--- /dev/null
+++ b/sysdeps/csky/bsd-setjmp.S
@@ -0,0 +1 @@
+/* setjmp is in setjmp.S  */
diff --git a/sysdeps/csky/crti.S b/sysdeps/csky/crti.S
new file mode 100644
index 0000000..3f4b7fb
--- /dev/null
+++ b/sysdeps/csky/crti.S
@@ -0,0 +1,96 @@
+/* Special .init and .fini section support for C-SKY.
+   Copyright (C) 2018 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/>.  */
+
+/* crti.S puts a function prologue at the beginning of the .init and
+   .fini sections and defines global symbols for those addresses, so
+   they can be called as functions.  The symbols _init and _fini are
+   magic and cause the linker to emit DT_INIT and DT_FINI.  */
+
+#include <libc-symbols.h>
+#include <sysdep.h>
+
+#ifndef PREINIT_FUNCTION
+# define PREINIT_FUNCTION __gmon_start__
+#endif
+
+#ifndef PREINIT_FUNCTION_WEAK
+# define PREINIT_FUNCTION_WEAK 1
+#endif
+
+#if PREINIT_FUNCTION_WEAK
+	weak_extern (PREINIT_FUNCTION)
+#else
+	.hidden PREINIT_FUNCTION
+#endif
+
+	.section .init,"ax",@progbits
+	.align 4
+	.globl _init
+	.type _init, @function
+_init:
+	subi	sp, 8
+	stw	lr, (sp, 0)
+	stw	gb, (sp, 4)
+	bsr	.Lgetpc
+.Lgetpc:
+	lrw	gb, .Lgetpc@GOTPC
+	add	gb, lr
+#if PREINIT_FUNCTION_WEAK
+	lrw	a2, PREINIT_FUNCTION@GOT
+	addu	a2, gb
+	ldw	a2, (a2)
+	cmpnei	a2, 0
+	bf	1f
+	jsr	a2
+1:
+#else
+	jsri	PREINIT_FUNCTION
+#endif /* PREINIT_FUNCTION_WEAK */
+	br	2f
+	.literals
+	.align 4
+2:
+
+	.section .fini,"ax",@progbits
+	.align 4
+	.globl _fini
+	.type _fini, @function
+_fini:
+	subi	sp,8
+	stw	lr, (sp, 0)
+	br	2f
+	.literals
+	.align 4
+2:
diff --git a/sysdeps/csky/crtn.S b/sysdeps/csky/crtn.S
new file mode 100644
index 0000000..c7d5fbe
--- /dev/null
+++ b/sysdeps/csky/crtn.S
@@ -0,0 +1,50 @@
+/* Special .init and .fini section support for C-SKY.
+   Copyright (C) 2018 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>
+
+/* crtn.S puts function epilogues in the .init and .fini sections
+   corresponding to the prologues in crti.S. */
+
+	.section .init,"ax",@progbits
+	ldw	lr, (sp, 0)
+	ldw     gb, (sp, 4)
+	addi	sp, 8
+	rts
+
+	.section .fini,"ax",@progbits
+	ldw	lr, (sp, 0)
+	addi	sp,8
+	rts
diff --git a/sysdeps/csky/gccframe.h b/sysdeps/csky/gccframe.h
new file mode 100644
index 0000000..9451101
--- /dev/null
+++ b/sysdeps/csky/gccframe.h
@@ -0,0 +1,21 @@
+/* Definition of object in frame unwind info.  C-SKY version.
+   Copyright (C) 2018 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 FIRST_PSEUDO_REGISTER 71
+
+#include <sysdeps/generic/gccframe.h>
diff --git a/sysdeps/csky/jmpbuf-unwind.h b/sysdeps/csky/jmpbuf-unwind.h
new file mode 100644
index 0000000..954d7e0
--- /dev/null
+++ b/sysdeps/csky/jmpbuf-unwind.h
@@ -0,0 +1,48 @@
+/* Examine __jmp_buf for unwinding frames.  C-SkY version.
+   Copyright (C) 2018 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 <setjmp.h>
+#include <stdint.h>
+#include <unwind.h>
+#include <sysdep.h>
+
+/* Test if longjmp to JMPBUF would unwind the frame
+   containing a local variable at ADDRESS.  */
+#define _JMPBUF_UNWINDS(jmpbuf, address, demangle)		\
+  ((void *) (address) < (void *) demangle ((jmpbuf)[0].__sp))
+
+#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj)		      \
+  _JMPBUF_UNWINDS_ADJ (_jmpbuf,						      \
+		       (void *) (_Unwind_Ptr) _Unwind_GetCFA (_context),      \
+		       _adj)
+
+static inline uintptr_t __attribute__ ((unused))
+_jmpbuf_sp (__jmp_buf regs)
+{
+  uintptr_t sp = (uintptr_t) regs[0].__sp;
+#ifdef PTR_DEMANGLE
+  PTR_DEMANGLE (sp);
+#endif
+  return sp;
+}
+
+#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
+  ((uintptr_t) (_address) - (_adj) < _jmpbuf_sp (_jmpbuf) - (_adj))
+
+/* We use the normal longjmp for unwinding.  */
+#define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val)
diff --git a/sysdeps/csky/machine-gmon.h b/sysdeps/csky/machine-gmon.h
new file mode 100644
index 0000000..4ef9ca7
--- /dev/null
+++ b/sysdeps/csky/machine-gmon.h
@@ -0,0 +1,32 @@
+/* Machine-dependent definitions for profiling support.  C-SKY version.
+   Copyright (C) 2018 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>
+
+/* GCC for the C-SKY cannot compile __builtin_return_address (N) for N != 0,
+   so we must use an assembly stub.  */
+
+/* We must not pollute the global namespace.  */
+#define mcount_internal __mcount_internal
+
+extern void mcount_internal (u_long frompc, u_long selfpc);
+#define _MCOUNT_DECL(frompc, selfpc) \
+  void mcount_internal (u_long frompc, u_long selfpc)
+
+/* Define MCOUNT as empty since we have the implementation in another file.  */
+#define MCOUNT
diff --git a/sysdeps/csky/memusage.h b/sysdeps/csky/memusage.h
new file mode 100644
index 0000000..67f36cc
--- /dev/null
+++ b/sysdeps/csky/memusage.h
@@ -0,0 +1,21 @@
+/* Machine-specific definitions for memory usage profiling, C-SKY version.
+   Copyright (C) 2018 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 GETSP() ({ register uintptr_t stack_ptr asm ("sp"); stack_ptr; })
+
+#include <sysdeps/generic/memusage.h>
diff --git a/sysdeps/csky/stackinfo.h b/sysdeps/csky/stackinfo.h
new file mode 100644
index 0000000..9b915ba
--- /dev/null
+++ b/sysdeps/csky/stackinfo.h
@@ -0,0 +1,29 @@
+/* Stack environment definitions.  C-SKY version.
+   Copyright (C) 2018 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 _STACKINFO_H
+#define _STACKINFO_H	1
+
+#include <elf.h>
+
+/* On C-SKY the stack grows down.  */
+#define _STACK_GROWS_DOWN	1
+
+#define DEFAULT_STACK_PERMS (PF_R|PF_W)
+
+#endif	/* stackinfo.h */
diff --git a/sysdeps/csky/sysdep.h b/sysdeps/csky/sysdep.h
new file mode 100644
index 0000000..a5c221d
--- /dev/null
+++ b/sysdeps/csky/sysdep.h
@@ -0,0 +1,45 @@
+/* Assembler macros for C-SKY.
+   Copyright (C) 2018 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 <sysdeps/generic/sysdep.h>
+#include <features.h>
+
+#ifndef __CSKYABIV2__
+#error "No support for C-SKY ABIV1"
+#else
+# define CSKY_ABIV2
+#endif
+
+#ifdef __ASSEMBLER__
+
+#define ASM_SIZE_DIRECTIVE(name) .size name,.-name
+
+/* Define an entry point visible from C.  */
+#define ENTRY(name)	\
+  .globl name;		\
+  .type name,@function;	\
+  .align 4;		\
+  name##:;		\
+  cfi_startproc;	\
+
+#undef  END
+#define END(name)	\
+  cfi_endproc;		\
+  ASM_SIZE_DIRECTIVE(name)
+
+#endif
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [RFC PATCH v3 02/12] C-SKY: TLS support
  2018-06-29  7:58 [RFC PATCH v3 00/12] port C-SKY to glibc Mao Han
  2018-06-29  7:58 ` [RFC PATCH v3 01/12] C-SKY: ABI related code Mao Han
@ 2018-06-29  7:58 ` Mao Han
  2018-06-29  7:58 ` [RFC PATCH v3 03/12] C-SKY: Generic math Routines Mao Han
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 22+ messages in thread
From: Mao Han @ 2018-06-29  7:58 UTC (permalink / raw
  To: libc-alpha; +Cc: Mao Han, c-sky_gcc_upstream, gnu-csky

This patch implements TLS support for C-SKY. We support all four
standard TLS addressing modes (LE, IE, LD, and GD) when running on
Linux via NPTL.

	* sysdeps/csky/abiv2/tls-macros.h: New file.
	* sysdeps/csky/dl-tls.h: Likewise.
	* sysdeps/csky/libc-tls.c: Likewise.
	* sysdeps/csky/nptl/tcb-offsets.sym: Likewise.
	* sysdeps/csky/nptl/tls.h: Likewise.
---
 sysdeps/csky/abiv2/tls-macros.h   |  55 ++++++++++++++
 sysdeps/csky/dl-tls.h             |  26 +++++++
 sysdeps/csky/libc-tls.c           |  32 ++++++++
 sysdeps/csky/nptl/tcb-offsets.sym |  10 +++
 sysdeps/csky/nptl/tls.h           | 156 ++++++++++++++++++++++++++++++++++++++
 5 files changed, 279 insertions(+)
 create mode 100644 sysdeps/csky/abiv2/tls-macros.h
 create mode 100644 sysdeps/csky/dl-tls.h
 create mode 100644 sysdeps/csky/libc-tls.c
 create mode 100644 sysdeps/csky/nptl/tcb-offsets.sym
 create mode 100644 sysdeps/csky/nptl/tls.h

diff --git a/sysdeps/csky/abiv2/tls-macros.h b/sysdeps/csky/abiv2/tls-macros.h
new file mode 100644
index 0000000..59af059
--- /dev/null
+++ b/sysdeps/csky/abiv2/tls-macros.h
@@ -0,0 +1,55 @@
+/* Macros for accessing thread-local storage.  C-SKY ABIV2 version.
+   Copyright (C) 2018 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 TLS_LE(x)					\
+  ({ int *__result;					\
+     __asm__ ("lrw %0, " #x "@TPOFF\n\t"		\
+	      "add %0, tls, %0"				\
+	      : "=&r" (__result));			\
+     __result; })
+
+# define TLS_IE(x)					\
+  ({ int *__result;					\
+     __asm__ ("grs a1, 1f\n"				\
+	      "1:\tlrw %0, " #x "@GOTTPOFF\n\t"		\
+	      "ldr.w %0, (a1, %0 << 0)\n\t"		\
+	      "add %0, tls, %0"				\
+	      : "=&r" (__result): : "a1");		\
+     __result; })
+
+# define TLS_LD(x)					\
+  ({ char *__result;					\
+     int __offset;					\
+     extern void *__tls_get_addr (void *);		\
+     __asm__ ("grs a1, 1f\n"				\
+	      "1:\tlrw %0, " #x "@TLSLDM32;\n\t"	\
+	      "add %0, a1, %0"				\
+	      : "=r" (__result) : : "a1");		\
+     __result = (char *)__tls_get_addr (__result);	\
+     __asm__ ("lrw %0, " #x "@TLSLDO32"			\
+	      : "=r" (__offset));			\
+     (int *) (__result + __offset); })
+
+# define TLS_GD(x)					\
+  ({ int *__result;					\
+     extern void *__tls_get_addr (void *);		\
+     __asm__ ("grs a1, 1f\n"				\
+	      "1:\tlrw %0, " #x "@TLSGD32\n\t"		\
+	      "add %0, a1, %0"				\
+	      : "=r" (__result) : : "a1");		\
+     (int *)__tls_get_addr (__result); })
diff --git a/sysdeps/csky/dl-tls.h b/sysdeps/csky/dl-tls.h
new file mode 100644
index 0000000..d44fc18
--- /dev/null
+++ b/sysdeps/csky/dl-tls.h
@@ -0,0 +1,26 @@
+/* Thread-local storage handling in the ELF dynamic linker.  C-SKY version.
+   Copyright (C) 2018 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/>.  */
+
+/* Type used for the representation of TLS information in the GOT.  */
+typedef struct
+{
+  unsigned long int ti_module;
+  unsigned long int ti_offset;
+} tls_index;
+
+extern void *__tls_get_addr (tls_index *ti);
diff --git a/sysdeps/csky/libc-tls.c b/sysdeps/csky/libc-tls.c
new file mode 100644
index 0000000..30baf62
--- /dev/null
+++ b/sysdeps/csky/libc-tls.c
@@ -0,0 +1,32 @@
+/* Thread-local storage handling in the ELF dynamic linker.  C-SKY version.
+   Copyright (C) 2018 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 <csu/libc-tls.c>
+#include <dl-tls.h>
+
+/* On C-SKY, linker optimizations are not required, so __tls_get_addr
+   can be called even in statically linked binaries.  In this case module
+   must be always 1 and PT_TLS segment exist in the binary, otherwise it
+   would not link.  */
+
+void *
+__tls_get_addr (tls_index *ti)
+{
+  dtv_t *dtv = THREAD_DTV ();
+  return (char *) dtv[1].pointer.val + ti->ti_offset;
+}
diff --git a/sysdeps/csky/nptl/tcb-offsets.sym b/sysdeps/csky/nptl/tcb-offsets.sym
new file mode 100644
index 0000000..f110520
--- /dev/null
+++ b/sysdeps/csky/nptl/tcb-offsets.sym
@@ -0,0 +1,10 @@
+#include <sysdep.h>
+#include <tls.h>
+
+--
+
+-- Derive offsets relative to the thread register.
+#define thread_offsetof(mem)	(long)(offsetof (struct pthread, mem) - sizeof (struct pthread))
+
+MULTIPLE_THREADS_OFFSET		thread_offsetof (header.multiple_threads)
+TID_OFFSET			thread_offsetof (tid)
diff --git a/sysdeps/csky/nptl/tls.h b/sysdeps/csky/nptl/tls.h
new file mode 100644
index 0000000..b24613c
--- /dev/null
+++ b/sysdeps/csky/nptl/tls.h
@@ -0,0 +1,156 @@
+/* Definitions for thread-local data handling.  NPTL/C-SKY version.
+   Copyright (C) 2018 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 _TLS_H
+#define _TLS_H 1
+
+#ifndef __ASSEMBLER__
+
+# include <stdbool.h>
+# include <stddef.h>
+# include <stdint.h>
+# include <dl-dtv.h>
+
+/* define r31 as thread pointer register. */
+# define READ_THREAD_POINTER() \
+  ({ void *__result;						\
+     __asm__ __volatile__ ("mov %0, r31"			\
+                           : "=r" (__result));			\
+     __result; })
+
+#else
+# include <tcb-offsets.h>
+/* define r31 as thread pointer register. */
+# define READ_THREAD_POINTER() \
+	mov r0, r31;
+#endif /* __ASSEMBLER__ */
+
+#ifndef __ASSEMBLER__
+
+/* Get system call information.  */
+# include <sysdep.h>
+
+/* The TP points to the start of the thread blocks.  */
+# define TLS_DTV_AT_TP	1
+# define TLS_TCB_AT_TP	0
+
+/* Get the thread descriptor definition.  */
+# include <nptl/descr.h>
+
+typedef struct
+{
+  dtv_t *dtv;
+  void *private;
+} tcbhead_t;
+
+/* This is the size of the initial TCB.  */
+# define TLS_INIT_TCB_SIZE	sizeof (tcbhead_t)
+
+/* Alignment requirements for the initial TCB.  */
+# define TLS_INIT_TCB_ALIGN	8
+
+/* This is the size of the TCB.  */
+# define TLS_TCB_SIZE		sizeof (tcbhead_t)
+
+/* Alignment requirements for the TCB.  */
+# define TLS_TCB_ALIGN		8
+
+/* This is the size we need before TCB.  */
+# define TLS_PRE_TCB_SIZE	sizeof (struct pthread)
+
+/* The thread pointer tp points to the end of the TCB.
+   The pthread_descr structure is immediately in front of the TCB.  */
+# define TLS_TCB_OFFSET		0
+
+/* Install the dtv pointer.  The pointer passed is to the element with
+   index -1 which contain the length.  */
+# define INSTALL_DTV(tcbp, dtvp) \
+  (((tcbhead_t *) (tcbp))->dtv = (dtvp) + 1)
+
+/* Install new dtv for current thread.  */
+# define INSTALL_NEW_DTV(dtv) \
+  (THREAD_DTV() = (dtv))
+
+/* Return dtv of given thread descriptor.  */
+# define GET_DTV(tcbp) \
+  (((tcbhead_t *) (tcbp))->dtv)
+
+# define TLS_DEFINE_INIT_TP(tp, pd) void *tp = (pd) + 1
+
+/* Code to initially initialize the thread pointer.  This might need
+   special attention since 'errno' is not yet available and if the
+   operation can cause a failure 'errno' must not be touched.  */
+# define TLS_INIT_TP(tcbp) \
+  ({ INTERNAL_SYSCALL_DECL (err);					\
+     long result_var;							\
+     result_var = INTERNAL_SYSCALL (set_thread_area, err, 1,		\
+                    (char *) (tcbp) + TLS_TCB_OFFSET);			\
+     INTERNAL_SYSCALL_ERROR_P (result_var, err)				\
+       ? "unknown error" : NULL; })
+
+/* Return the address of the dtv for the current thread.  */
+# define THREAD_DTV() \
+  (((tcbhead_t *) (READ_THREAD_POINTER () - TLS_TCB_OFFSET))->dtv)
+
+/* Return the thread descriptor for the current thread.  */
+# undef THREAD_SELF
+# define THREAD_SELF \
+  ((struct pthread *) (READ_THREAD_POINTER ()				\
+		       - TLS_TCB_OFFSET - TLS_PRE_TCB_SIZE))
+
+/* Magic for libthread_db to know how to do THREAD_SELF.  */
+# define DB_THREAD_SELF \
+  CONST_THREAD_AREA (32, sizeof (struct pthread))
+
+/* Access to data in the thread descriptor is easy.  */
+# define THREAD_GETMEM(descr, member) \
+  descr->member
+# define THREAD_GETMEM_NC(descr, member, idx) \
+  descr->member[idx]
+# define THREAD_SETMEM(descr, member, value) \
+  descr->member = (value)
+# define THREAD_SETMEM_NC(descr, member, idx, value) \
+  descr->member[idx] = (value)
+
+/* Get and set the global scope generation counter in struct pthread.  */
+# define THREAD_GSCOPE_IN_TCB      1
+# define THREAD_GSCOPE_FLAG_UNUSED 0
+# define THREAD_GSCOPE_FLAG_USED   1
+# define THREAD_GSCOPE_FLAG_WAIT   2
+# define THREAD_GSCOPE_RESET_FLAG() \
+  do									      \
+    { int __res								      \
+	= atomic_exchange_rel (&THREAD_SELF->header.gscope_flag,	      \
+			       THREAD_GSCOPE_FLAG_UNUSED);		      \
+      if (__res == THREAD_GSCOPE_FLAG_WAIT)				      \
+	lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1, LLL_PRIVATE);    \
+    }									      \
+  while (0)
+# define THREAD_GSCOPE_SET_FLAG() \
+  do									      \
+    {									      \
+      THREAD_SELF->header.gscope_flag = THREAD_GSCOPE_FLAG_USED;	      \
+      atomic_write_barrier ();						      \
+    }									      \
+  while (0)
+# define THREAD_GSCOPE_WAIT() \
+  GL(dl_wait_lookup_done) ()
+
+#endif /* __ASSEMBLER__ */
+
+#endif	/* tls.h */
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [RFC PATCH v3 03/12] C-SKY: Generic math Routines
  2018-06-29  7:58 [RFC PATCH v3 00/12] port C-SKY to glibc Mao Han
  2018-06-29  7:58 ` [RFC PATCH v3 01/12] C-SKY: ABI related code Mao Han
  2018-06-29  7:58 ` [RFC PATCH v3 02/12] C-SKY: TLS support Mao Han
@ 2018-06-29  7:58 ` Mao Han
  2018-06-29  7:58 ` [RFC PATCH v3 04/12] C-SKY: Hard Float Support Mao Han
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 22+ messages in thread
From: Mao Han @ 2018-06-29  7:58 UTC (permalink / raw
  To: libc-alpha; +Cc: Mao Han, c-sky_gcc_upstream, gnu-csky

This patch contains the miscellaneous math routines and headers we have
implemented for C-SKY.

	* sysdeps/csky/bits/fenv.h: New file.
	* sysdeps/csky/libm-test-ulps: Likewise.
	* sysdeps/csky/libm-test-ulps-name: Likewise.
	* sysdeps/csky/math-tests.h: Likewise.
	* sysdeps/csky/sfp-machine.h: Likewise.
---
 sysdeps/csky/bits/fenv.h         |   92 +++
 sysdeps/csky/libm-test-ulps      | 1694 ++++++++++++++++++++++++++++++++++++++
 sysdeps/csky/libm-test-ulps-name |    1 +
 sysdeps/csky/math-tests.h        |   32 +
 sysdeps/csky/sfp-machine.h       |   50 ++
 5 files changed, 1869 insertions(+)
 create mode 100644 sysdeps/csky/bits/fenv.h
 create mode 100644 sysdeps/csky/libm-test-ulps
 create mode 100644 sysdeps/csky/libm-test-ulps-name
 create mode 100644 sysdeps/csky/math-tests.h
 create mode 100644 sysdeps/csky/sfp-machine.h

diff --git a/sysdeps/csky/bits/fenv.h b/sysdeps/csky/bits/fenv.h
new file mode 100644
index 0000000..77b2ae0
--- /dev/null
+++ b/sysdeps/csky/bits/fenv.h
@@ -0,0 +1,92 @@
+/* Floating point environment.  C-SKY version.
+   Copyright (C) 2018 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 _FENV_H
+# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
+#endif
+
+/* Define bits representing the exception.  We use the bit positions
+   of the appropriate bits in the FPU control word.  */
+enum
+  {
+    FE_INVALID =
+#define FE_INVALID	0x01
+      FE_INVALID,
+    FE_DIVBYZERO =
+#define FE_DIVBYZERO	0x02
+      FE_DIVBYZERO,
+    FE_OVERFLOW =
+#define FE_OVERFLOW	0x04
+      FE_OVERFLOW,
+    FE_UNDERFLOW =
+#define FE_UNDERFLOW	0x08
+      FE_UNDERFLOW,
+    FE_INEXACT =
+#define FE_INEXACT	0x10
+      FE_INEXACT,
+    __FE_DENORMAL = 0x20
+  };
+
+#define FE_ALL_EXCEPT \
+	(FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID)
+
+/* The C-SKY FPU supports all of the four defined rounding modes.  We
+   use again the bit positions in the FPU control word as the values
+   for the appropriate macros.  */
+enum
+  {
+    FE_TONEAREST =
+#define FE_TONEAREST	(0x0 << 24)
+      FE_TONEAREST,
+    FE_TOWARDZERO =
+#define FE_TOWARDZERO	(0x1 << 24)
+      FE_TOWARDZERO,
+    FE_UPWARD =
+#define FE_UPWARD	(0x2 << 24)
+      FE_UPWARD,
+    FE_DOWNWARD =
+#define FE_DOWNWARD	(0x3 << 24)
+      FE_DOWNWARD,
+    __FE_ROUND_MASK = (0x3 << 24)
+  };
+
+/* Type representing exception flags.  */
+typedef unsigned int fexcept_t;
+
+/* Type representing floating-point environment. */
+typedef struct
+{
+  unsigned int __fpcr;
+  unsigned int __fpsr;
+} fenv_t;
+
+/* If the default argument is used we use this value.  */
+#define FE_DFL_ENV	((const fenv_t *) -1)
+
+#ifdef __USE_GNU
+/* Floating-point environment where none of the exceptions are masked.  */
+# define FE_NOMASK_ENV	((const fenv_t *) -2)
+#endif
+
+#if __GLIBC_USE (IEC_60559_BFP_EXT)
+/* Type representing floating-point control modes.  */
+typedef unsigned int femode_t;
+
+/* Default floating-point control modes.  */
+# define FE_DFL_MODE	((const femode_t *) -1L)
+#endif
diff --git a/sysdeps/csky/libm-test-ulps b/sysdeps/csky/libm-test-ulps
new file mode 100644
index 0000000..4e0cee8
--- /dev/null
+++ b/sysdeps/csky/libm-test-ulps
@@ -0,0 +1,1694 @@
+# Begin of automatic generation
+
+# Maximal error of functions:
+Function: "acos":
+float: 1
+ifloat: 1
+
+Function: "acos_downward":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "acos_towardzero":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "acos_upward":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "acosh":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: "acosh_downward":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: "acosh_towardzero":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: "acosh_upward":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: "asin":
+float: 1
+ifloat: 1
+
+Function: "asin_downward":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "asin_towardzero":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "asin_upward":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "asinh":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "asinh_downward":
+double: 3
+float: 3
+idouble: 3
+ifloat: 3
+
+Function: "asinh_towardzero":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: "asinh_upward":
+double: 3
+float: 3
+idouble: 3
+ifloat: 3
+
+Function: "atan":
+float: 1
+ifloat: 1
+
+Function: "atan2":
+float: 1
+ifloat: 1
+
+Function: "atan2_downward":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+Function: "atan2_towardzero":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+Function: "atan2_upward":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+Function: "atan_downward":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+Function: "atan_towardzero":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "atan_upward":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+Function: "atanh":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: "atanh_downward":
+double: 3
+float: 3
+idouble: 3
+ifloat: 3
+
+Function: "atanh_towardzero":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: "atanh_upward":
+double: 3
+float: 3
+idouble: 3
+ifloat: 3
+
+Function: "cabs":
+double: 1
+idouble: 1
+
+Function: "cabs_downward":
+double: 1
+idouble: 1
+
+Function: "cabs_towardzero":
+double: 1
+idouble: 1
+
+Function: "cabs_upward":
+double: 1
+idouble: 1
+
+Function: Real part of "cacos":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+Function: Imaginary part of "cacos":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: Real part of "cacos_downward":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: Imaginary part of "cacos_downward":
+double: 5
+float: 3
+idouble: 5
+ifloat: 3
+
+Function: Real part of "cacos_towardzero":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: Imaginary part of "cacos_towardzero":
+double: 5
+float: 3
+idouble: 5
+ifloat: 3
+
+Function: Real part of "cacos_upward":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: Imaginary part of "cacos_upward":
+double: 4
+float: 4
+idouble: 4
+ifloat: 4
+
+Function: Real part of "cacosh":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: Imaginary part of "cacosh":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+Function: Real part of "cacosh_downward":
+double: 5
+float: 3
+idouble: 5
+ifloat: 3
+
+Function: Imaginary part of "cacosh_downward":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: Real part of "cacosh_towardzero":
+double: 5
+float: 3
+idouble: 5
+ifloat: 3
+
+Function: Imaginary part of "cacosh_towardzero":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: Real part of "cacosh_upward":
+double: 4
+float: 4
+idouble: 4
+ifloat: 4
+
+Function: Imaginary part of "cacosh_upward":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: "carg":
+float: 1
+ifloat: 1
+
+Function: "carg_downward":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+Function: "carg_towardzero":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+Function: "carg_upward":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+Function: Real part of "casin":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Imaginary part of "casin":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: Real part of "casin_downward":
+double: 3
+float: 1
+idouble: 3
+ifloat: 1
+
+Function: Imaginary part of "casin_downward":
+double: 5
+float: 3
+idouble: 5
+ifloat: 3
+
+Function: Real part of "casin_towardzero":
+double: 3
+float: 1
+idouble: 3
+ifloat: 1
+
+Function: Imaginary part of "casin_towardzero":
+double: 5
+float: 3
+idouble: 5
+ifloat: 3
+
+Function: Real part of "casin_upward":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+
+Function: Imaginary part of "casin_upward":
+double: 4
+float: 4
+idouble: 4
+ifloat: 4
+
+Function: Real part of "casinh":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: Imaginary part of "casinh":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Real part of "casinh_downward":
+double: 5
+float: 3
+idouble: 5
+ifloat: 3
+
+Function: Imaginary part of "casinh_downward":
+double: 3
+float: 1
+idouble: 3
+ifloat: 1
+
+Function: Real part of "casinh_towardzero":
+double: 5
+float: 3
+idouble: 5
+ifloat: 3
+
+Function: Imaginary part of "casinh_towardzero":
+double: 3
+float: 1
+idouble: 3
+ifloat: 1
+
+Function: Real part of "casinh_upward":
+double: 4
+float: 4
+idouble: 4
+ifloat: 4
+
+Function: Imaginary part of "casinh_upward":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: Real part of "catan":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Imaginary part of "catan":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Real part of "catan_downward":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Imaginary part of "catan_downward":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: Real part of "catan_towardzero":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Imaginary part of "catan_towardzero":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+
+Function: Real part of "catan_upward":
+float: 1
+ifloat: 1
+
+Function: Imaginary part of "catan_upward":
+double: 3
+float: 3
+idouble: 3
+ifloat: 3
+
+Function: Real part of "catanh":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Imaginary part of "catanh":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Real part of "catanh_downward":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: Imaginary part of "catanh_downward":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+Function: Real part of "catanh_towardzero":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+
+Function: Imaginary part of "catanh_towardzero":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+Function: Real part of "catanh_upward":
+double: 4
+float: 3
+idouble: 4
+ifloat: 3
+
+Function: Imaginary part of "catanh_upward":
+float: 1
+ifloat: 1
+
+Function: "cbrt":
+double: 3
+float: 1
+idouble: 3
+ifloat: 1
+
+Function: "cbrt_downward":
+double: 4
+float: 1
+idouble: 4
+ifloat: 1
+
+Function: "cbrt_towardzero":
+double: 3
+float: 1
+idouble: 3
+ifloat: 1
+
+Function: "cbrt_upward":
+double: 5
+float: 1
+idouble: 5
+ifloat: 1
+
+Function: Real part of "ccos":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Imaginary part of "ccos":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Real part of "ccos_downward":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Imaginary part of "ccos_downward":
+double: 2
+float: 3
+idouble: 2
+ifloat: 3
+
+Function: Real part of "ccos_towardzero":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+Function: Imaginary part of "ccos_towardzero":
+double: 2
+float: 3
+idouble: 2
+ifloat: 3
+
+Function: Real part of "ccos_upward":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+Function: Imaginary part of "ccos_upward":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: Real part of "ccosh":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Imaginary part of "ccosh":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Real part of "ccosh_downward":
+double: 1
+float: 3
+idouble: 1
+ifloat: 3
+
+Function: Imaginary part of "ccosh_downward":
+double: 2
+float: 3
+idouble: 2
+ifloat: 3
+
+Function: Real part of "ccosh_towardzero":
+double: 1
+float: 3
+idouble: 1
+ifloat: 3
+
+Function: Imaginary part of "ccosh_towardzero":
+double: 2
+float: 3
+idouble: 2
+ifloat: 3
+
+Function: Real part of "ccosh_upward":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+Function: Imaginary part of "ccosh_upward":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: Real part of "cexp":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+
+Function: Imaginary part of "cexp":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+Function: Real part of "cexp_downward":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+Function: Imaginary part of "cexp_downward":
+double: 1
+float: 3
+idouble: 1
+ifloat: 3
+
+Function: Real part of "cexp_towardzero":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+Function: Imaginary part of "cexp_towardzero":
+double: 1
+float: 3
+idouble: 1
+ifloat: 3
+
+Function: Real part of "cexp_upward":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+Function: Imaginary part of "cexp_upward":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+Function: Real part of "clog":
+double: 3
+float: 3
+idouble: 3
+ifloat: 3
+
+Function: Imaginary part of "clog":
+float: 1
+ifloat: 1
+
+Function: Real part of "clog10":
+double: 3
+float: 4
+idouble: 3
+ifloat: 4
+
+Function: Imaginary part of "clog10":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: Real part of "clog10_downward":
+double: 5
+float: 4
+idouble: 5
+ifloat: 4
+
+Function: Imaginary part of "clog10_downward":
+double: 2
+float: 4
+idouble: 2
+ifloat: 4
+
+Function: Real part of "clog10_towardzero":
+double: 5
+float: 5
+idouble: 5
+ifloat: 5
+
+Function: Imaginary part of "clog10_towardzero":
+double: 2
+float: 4
+idouble: 2
+ifloat: 4
+
+Function: Real part of "clog10_upward":
+double: 6
+float: 5
+idouble: 6
+ifloat: 5
+
+Function: Imaginary part of "clog10_upward":
+double: 2
+float: 4
+idouble: 2
+ifloat: 4
+
+Function: Real part of "clog_downward":
+double: 4
+float: 3
+idouble: 4
+ifloat: 3
+
+Function: Imaginary part of "clog_downward":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+Function: Real part of "clog_towardzero":
+double: 4
+float: 4
+idouble: 4
+ifloat: 4
+
+Function: Imaginary part of "clog_towardzero":
+double: 1
+float: 3
+idouble: 1
+ifloat: 3
+
+Function: Real part of "clog_upward":
+double: 4
+float: 3
+idouble: 4
+ifloat: 3
+
+Function: Imaginary part of "clog_upward":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+Function: "cos":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "cos_downward":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+Function: "cos_towardzero":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "cos_upward":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+Function: "cosh":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "cosh_downward":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "cosh_towardzero":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "cosh_upward":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+Function: Real part of "cpow":
+double: 2
+float: 5
+idouble: 2
+ifloat: 5
+
+Function: Imaginary part of "cpow":
+float: 2
+ifloat: 2
+
+Function: Real part of "cpow_downward":
+double: 4
+float: 8
+idouble: 4
+ifloat: 8
+
+Function: Imaginary part of "cpow_downward":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+Function: Real part of "cpow_towardzero":
+double: 4
+float: 8
+idouble: 4
+ifloat: 8
+
+Function: Imaginary part of "cpow_towardzero":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+Function: Real part of "cpow_upward":
+double: 4
+float: 1
+idouble: 4
+ifloat: 1
+
+Function: Imaginary part of "cpow_upward":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+Function: Real part of "csin":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Real part of "csin_downward":
+double: 2
+float: 3
+idouble: 2
+ifloat: 3
+
+Function: Imaginary part of "csin_downward":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Real part of "csin_towardzero":
+double: 2
+float: 3
+idouble: 2
+ifloat: 3
+
+Function: Imaginary part of "csin_towardzero":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Real part of "csin_upward":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: Imaginary part of "csin_upward":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+Function: Real part of "csinh":
+float: 1
+ifloat: 1
+
+Function: Imaginary part of "csinh":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Real part of "csinh_downward":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: Imaginary part of "csinh_downward":
+double: 2
+float: 3
+idouble: 2
+ifloat: 3
+
+Function: Real part of "csinh_towardzero":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: Imaginary part of "csinh_towardzero":
+double: 2
+float: 3
+idouble: 2
+ifloat: 3
+
+Function: Real part of "csinh_upward":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+Function: Imaginary part of "csinh_upward":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: Real part of "csqrt":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: Imaginary part of "csqrt":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: Real part of "csqrt_downward":
+double: 5
+float: 4
+idouble: 5
+ifloat: 4
+
+Function: Imaginary part of "csqrt_downward":
+double: 4
+float: 3
+idouble: 4
+ifloat: 3
+
+Function: Real part of "csqrt_towardzero":
+double: 4
+float: 3
+idouble: 4
+ifloat: 3
+
+Function: Imaginary part of "csqrt_towardzero":
+double: 4
+float: 3
+idouble: 4
+ifloat: 3
+
+Function: Real part of "csqrt_upward":
+double: 5
+float: 4
+idouble: 5
+ifloat: 4
+
+Function: Imaginary part of "csqrt_upward":
+double: 3
+float: 3
+idouble: 3
+ifloat: 3
+
+Function: Real part of "ctan":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Imaginary part of "ctan":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: Real part of "ctan_downward":
+double: 6
+float: 5
+idouble: 6
+ifloat: 5
+
+Function: Imaginary part of "ctan_downward":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+
+Function: Real part of "ctan_towardzero":
+double: 5
+float: 3
+idouble: 5
+ifloat: 3
+
+Function: Imaginary part of "ctan_towardzero":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: Real part of "ctan_upward":
+double: 2
+float: 3
+idouble: 2
+ifloat: 3
+
+Function: Imaginary part of "ctan_upward":
+double: 2
+float: 3
+idouble: 2
+ifloat: 3
+
+Function: Real part of "ctanh":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: Imaginary part of "ctanh":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: Real part of "ctanh_downward":
+double: 4
+float: 1
+idouble: 4
+ifloat: 1
+
+Function: Imaginary part of "ctanh_downward":
+double: 6
+float: 5
+idouble: 6
+ifloat: 5
+
+Function: Real part of "ctanh_towardzero":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: Imaginary part of "ctanh_towardzero":
+double: 5
+float: 3
+idouble: 5
+ifloat: 3
+
+Function: Real part of "ctanh_upward":
+double: 2
+float: 3
+idouble: 2
+ifloat: 3
+
+Function: Imaginary part of "ctanh_upward":
+double: 2
+float: 3
+idouble: 2
+ifloat: 3
+
+Function: "erf":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "erf_downward":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "erf_towardzero":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "erf_upward":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "erfc":
+double: 3
+float: 2
+idouble: 3
+ifloat: 2
+
+Function: "erfc_downward":
+double: 5
+float: 6
+idouble: 5
+ifloat: 6
+
+Function: "erfc_towardzero":
+double: 3
+float: 4
+idouble: 3
+ifloat: 4
+
+Function: "erfc_upward":
+double: 5
+float: 6
+idouble: 5
+ifloat: 6
+
+Function: "exp":
+float: 1
+ifloat: 1
+
+Function: "exp10":
+double: 2
+idouble: 2
+
+Function: "exp10_downward":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+
+Function: "exp10_towardzero":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+
+Function: "exp10_upward":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+
+Function: "exp2":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "exp2_downward":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "exp2_towardzero":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "exp2_upward":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "exp_downward":
+double: 1
+idouble: 1
+
+Function: "exp_towardzero":
+double: 1
+idouble: 1
+
+Function: "exp_upward":
+double: 1
+idouble: 1
+
+Function: "expm1":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "expm1_downward":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "expm1_towardzero":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+Function: "expm1_upward":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "gamma":
+double: 4
+float: 4
+idouble: 4
+ifloat: 4
+
+Function: "gamma_downward":
+double: 5
+float: 4
+idouble: 5
+ifloat: 4
+
+Function: "gamma_towardzero":
+double: 5
+float: 4
+idouble: 5
+ifloat: 4
+
+Function: "gamma_upward":
+double: 5
+float: 5
+idouble: 5
+ifloat: 5
+
+Function: "hypot":
+double: 1
+idouble: 1
+
+Function: "hypot_downward":
+double: 1
+idouble: 1
+
+Function: "hypot_towardzero":
+double: 1
+idouble: 1
+
+Function: "hypot_upward":
+double: 1
+idouble: 1
+
+Function: "j0":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: "j0_downward":
+double: 2
+float: 3
+idouble: 2
+ifloat: 3
+
+Function: "j0_towardzero":
+double: 3
+float: 2
+idouble: 3
+ifloat: 2
+
+Function: "j0_upward":
+double: 3
+float: 2
+idouble: 3
+ifloat: 2
+
+Function: "j1":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+Function: "j1_downward":
+double: 3
+float: 2
+idouble: 3
+ifloat: 2
+
+Function: "j1_towardzero":
+double: 3
+float: 2
+idouble: 3
+ifloat: 2
+
+Function: "j1_upward":
+double: 3
+float: 5
+idouble: 3
+ifloat: 5
+
+Function: "jn":
+double: 4
+float: 4
+idouble: 4
+ifloat: 4
+
+Function: "jn_downward":
+double: 5
+float: 5
+idouble: 5
+ifloat: 5
+
+Function: "jn_towardzero":
+double: 5
+float: 5
+idouble: 5
+ifloat: 5
+
+Function: "jn_upward":
+double: 5
+float: 5
+idouble: 5
+ifloat: 5
+
+Function: "lgamma":
+double: 4
+float: 4
+idouble: 4
+ifloat: 4
+
+Function: "lgamma_downward":
+double: 5
+float: 4
+idouble: 5
+ifloat: 4
+
+Function: "lgamma_towardzero":
+double: 5
+float: 4
+idouble: 5
+ifloat: 4
+
+Function: "lgamma_upward":
+double: 5
+float: 5
+idouble: 5
+ifloat: 5
+
+Function: "log":
+float: 1
+ifloat: 1
+
+Function: "log10":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: "log10_downward":
+double: 2
+float: 3
+idouble: 2
+ifloat: 3
+
+Function: "log10_towardzero":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: "log10_upward":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: "log1p":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "log1p_downward":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: "log1p_towardzero":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: "log1p_upward":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: "log2":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+
+Function: "log2_downward":
+double: 3
+float: 3
+idouble: 3
+ifloat: 3
+
+Function: "log2_towardzero":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: "log2_upward":
+double: 3
+float: 3
+idouble: 3
+ifloat: 3
+
+Function: "log_downward":
+float: 2
+ifloat: 2
+
+Function: "log_towardzero":
+float: 2
+ifloat: 2
+
+Function: "log_upward":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+Function: "pow":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "pow10":
+double: 2
+idouble: 2
+
+Function: "pow10_downward":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+
+Function: "pow10_towardzero":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+
+Function: "pow10_upward":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+
+Function: "pow_downward":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "pow_towardzero":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "pow_upward":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "sin":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "sin_downward":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+Function: "sin_towardzero":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "sin_upward":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+Function: "sincos":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "sincos_downward":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+Function: "sincos_towardzero":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "sincos_upward":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+Function: "sinh":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: "sinh_downward":
+double: 3
+float: 3
+idouble: 3
+ifloat: 3
+
+Function: "sinh_towardzero":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: "sinh_upward":
+double: 3
+float: 3
+idouble: 3
+ifloat: 3
+
+Function: "tan":
+float: 1
+ifloat: 1
+
+Function: "tan_downward":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+Function: "tan_towardzero":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "tan_upward":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "tanh":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: "tanh_downward":
+double: 3
+float: 3
+idouble: 3
+ifloat: 3
+
+Function: "tanh_towardzero":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: "tanh_upward":
+double: 3
+float: 3
+idouble: 3
+ifloat: 3
+
+Function: "tgamma":
+double: 5
+float: 4
+idouble: 5
+ifloat: 4
+
+Function: "tgamma_downward":
+double: 5
+float: 5
+idouble: 5
+ifloat: 5
+
+Function: "tgamma_towardzero":
+double: 5
+float: 4
+idouble: 5
+ifloat: 4
+
+Function: "tgamma_upward":
+double: 4
+float: 4
+idouble: 4
+ifloat: 4
+
+Function: "y0":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+
+Function: "y0_downward":
+double: 3
+float: 2
+idouble: 3
+ifloat: 2
+
+Function: "y0_towardzero":
+double: 3
+float: 3
+idouble: 3
+ifloat: 3
+
+Function: "y0_upward":
+double: 3
+float: 4
+idouble: 3
+ifloat: 4
+
+Function: "y1":
+double: 3
+float: 2
+idouble: 3
+ifloat: 2
+
+Function: "y1_downward":
+double: 3
+float: 2
+idouble: 3
+ifloat: 2
+
+Function: "y1_towardzero":
+double: 3
+float: 2
+idouble: 3
+ifloat: 2
+
+Function: "y1_upward":
+double: 7
+float: 2
+idouble: 7
+ifloat: 2
+
+Function: "yn":
+double: 3
+float: 3
+idouble: 3
+ifloat: 3
+
+Function: "yn_downward":
+double: 3
+float: 2
+idouble: 3
+ifloat: 2
+
+Function: "yn_towardzero":
+double: 3
+float: 3
+idouble: 3
+ifloat: 3
+
+Function: "yn_upward":
+double: 4
+float: 4
+idouble: 4
+ifloat: 4
+
+# end of automatic generation
diff --git a/sysdeps/csky/libm-test-ulps-name b/sysdeps/csky/libm-test-ulps-name
new file mode 100644
index 0000000..236b0fb
--- /dev/null
+++ b/sysdeps/csky/libm-test-ulps-name
@@ -0,0 +1 @@
+CSKY
diff --git a/sysdeps/csky/math-tests.h b/sysdeps/csky/math-tests.h
new file mode 100644
index 0000000..d0b2ff2
--- /dev/null
+++ b/sysdeps/csky/math-tests.h
@@ -0,0 +1,32 @@
+/* Configuration for math tests.  C-SKY version.
+   Copyright (C) 2018 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/>.  */
+
+/* C-SKY soft float does not support exceptions and rounding modes.  */
+#ifdef __CSKY_SOFT_FLOAT__
+# define ROUNDING_TESTS_float(MODE)	((MODE) == FE_TONEAREST)
+# define ROUNDING_TESTS_double(MODE)	((MODE) == FE_TONEAREST)
+# define ROUNDING_TESTS_long_double(MODE)	((MODE) == FE_TONEAREST)
+# define EXCEPTION_TESTS_float	0
+# define EXCEPTION_TESTS_double	0
+# define EXCEPTION_TESTS_long_double	0
+#endif
+
+/* Trapping exceptions are not supported on C-SKY.  */
+#define EXCEPTION_ENABLE_SUPPORTED(EXCEPT)	((EXCEPT) == 0)
+
+#include_next <math-tests.h>
diff --git a/sysdeps/csky/sfp-machine.h b/sysdeps/csky/sfp-machine.h
new file mode 100644
index 0000000..69c6f33
--- /dev/null
+++ b/sysdeps/csky/sfp-machine.h
@@ -0,0 +1,50 @@
+#define _FP_W_TYPE_SIZE		32
+#define _FP_W_TYPE		unsigned long
+#define _FP_WS_TYPE		signed long
+#define _FP_I_TYPE		long
+
+#define _FP_MUL_MEAT_S(R,X,Y)				\
+  _FP_MUL_MEAT_1_wide(_FP_WFRACBITS_S,R,X,Y,umul_ppmm)
+#define _FP_MUL_MEAT_D(R,X,Y)				\
+  _FP_MUL_MEAT_2_wide(_FP_WFRACBITS_D,R,X,Y,umul_ppmm)
+#define _FP_MUL_MEAT_Q(R,X,Y)				\
+  _FP_MUL_MEAT_4_wide(_FP_WFRACBITS_Q,R,X,Y,umul_ppmm)
+
+#define _FP_MUL_MEAT_DW_S(R,X,Y)				\
+  _FP_MUL_MEAT_DW_1_wide(_FP_WFRACBITS_S,R,X,Y,umul_ppmm)
+#define _FP_MUL_MEAT_DW_D(R,X,Y)				\
+  _FP_MUL_MEAT_DW_2_wide(_FP_WFRACBITS_D,R,X,Y,umul_ppmm)
+#define _FP_MUL_MEAT_DW_Q(R,X,Y)				\
+  _FP_MUL_MEAT_DW_4_wide(_FP_WFRACBITS_Q,R,X,Y,umul_ppmm)
+
+#define _FP_DIV_MEAT_S(R,X,Y)	_FP_DIV_MEAT_1_loop(S,R,X,Y)
+#define _FP_DIV_MEAT_D(R,X,Y)	_FP_DIV_MEAT_2_udiv(D,R,X,Y)
+#define _FP_DIV_MEAT_Q(R,X,Y)	_FP_DIV_MEAT_4_udiv(Q,R,X,Y)
+
+#define _FP_NANFRAC_S		_FP_QNANBIT_S
+#define _FP_NANFRAC_D		_FP_QNANBIT_D, 0
+#define _FP_NANFRAC_Q		_FP_QNANBIT_Q, 0, 0, 0
+#define _FP_NANSIGN_S		0
+#define _FP_NANSIGN_D		0
+#define _FP_NANSIGN_Q		0
+
+#define _FP_KEEPNANFRACP 1
+#define _FP_QNANNEGATEDP 0
+
+#define _FP_CHOOSENAN(fs, wc, R, X, Y, OP)			\
+  do {								\
+    if ((_FP_FRAC_HIGH_RAW_##fs(X) & _FP_QNANBIT_##fs)		\
+	&& !(_FP_FRAC_HIGH_RAW_##fs(Y) & _FP_QNANBIT_##fs))	\
+      {								\
+	R##_s = Y##_s;						\
+	_FP_FRAC_COPY_##wc(R,Y);				\
+      }								\
+    else							\
+      {								\
+	R##_s = X##_s;						\
+	_FP_FRAC_COPY_##wc(R,X);				\
+      }								\
+    R##_c = FP_CLS_NAN;						\
+  } while (0)
+
+#define _FP_TININESS_AFTER_ROUNDING 0
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [RFC PATCH v3 04/12] C-SKY: Hard Float Support
  2018-06-29  7:58 [RFC PATCH v3 00/12] port C-SKY to glibc Mao Han
                   ` (2 preceding siblings ...)
  2018-06-29  7:58 ` [RFC PATCH v3 03/12] C-SKY: Generic math Routines Mao Han
@ 2018-06-29  7:58 ` Mao Han
  2018-06-29  7:58 ` [RFC PATCH v3 05/12] C-SKY: Atomic and Locking Routines Mao Han
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 22+ messages in thread
From: Mao Han @ 2018-06-29  7:58 UTC (permalink / raw
  To: libc-alpha; +Cc: Mao Han, c-sky_gcc_upstream, gnu-csky

This patch contains hardware floating-point support for C-SKY.

	* sysdeps/csky/fpu/fclrexcpt.c: New file.
	* sysdeps/csky/fpu/fedisblxcpt.c: Likewise.
	* sysdeps/csky/fpu/feenablxcpt.c: Likewise.
	* sysdeps/csky/fpu/fegetenv.c: Likewise.
	* sysdeps/csky/fpu/fegetexcept.c: Likewise.
	* sysdeps/csky/fpu/fegetmode.c: Likewise.
	* sysdeps/csky/fpu/fegetround.c: Likewise.
	* sysdeps/csky/fpu/feholdexcpt.c: Likewise.
	* sysdeps/csky/fpu/fenv_libc.h: Likewise.
	* sysdeps/csky/fpu/fenv_private.h: Likewise.
	* sysdeps/csky/fpu/fesetenv.c: Likewise.
	* sysdeps/csky/fpu/fesetexcept.c: Likewise.
	* sysdeps/csky/fpu/fesetmode.c: Likewise.
	* sysdeps/csky/fpu/fesetround.c: Likewise.
	* sysdeps/csky/fpu/feupdateenv.c: Likewise.
	* sysdeps/csky/fpu/fgetexcptflg.c: Likewise.
	* sysdeps/csky/fpu/fpu_control.h: Likewise.
	* sysdeps/csky/fpu/fraiseexcpt.c: Likewise.
	* sysdeps/csky/fpu/fsetexcptflg.c: Likewise.
	* sysdeps/csky/fpu/ftestexcept.c: Likewise.
	* sysdeps/csky/fpu/math_private.h: Likewise.
---
 sysdeps/csky/fpu/fclrexcpt.c    |  42 ++++++
 sysdeps/csky/fpu/fedisblxcpt.c  |  41 ++++++
 sysdeps/csky/fpu/feenablxcpt.c  |  40 ++++++
 sysdeps/csky/fpu/fegetenv.c     |  37 ++++++
 sysdeps/csky/fpu/fegetexcept.c  |  32 +++++
 sysdeps/csky/fpu/fegetmode.c    |  28 ++++
 sysdeps/csky/fpu/fegetround.c   |  34 +++++
 sysdeps/csky/fpu/feholdexcpt.c  |  34 +++++
 sysdeps/csky/fpu/fenv_libc.h    |  30 +++++
 sysdeps/csky/fpu/fenv_private.h | 284 ++++++++++++++++++++++++++++++++++++++++
 sysdeps/csky/fpu/fesetenv.c     |  59 +++++++++
 sysdeps/csky/fpu/fesetexcept.c  |  33 +++++
 sysdeps/csky/fpu/fesetmode.c    |  33 +++++
 sysdeps/csky/fpu/fesetround.c   |  32 +++++
 sysdeps/csky/fpu/feupdateenv.c  |  46 +++++++
 sysdeps/csky/fpu/fgetexcptflg.c |  32 +++++
 sysdeps/csky/fpu/fpu_control.h  | 133 +++++++++++++++++++
 sysdeps/csky/fpu/fraiseexcpt.c  | 126 ++++++++++++++++++
 sysdeps/csky/fpu/fsetexcptflg.c |  43 ++++++
 sysdeps/csky/fpu/ftestexcept.c  |  30 +++++
 sysdeps/csky/fpu/math_private.h |   7 +
 21 files changed, 1176 insertions(+)
 create mode 100644 sysdeps/csky/fpu/fclrexcpt.c
 create mode 100644 sysdeps/csky/fpu/fedisblxcpt.c
 create mode 100644 sysdeps/csky/fpu/feenablxcpt.c
 create mode 100644 sysdeps/csky/fpu/fegetenv.c
 create mode 100644 sysdeps/csky/fpu/fegetexcept.c
 create mode 100644 sysdeps/csky/fpu/fegetmode.c
 create mode 100644 sysdeps/csky/fpu/fegetround.c
 create mode 100644 sysdeps/csky/fpu/feholdexcpt.c
 create mode 100644 sysdeps/csky/fpu/fenv_libc.h
 create mode 100644 sysdeps/csky/fpu/fenv_private.h
 create mode 100644 sysdeps/csky/fpu/fesetenv.c
 create mode 100644 sysdeps/csky/fpu/fesetexcept.c
 create mode 100644 sysdeps/csky/fpu/fesetmode.c
 create mode 100644 sysdeps/csky/fpu/fesetround.c
 create mode 100644 sysdeps/csky/fpu/feupdateenv.c
 create mode 100644 sysdeps/csky/fpu/fgetexcptflg.c
 create mode 100644 sysdeps/csky/fpu/fpu_control.h
 create mode 100644 sysdeps/csky/fpu/fraiseexcpt.c
 create mode 100644 sysdeps/csky/fpu/fsetexcptflg.c
 create mode 100644 sysdeps/csky/fpu/ftestexcept.c
 create mode 100644 sysdeps/csky/fpu/math_private.h

diff --git a/sysdeps/csky/fpu/fclrexcpt.c b/sysdeps/csky/fpu/fclrexcpt.c
new file mode 100644
index 0000000..de3326b
--- /dev/null
+++ b/sysdeps/csky/fpu/fclrexcpt.c
@@ -0,0 +1,42 @@
+/* Clear given exceptions in current floating-point environment.
+   Copyright (C) 2018 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 <fenv.h>
+#include <fenv_libc.h>
+#include <fpu_control.h>
+
+int
+feclearexcept (int excepts)
+{
+  int fpsr;
+
+  /* Mask out unsupported bits/exceptions.  */
+  excepts &= FE_ALL_EXCEPT;
+
+  /* Read the complete control word.  */
+  _FPU_GETFPSR (fpsr);
+
+  /* Clear the relevant bits.  */
+  fpsr &= ~(excepts | (excepts << CAUSE_SHIFT));
+
+  /* Put the new data in effect.  */
+  _FPU_SETFPSR (fpsr);
+
+  return 0;
+}
+libm_hidden_def (feclearexcept)
diff --git a/sysdeps/csky/fpu/fedisblxcpt.c b/sysdeps/csky/fpu/fedisblxcpt.c
new file mode 100644
index 0000000..6b51611
--- /dev/null
+++ b/sysdeps/csky/fpu/fedisblxcpt.c
@@ -0,0 +1,41 @@
+/* Disable floating-point exceptions.
+   Copyright (C) 2018 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 <fenv.h>
+#include <fenv_libc.h>
+#include <fpu_control.h>
+
+int
+fedisableexcept (int excepts)
+{
+  unsigned int new_exc, old_exc;
+
+  /* Get the current control word.  */
+  _FPU_GETCW (new_exc);
+
+  old_exc = (new_exc & ENABLE_MASK) >> ENABLE_SHIFT;
+
+  /* Get the except disable mask.  */
+  excepts &= FE_ALL_EXCEPT;
+  new_exc &= ~(excepts << ENABLE_SHIFT);
+
+  /* Put the new data in effect.  */
+  _FPU_SETCW (new_exc);
+
+  return old_exc;
+}
diff --git a/sysdeps/csky/fpu/feenablxcpt.c b/sysdeps/csky/fpu/feenablxcpt.c
new file mode 100644
index 0000000..feafdb6
--- /dev/null
+++ b/sysdeps/csky/fpu/feenablxcpt.c
@@ -0,0 +1,40 @@
+/* Enable floating-point exceptions.
+   Copyright (C) 2018 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 <fenv.h>
+#include <fenv_libc.h>
+#include <fpu_control.h>
+
+int
+feenableexcept (int excepts)
+{
+  unsigned int new_exc, old_exc;
+
+  /* Get the current control word.  */
+  _FPU_GETCW (new_exc);
+
+  old_exc = (new_exc & ENABLE_MASK) >> ENABLE_SHIFT;
+
+  excepts &= FE_ALL_EXCEPT;
+
+  new_exc |= excepts << ENABLE_SHIFT;
+
+  _FPU_SETCW (new_exc);
+
+  return old_exc;
+}
diff --git a/sysdeps/csky/fpu/fegetenv.c b/sysdeps/csky/fpu/fegetenv.c
new file mode 100644
index 0000000..3865839
--- /dev/null
+++ b/sysdeps/csky/fpu/fegetenv.c
@@ -0,0 +1,37 @@
+/* Store current floating-point environment.
+   Copyright (C) 2018 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 <fenv.h>
+#include <fpu_control.h>
+
+int
+__fegetenv (fenv_t *envp)
+{
+  unsigned int fpcr;
+  unsigned int fpsr;
+
+  _FPU_GETCW (fpcr);
+  _FPU_GETFPSR (fpsr);
+  envp->__fpcr = fpcr;
+  envp->__fpsr = fpsr;
+
+  return 0;
+}
+libm_hidden_def (__fegetenv)
+weak_alias (__fegetenv, fegetenv)
+libm_hidden_weak (fegetenv)
diff --git a/sysdeps/csky/fpu/fegetexcept.c b/sysdeps/csky/fpu/fegetexcept.c
new file mode 100644
index 0000000..e6e46c0
--- /dev/null
+++ b/sysdeps/csky/fpu/fegetexcept.c
@@ -0,0 +1,32 @@
+/* Get enabled floating-point exceptions.
+   Copyright (C) 2018 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 <fenv.h>
+#include <fenv_libc.h>
+#include <fpu_control.h>
+
+int
+fegetexcept (void)
+{
+  unsigned int exc;
+
+  /* Get the current control word.  */
+  _FPU_GETCW (exc);
+
+  return (exc & ENABLE_MASK) >> ENABLE_SHIFT;
+}
diff --git a/sysdeps/csky/fpu/fegetmode.c b/sysdeps/csky/fpu/fegetmode.c
new file mode 100644
index 0000000..e229f60
--- /dev/null
+++ b/sysdeps/csky/fpu/fegetmode.c
@@ -0,0 +1,28 @@
+/* Store current floating-point control modes.
+   Copyright (C) 2018 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 <fenv.h>
+#include <fpu_control.h>
+
+int
+fegetmode (femode_t *modep)
+{
+  _FPU_GETCW (*modep);
+
+  return 0;
+}
diff --git a/sysdeps/csky/fpu/fegetround.c b/sysdeps/csky/fpu/fegetround.c
new file mode 100644
index 0000000..40bda2d
--- /dev/null
+++ b/sysdeps/csky/fpu/fegetround.c
@@ -0,0 +1,34 @@
+/* Return current rounding direction.
+   Copyright (C) 2018 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 <fenv.h>
+#include <fpu_control.h>
+
+int
+__fegetround (void)
+{
+  unsigned int cw;
+
+  /* Get control word.  */
+  _FPU_GETCW (cw);
+
+  return cw & __FE_ROUND_MASK;
+}
+libm_hidden_def (__fegetround)
+weak_alias (__fegetround, fegetround)
+libm_hidden_weak (fegetround)
diff --git a/sysdeps/csky/fpu/feholdexcpt.c b/sysdeps/csky/fpu/feholdexcpt.c
new file mode 100644
index 0000000..e2b1782
--- /dev/null
+++ b/sysdeps/csky/fpu/feholdexcpt.c
@@ -0,0 +1,34 @@
+/* Store current floating-point environment and clear exceptions.
+   Copyright (C) 2018 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 <fenv.h>
+#include <fpu_control.h>
+#include <fenv_libc.h>
+#include <fenv_private.h>
+
+#include <stdio.h>
+
+int
+__feholdexcept (fenv_t *envp)
+{
+  libc_feholdexcept_vfp (envp);
+  return 0;
+}
+libm_hidden_def (__feholdexcept)
+weak_alias (__feholdexcept, feholdexcept)
+libm_hidden_weak (feholdexcept)
diff --git a/sysdeps/csky/fpu/fenv_libc.h b/sysdeps/csky/fpu/fenv_libc.h
new file mode 100644
index 0000000..101d176
--- /dev/null
+++ b/sysdeps/csky/fpu/fenv_libc.h
@@ -0,0 +1,30 @@
+/* fpu registers environment.  C-SKY version.
+   Copyright (C) 2018 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 _FENV_LIBC_H
+#define _FENV_LIBC_H	1
+
+/* Mask for enabling exceptions and for the CAUSE bits.  */
+#define ENABLE_MASK	0x0003FU
+#define CAUSE_MASK	0x3F000U
+
+/* Shift for FE_* flags to get up to the ENABLE bits and the CAUSE bits.  */
+#define	ENABLE_SHIFT	0
+#define CAUSE_SHIFT	8
+
+#endif /* fenv_libc.h */
diff --git a/sysdeps/csky/fpu/fenv_private.h b/sysdeps/csky/fpu/fenv_private.h
new file mode 100644
index 0000000..b33efab
--- /dev/null
+++ b/sysdeps/csky/fpu/fenv_private.h
@@ -0,0 +1,284 @@
+/* Private floating point rounding and exceptions handling. C-SKY version.
+   Copyright (C) 2018 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 FENV_PRIVATE_H
+#define FENV_PRIVATE_H 1
+
+#include <fenv.h>
+#include <fpu_control.h>
+#include <fenv_libc.h>
+
+static __always_inline void
+libc_feholdexcept_vfp (fenv_t *envp)
+{
+  unsigned int fpsr;
+  unsigned int fpcr;
+
+  _FPU_GETCW (fpcr);
+  envp->__fpcr = fpcr;
+
+  _FPU_GETFPSR (fpsr);
+  envp->__fpsr = fpsr;
+
+  /* Now set all exceptions to non-stop.  */
+  fpcr &= ~FE_ALL_EXCEPT;
+
+  /* And clear all exception flags.  */
+  fpsr &= ~(FE_ALL_EXCEPT << CAUSE_SHIFT);
+
+  _FPU_SETFPSR (fpsr);
+
+  _FPU_SETCW (fpcr);
+}
+
+static __always_inline void
+libc_fesetround_vfp (int round)
+{
+  fpu_control_t fpcr;
+
+  _FPU_GETCW (fpcr);
+
+  /* Set new rounding mode if different.  */
+  if (__glibc_unlikely ((fpcr & FE_DOWNWARD) != round))
+    _FPU_SETCW ((fpcr & ~FE_DOWNWARD) | round);
+}
+
+static __always_inline void
+libc_feholdexcept_setround_vfp (fenv_t *envp, int round)
+{
+  fpu_control_t fpsr;
+  fpu_control_t fpcr;
+
+  _FPU_GETCW (fpcr);
+  envp->__fpcr = fpcr;
+
+  _FPU_GETFPSR (fpsr);
+  envp->__fpsr = fpsr;
+
+  /* Clear exception flags, set all exceptions to non-stop,
+     and set new rounding mode.  */
+  fpcr &= ~(FE_ALL_EXCEPT | FE_DOWNWARD);
+  _FPU_SETCW (fpcr | round);
+
+  fpsr &= ~(FE_ALL_EXCEPT << CAUSE_SHIFT);
+  _FPU_SETFPSR (fpsr);
+}
+
+static __always_inline void
+libc_feholdsetround_vfp (fenv_t *envp, int round)
+{
+  fpu_control_t fpcr;
+
+  _FPU_GETCW (fpcr);
+  envp->__fpcr = fpcr;
+
+  /* Set new rounding mode if different.  */
+  if (__glibc_unlikely ((fpcr & FE_DOWNWARD) != round))
+    _FPU_SETCW ((fpcr & ~FE_DOWNWARD) | round);
+}
+
+static __always_inline void
+libc_feresetround_vfp (fenv_t *envp)
+{
+  fpu_control_t fpcr, round;
+
+  _FPU_GETCW (fpcr);
+
+  /* Check whether rounding modes are different.  */
+  round = (envp->__fpcr ^ fpcr) & FE_DOWNWARD;
+
+  /* Restore the rounding mode if it was changed.  */
+  if (__glibc_unlikely (round != 0))
+    _FPU_SETCW (fpcr ^ round);
+}
+
+static __always_inline int
+libc_fetestexcept_vfp (int ex)
+{
+  fpu_control_t fpsr;
+
+  _FPU_GETFPSR (fpsr);
+  fpsr = fpsr >> CAUSE_SHIFT;
+  return fpsr & ex & FE_ALL_EXCEPT;
+}
+
+static __always_inline void
+libc_fesetenv_vfp (const fenv_t *envp)
+{
+  unsigned int fpcr;
+  unsigned int fpsr;
+
+  _FPU_GETCW (fpcr);
+  _FPU_GETFPSR (fpsr);
+
+  fpcr &= _FPU_RESERVED;
+  fpsr &= _FPU_FPSR_RESERVED;
+
+  if (envp == FE_DFL_ENV)
+    {
+      fpcr |= _FPU_DEFAULT;
+      fpsr |= _FPU_FPSR_DEFAULT;
+    }
+  else if (envp == FE_NOMASK_ENV)
+    {
+      fpcr |= _FPU_FPCR_IEEE;
+      fpsr |= _FPU_FPSR_IEEE;
+    }
+  else
+    {
+      fpcr |= envp->__fpcr & ~_FPU_RESERVED;
+      fpsr |= envp->__fpsr & ~_FPU_FPSR_RESERVED;
+    }
+
+  _FPU_SETFPSR (fpsr);
+
+  _FPU_SETCW (fpcr);
+}
+
+static __always_inline int
+libc_feupdateenv_test_vfp (const fenv_t *envp, int ex)
+{
+  fpu_control_t fpsr, new_fpsr;
+  int excepts;
+
+  _FPU_GETFPSR (fpsr);
+
+  /* Merge current exception flags with the saved fenv.  */
+  excepts = (fpsr >> CAUSE_SHIFT) & FE_ALL_EXCEPT;
+  new_fpsr = envp->__fpsr | (excepts << CAUSE_SHIFT);
+
+  /* Write new FPSCR if different.  */
+  if (__glibc_unlikely (((fpsr ^ new_fpsr)) != 0))
+    _FPU_SETFPSR (new_fpsr);
+
+  /* Raise the exceptions if enabled in the new FP state.  */
+  if (__glibc_unlikely (excepts & (new_fpsr >> CAUSE_SHIFT)))
+    __feraiseexcept (excepts);
+
+  return excepts & ex;
+}
+
+static __always_inline void
+libc_feupdateenv_vfp (const fenv_t *envp)
+{
+  libc_feupdateenv_test_vfp (envp, 0);
+}
+
+static __always_inline void
+libc_feholdsetround_vfp_ctx (struct rm_ctx *ctx, int r)
+{
+  fpu_control_t fpcr, round;
+
+  _FPU_GETCW (fpcr);
+  ctx->updated_status = false;
+  ctx->env.__fpcr = fpcr;
+
+  /* Check whether rounding modes are different.  */
+  round = (fpcr ^ r) & FE_DOWNWARD;
+
+  /* Set the rounding mode if changed.  */
+  if (__glibc_unlikely (round != 0))
+    {
+      ctx->updated_status = true;
+      _FPU_SETCW (fpcr ^ round);
+    }
+}
+
+static __always_inline void
+libc_feresetround_vfp_ctx (struct rm_ctx *ctx)
+{
+  /* Restore the rounding mode if updated.  */
+  if (__glibc_unlikely (ctx->updated_status))
+    {
+      fpu_control_t fpcr;
+
+      _FPU_GETCW (fpcr);
+      fpcr = (fpcr & ~FE_DOWNWARD) | (ctx->env.__fpcr & FE_DOWNWARD);
+      _FPU_SETCW (fpcr);
+    }
+}
+
+static __always_inline void
+libc_fesetenv_vfp_ctx (struct rm_ctx *ctx)
+{
+  fpu_control_t fpcr, new_fpcr;
+
+  _FPU_GETCW (fpcr);
+  new_fpcr = ctx->env.__fpcr;
+
+  /* Write new FPSCR if different.  */
+  if (__glibc_unlikely (((fpcr ^ new_fpcr)) != 0))
+    _FPU_SETCW (new_fpcr);
+}
+
+#define libc_feholdexcept  libc_feholdexcept_vfp
+#define libc_feholdexceptf libc_feholdexcept_vfp
+#define libc_feholdexceptl libc_feholdexcept_vfp
+
+#define libc_fesetround  libc_fesetround_vfp
+#define libc_fesetroundf libc_fesetround_vfp
+#define libc_fesetroundl libc_fesetround_vfp
+
+#define libc_feresetround  libc_feresetround_vfp
+#define libc_feresetroundf libc_feresetround_vfp
+#define libc_feresetroundl libc_feresetround_vfp
+
+#define libc_feresetround_noex  libc_fesetenv_vfp
+#define libc_feresetround_noexf libc_fesetenv_vfp
+#define libc_feresetround_noexl libc_fesetenv_vfp
+
+#define libc_feholdexcept_setround  libc_feholdexcept_setround_vfp
+#define libc_feholdexcept_setroundf libc_feholdexcept_setround_vfp
+#define libc_feholdexcept_setroundl libc_feholdexcept_setround_vfp
+
+#define libc_feholdsetround  libc_feholdsetround_vfp
+#define libc_feholdsetroundf libc_feholdsetround_vfp
+#define libc_feholdsetroundl libc_feholdsetround_vfp
+
+#define libc_fetestexcept  libc_fetestexcept_vfp
+#define libc_fetestexceptf libc_fetestexcept_vfp
+#define libc_fetestexceptl libc_fetestexcept_vfp
+
+#define libc_fesetenv  libc_fesetenv_vfp
+#define libc_fesetenvf libc_fesetenv_vfp
+#define libc_fesetenvl libc_fesetenv_vfp
+
+#define libc_feupdateenv  libc_feupdateenv_vfp
+#define libc_feupdateenvf libc_feupdateenv_vfp
+#define libc_feupdateenvl libc_feupdateenv_vfp
+
+#define libc_feupdateenv_test  libc_feupdateenv_test_vfp
+#define libc_feupdateenv_testf libc_feupdateenv_test_vfp
+#define libc_feupdateenv_testl libc_feupdateenv_test_vfp
+
+/* We have support for rounding mode context.  */
+#define HAVE_RM_CTX 1
+
+#define libc_feholdsetround_ctx		libc_feholdsetround_vfp_ctx
+#define libc_feresetround_ctx		libc_feresetround_vfp_ctx
+#define libc_feresetround_noex_ctx	libc_fesetenv_vfp_ctx
+
+#define libc_feholdsetroundf_ctx	libc_feholdsetround_vfp_ctx
+#define libc_feresetroundf_ctx		libc_feresetround_vfp_ctx
+#define libc_feresetround_noexf_ctx	libc_fesetenv_vfp_ctx
+
+#define libc_feholdsetroundl_ctx	libc_feholdsetround_vfp_ctx
+#define libc_feresetroundl_ctx		libc_feresetround_vfp_ctx
+#define libc_feresetround_noexl_ctx	libc_fesetenv_vfp_ctx
+
+#endif /* fenv_private.h */
diff --git a/sysdeps/csky/fpu/fesetenv.c b/sysdeps/csky/fpu/fesetenv.c
new file mode 100644
index 0000000..dce6770
--- /dev/null
+++ b/sysdeps/csky/fpu/fesetenv.c
@@ -0,0 +1,59 @@
+/* Install given floating-point environment.
+   Copyright (C) 2018 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 <fenv.h>
+#include <fpu_control.h>
+
+int
+__fesetenv (const fenv_t *envp)
+{
+  unsigned int fpcr;
+  unsigned int fpsr;
+
+  _FPU_GETCW (fpcr);
+  _FPU_GETFPSR (fpsr);
+
+  fpcr &= _FPU_RESERVED;
+  fpsr &= _FPU_FPSR_RESERVED;
+
+  if (envp == FE_DFL_ENV)
+    {
+      fpcr |= _FPU_DEFAULT;
+      fpsr |= _FPU_FPSR_DEFAULT;
+    }
+  else if (envp == FE_NOMASK_ENV)
+    {
+      fpcr |= _FPU_FPCR_IEEE;
+      fpsr |= _FPU_FPSR_IEEE;
+    }
+  else
+    {
+      fpcr |= envp->__fpcr & ~_FPU_RESERVED;
+      fpsr |= envp->__fpsr & ~_FPU_FPSR_RESERVED;
+    }
+
+  _FPU_SETFPSR (fpsr);
+
+  _FPU_SETCW (fpcr);
+
+  /* Success.  */
+  return 0;
+}
+libm_hidden_def (__fesetenv)
+weak_alias (__fesetenv, fesetenv)
+libm_hidden_weak (fesetenv)
diff --git a/sysdeps/csky/fpu/fesetexcept.c b/sysdeps/csky/fpu/fesetexcept.c
new file mode 100644
index 0000000..e7cd302
--- /dev/null
+++ b/sysdeps/csky/fpu/fesetexcept.c
@@ -0,0 +1,33 @@
+/* Set given exception flags.
+   Copyright (C) 2018 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 <fenv.h>
+#include <fpu_control.h>
+#include <fenv_libc.h>
+
+int
+fesetexcept (int excepts)
+{
+  fpu_control_t fpsr, new_fpsr;
+  _FPU_GETFPSR (fpsr);
+  new_fpsr = fpsr | ((excepts & FE_ALL_EXCEPT) << CAUSE_SHIFT);
+  if (new_fpsr != fpsr)
+    _FPU_SETFPSR (new_fpsr);
+
+  return 0;
+}
diff --git a/sysdeps/csky/fpu/fesetmode.c b/sysdeps/csky/fpu/fesetmode.c
new file mode 100644
index 0000000..65977ef
--- /dev/null
+++ b/sysdeps/csky/fpu/fesetmode.c
@@ -0,0 +1,33 @@
+/* Install given floating-point control modes.
+   Copyright (C) 2018 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 <fenv.h>
+#include <fpu_control.h>
+
+int
+fesetmode (const femode_t *modep)
+{
+  femode_t mode;
+  if (modep == FE_DFL_MODE)
+    mode = _FPU_DEFAULT;
+  else
+    mode = *modep;
+  _FPU_SETCW (mode);
+
+  return 0;
+}
diff --git a/sysdeps/csky/fpu/fesetround.c b/sysdeps/csky/fpu/fesetround.c
new file mode 100644
index 0000000..c5c3604
--- /dev/null
+++ b/sysdeps/csky/fpu/fesetround.c
@@ -0,0 +1,32 @@
+/* Set current rounding direction.
+   Copyright (C) 2018 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 <fenv.h>
+#include <fpu_control.h>
+#include <fenv_private.h>
+
+#include <stdio.h>
+int
+__fesetround (int round)
+{
+  libc_fesetround_vfp (round);
+  return 0;
+}
+libm_hidden_def (__fesetround)
+weak_alias (__fesetround, fesetround)
+libm_hidden_weak (fesetround)
diff --git a/sysdeps/csky/fpu/feupdateenv.c b/sysdeps/csky/fpu/feupdateenv.c
new file mode 100644
index 0000000..2368dee
--- /dev/null
+++ b/sysdeps/csky/fpu/feupdateenv.c
@@ -0,0 +1,46 @@
+/* Install given floating-point environment and raise exceptions.
+   Copyright (C) 2018 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 <fenv.h>
+#include <fpu_control.h>
+#include <fenv_libc.h>
+#include <fenv_private.h>
+#include <stdio.h>
+
+int
+__feupdateenv (const fenv_t *envp)
+{
+  int temp;
+
+  /* Save current exceptions.  */
+  _FPU_GETFPSR (temp);
+  temp = (temp >> CAUSE_SHIFT) & FE_ALL_EXCEPT;
+  /* Install new environment.  */
+  libc_fesetenv_vfp (envp);
+
+  /* Raise the safed exception.  Incidently for us the implementation
+     defined format of the values in objects of type fexcept_t is the
+     same as the ones specified using the FE_* constants.  */
+  feraiseexcept (temp);
+
+  /* Success.  */
+  return 0;
+}
+libm_hidden_def (__feupdateenv)
+weak_alias (__feupdateenv, feupdateenv)
+libm_hidden_weak (feupdateenv)
diff --git a/sysdeps/csky/fpu/fgetexcptflg.c b/sysdeps/csky/fpu/fgetexcptflg.c
new file mode 100644
index 0000000..38c4df3
--- /dev/null
+++ b/sysdeps/csky/fpu/fgetexcptflg.c
@@ -0,0 +1,32 @@
+/* Store current representation for exceptions.
+   Copyright (C) 2018 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 <fenv.h>
+#include <fpu_control.h>
+#include <fenv_libc.h>
+#include <fenv_private.h>
+#include <stdio.h>
+
+int
+fegetexceptflag (fexcept_t *flagp, int excepts)
+{
+  *flagp = libc_fetestexcept_vfp (excepts);
+
+  /* Success.  */
+  return 0;
+}
diff --git a/sysdeps/csky/fpu/fpu_control.h b/sysdeps/csky/fpu/fpu_control.h
new file mode 100644
index 0000000..8be2ee2
--- /dev/null
+++ b/sysdeps/csky/fpu/fpu_control.h
@@ -0,0 +1,133 @@
+/* FPU control word bits. C-SKY version.
+   Copyright (C) 2018 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 _FPU_CONTROL_H
+#define _FPU_CONTROL_H
+
+/* C-SKY FPU floating point control register bits.
+
+   31-28  -> reserved (read as 0, write with 0)
+   27     -> 0: flush denormalized results to zero
+             1: flush denormalized results to signed minimal normal number.
+   26     -> reserved (read as 0, write with 0)
+   25-24  -> rounding control
+   23-6   -> reserved (read as 0, write with 0)
+    5     -> enable exception for input denormalized exception
+    4     -> enable exception for inexact exception
+    3     -> enable exception for underflow exception
+    2     -> enable exception for overflow exception
+    1     -> enable exception for division by zero exception
+    0     -> enable exception for invalid operation exception
+
+   Rounding Control:
+   00 - rounding to nearest (RN)
+   01 - rounding toward zero (RZ)
+   10 - rounding (up) toward plus infinity (RP)
+   11 - rounding (down)toward minus infinity (RM)
+
+   C-SKY FPU floating point exception status register bits.
+
+   15     -> accumulate bit for any exception
+   14     -> reserved (read as 0, write with 0)
+   13     -> cause bit for input denormalized exception
+   12     -> cause bit for inexact exception
+   11     -> cause bit for underflow exception
+   10     -> cause bit for overflow exception
+    9     -> cause bit for division by zero exception
+    8     -> cause bit for invalid operation exception
+    7     -> flag bit for any exception
+    6     -> reserved (read as 0, write with 0)
+    5     -> flag exception for input denormalized exception
+    4     -> flag exception for inexact exception
+    3     -> flag exception for underflow exception
+    2     -> flag exception for overflow exception
+    1     -> flag exception for division by zero exception
+    0     -> flag exception for invalid operation exception  */
+
+#include <features.h>
+
+/* masking of interrupts */
+#define _FPU_MASK_IDE     (1 << 5)  /* input denormalized exception */
+#define _FPU_MASK_IXE     (1 << 4)  /* inexact exception            */
+#define _FPU_MASK_UFE     (1 << 3)  /* underflow exception          */
+#define _FPU_MASK_OFE     (1 << 2)  /* overflow exception           */
+#define _FPU_MASK_DZE     (1 << 1)  /* division by zero exception   */
+#define _FPU_MASK_IOE     (1 << 0)  /* invalid operation exception  */
+
+#define _FPU_MASK_FEA     (1 << 15) /* case for any exception */
+#define _FPU_MASK_FEC     (1 << 7)  /* flag for any exception */
+
+/* flush denormalized numbers to zero */
+#define _FPU_FLUSH_TZ   0x8000000
+
+/* rounding control */
+#define _FPU_RC_NEAREST (0x0 << 24)     /* RECOMMENDED */
+#define _FPU_RC_ZERO    (0x1 << 24)
+#define _FPU_RC_UP      (0x2 << 24)
+#define _FPU_RC_DOWN    (0x3 << 24)
+
+#define _FPU_RESERVED      0xf4ffffc0  /* Reserved bits in cw */
+#define _FPU_FPSR_RESERVED 0x3fff0000
+
+/* The fdlibm code requires strict IEEE double precision arithmetic,
+   and no interrupts for exceptions, rounding to nearest.  */
+
+#define _FPU_DEFAULT        0x00000000
+#define _FPU_FPSR_DEFAULT   0x00000000
+
+/* IEEE:  same as above, but exceptions */
+#define _FPU_FPCR_IEEE     0x0000001F
+#define _FPU_FPSR_IEEE     0x00000000
+
+/* Type of the control word.  */
+typedef unsigned int fpu_control_t;
+
+/* Macros for accessing the hardware control word.  */
+#if (__CSKY__ == 2)
+# define _FPU_GETCW(cw) __asm__ volatile ("mfcr %0, cr<1, 2>" : "=a" (cw))
+# define _FPU_SETCW(cw) __asm__ volatile ("mtcr %0, cr<1, 2>" : : "a" (cw))
+# define _FPU_GETFPSR(cw) __asm__ volatile ("mfcr %0, cr<2, 2>" : "=a" (cw))
+# define _FPU_SETFPSR(cw) __asm__ volatile ("mtcr %0, cr<2, 2>" : : "a" (cw))
+#else
+# define _FPU_GETCW(cw) __asm__ volatile ("1: cprcr  %0, cpcr2 \n"          \
+                                         "   btsti  %0, 31    \n"           \
+                                         "   bt     1b        \n"           \
+		                                 "   cprcr  %0, cpcr1\n" : "=b" (cw))
+
+# define _FPU_SETCW(cw) __asm__ volatile ("1: cprcr  r7, cpcr2 \n"          \
+                                         "   btsti  r7, 31    \n"           \
+                                         "   bt     1b        \n"           \
+                                         "   cpwcr  %0, cpcr1 \n"           \
+                                         : : "b" (cw) : "r7")
+
+# define _FPU_GETFPSR(cw) __asm__ volatile ("1: cprcr  %0, cpcr2 \n"        \
+                                           "   btsti  %0, 31    \n"         \
+                                           "   bt     1b        \n"         \
+                                           "   cprcr  %0, cpcr4\n" : "=b" (cw))
+
+# define _FPU_SETFPSR(cw) __asm__ volatile ("1: cprcr  r7, cpcr2 \n"        \
+                                           "   btsti  r7, 31    \n"         \
+                                           "   bt     1b        \n"         \
+                                           "   cpwcr %0, cpcr4  \n"         \
+                                           : : "b" (cw) : "r7")
+#endif /* __CSKY__ != 2 */
+
+/* Default control word set at startup.  */
+extern fpu_control_t __fpu_control;
+
+#endif	/* fpu_control.h */
diff --git a/sysdeps/csky/fpu/fraiseexcpt.c b/sysdeps/csky/fpu/fraiseexcpt.c
new file mode 100644
index 0000000..01fa0f2
--- /dev/null
+++ b/sysdeps/csky/fpu/fraiseexcpt.c
@@ -0,0 +1,126 @@
+/* Raise given exceptions.
+   Copyright (C) 2018 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 <fenv.h>
+#include <fenv_libc.h>
+#include <fpu_control.h>
+#include <float.h>
+#include <math.h>
+
+int
+__feraiseexcept (int excepts)
+{
+    /* Raise exceptions represented by EXCEPTS.  But we must raise only one
+     signal at a time.  It is important that if the overflow/underflow
+     exception and the divide by zero exception are given at the same
+     time, the overflow/underflow exception follows the divide by zero
+     exception.  */
+
+# ifdef __csky_fpuv2__
+    /* First: invalid exception.  */
+    if (FE_INVALID & excepts)
+    {
+      /* One example of a invalid operation is 0 * Infinity.  */
+      float x = HUGE_VALF, y = 0.0f;
+      __asm__ __volatile__ ("fmuls %0, %0, %1" : "+v" (x) : "v" (y));
+    }
+
+    /* Next: division by zero.  */
+    if (FE_DIVBYZERO & excepts)
+    {
+      float x = 1.0f, y = 0.0f;
+      __asm__ __volatile__ ("fdivs %0, %0, %1" : "+v" (x) : "v" (y));
+    }
+
+    /* Next: overflow.  */
+    if (FE_OVERFLOW & excepts)
+    {
+      float x = FLT_MAX;
+      __asm__ __volatile__ ("fmuls %0, %0, %0" : "+v" (x));
+    }
+    /* Next: underflow.  */
+    if (FE_UNDERFLOW & excepts)
+    {
+      float x = -FLT_MIN;
+
+      __asm__ __volatile__ ("fmuls %0, %0, %0" : "+v" (x));
+    }
+
+    /* Last: inexact.  */
+    if (FE_INEXACT & excepts)
+    {
+      float x = 1.0f, y = 3.0f;
+      __asm__ __volatile__ ("fdivs %0, %0, %1" : "+v" (x) : "v" (y));
+    }
+
+    if (__FE_DENORMAL & excepts)
+    {
+      double x = 4.9406564584124654e-324;
+      __asm__ __volatile__ ("fstod %0, %0" : "+v" (x));
+    }
+# else
+     int tmp = 0;
+    /* First: invalid exception.  */
+    if (FE_INVALID & excepts)
+    {
+      /* One example of a invalid operation is 0 * Infinity.  */
+      float x = HUGE_VALF, y = 0.0f;
+      __asm__ __volatile__ ("fmuls %0, %0, %2, %1"
+                    : "+f" (x), "+r"(tmp) : "f" (y));
+    }
+
+    /* Next: division by zero.  */
+    if (FE_DIVBYZERO & excepts)
+    {
+      float x = 1.0f, y = 0.0f;
+      __asm__ __volatile__ ("fdivs %0, %0, %2, %1"
+                    : "+f" (x), "+r"(tmp) : "f" (y));
+    }
+
+    /* Next: overflow.  */
+    if (FE_OVERFLOW & excepts)
+    {
+      float x = FLT_MAX, y = FLT_MAX;
+      __asm__ __volatile__ ("fmuls %0, %0, %2, %1"
+                    : "+f" (x), "+r"(tmp) : "f" (y));
+    }
+
+    /* Next: underflow.  */
+    if (FE_UNDERFLOW & excepts)
+    {
+      float x = -FLT_MIN, y = -FLT_MIN;
+
+      __asm__ __volatile__ ("fmuls %0, %0, %2, %1"
+                    : "+f" (x), "+r"(tmp) : "f" (y));
+    }
+
+    /* Last: inexact.  */
+    if (FE_INEXACT & excepts)
+    {
+      float x = 1.0f, y = 3.0f;
+      __asm__ __volatile__ ("fdivs %0, %0, %2, %1"
+                    : "+f" (x), "+r"(tmp) : "f" (y));
+    }
+# endif /* __csky_fpuv2__ */
+
+    /* Success.  */
+    return 0;
+}
+libm_hidden_def (__feraiseexcept)
+weak_alias (__feraiseexcept, feraiseexcept)
+libm_hidden_weak (feraiseexcept)
diff --git a/sysdeps/csky/fpu/fsetexcptflg.c b/sysdeps/csky/fpu/fsetexcptflg.c
new file mode 100644
index 0000000..2eaa4cb
--- /dev/null
+++ b/sysdeps/csky/fpu/fsetexcptflg.c
@@ -0,0 +1,43 @@
+/* Set floating-point environment exception handling.
+   Copyright (C) 2018 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 <fenv.h>
+#include <fpu_control.h>
+#include <fenv_libc.h>
+
+int
+fesetexceptflag (const fexcept_t *flagp, int excepts)
+{
+  fpu_control_t temp;
+
+  /* Get the current exceptions.  */
+   _FPU_GETFPSR (temp);
+
+  /* Make sure the flags we want restored are legal.  */
+  excepts &= FE_ALL_EXCEPT;
+
+  /* Now clear the bits called for, and copy them in from flagp. Note that
+     we ignore all non-flag bits from *flagp, so they don't matter.  */
+  temp = ((temp >> CAUSE_SHIFT) & ~excepts) | (*flagp & excepts);
+  temp = temp << CAUSE_SHIFT;
+
+  _FPU_SETFPSR (temp);
+
+  /* Success.  */
+  return 0;
+}
diff --git a/sysdeps/csky/fpu/ftestexcept.c b/sysdeps/csky/fpu/ftestexcept.c
new file mode 100644
index 0000000..fee7544
--- /dev/null
+++ b/sysdeps/csky/fpu/ftestexcept.c
@@ -0,0 +1,30 @@
+/* Test exception in current environment.
+   Copyright (C) 2018 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 <fenv.h>
+#include <fpu_control.h>
+#include <fenv_libc.h>
+#include <fenv_private.h>
+#include <stdio.h>
+
+int
+fetestexcept (int excepts)
+{
+  return libc_fetestexcept_vfp (excepts);
+}
+libm_hidden_def (fetestexcept)
diff --git a/sysdeps/csky/fpu/math_private.h b/sysdeps/csky/fpu/math_private.h
new file mode 100644
index 0000000..db303da
--- /dev/null
+++ b/sysdeps/csky/fpu/math_private.h
@@ -0,0 +1,7 @@
+#ifndef CSKY_MATH_PRIVATE_H
+#define CSKY_MATH_PRIVATE_H 1
+
+#include "fenv_private.h"
+#include_next <math_private.h>
+
+#endif
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [RFC PATCH v3 05/12] C-SKY: Atomic and Locking Routines
  2018-06-29  7:58 [RFC PATCH v3 00/12] port C-SKY to glibc Mao Han
                   ` (3 preceding siblings ...)
  2018-06-29  7:58 ` [RFC PATCH v3 04/12] C-SKY: Hard Float Support Mao Han
@ 2018-06-29  7:58 ` Mao Han
  2018-06-29 16:36   ` Joseph Myers
  2018-06-29  7:58 ` [RFC PATCH v3 06/12] C-SKY: Linux Syscall Interface Mao Han
                   ` (6 subsequent siblings)
  11 siblings, 1 reply; 22+ messages in thread
From: Mao Han @ 2018-06-29  7:58 UTC (permalink / raw
  To: libc-alpha; +Cc: Mao Han, c-sky_gcc_upstream, gnu-csky

This patch implements various atomic and locking routines on C-SKY.

	* sysdeps/csky/atomic-machine.h: New file.
	* sysdeps/csky/nptl/bits/pthreadtypes-arch.h: Likewise.
	* sysdeps/csky/nptl/bits/semaphore.h: Likewise.
---
 sysdeps/csky/atomic-machine.h              | 97 ++++++++++++++++++++++++++++++
 sysdeps/csky/nptl/bits/pthreadtypes-arch.h | 70 +++++++++++++++++++++
 sysdeps/csky/nptl/bits/semaphore.h         | 35 +++++++++++
 3 files changed, 202 insertions(+)
 create mode 100644 sysdeps/csky/atomic-machine.h
 create mode 100644 sysdeps/csky/nptl/bits/pthreadtypes-arch.h
 create mode 100644 sysdeps/csky/nptl/bits/semaphore.h

diff --git a/sysdeps/csky/atomic-machine.h b/sysdeps/csky/atomic-machine.h
new file mode 100644
index 0000000..b64674f
--- /dev/null
+++ b/sysdeps/csky/atomic-machine.h
@@ -0,0 +1,97 @@
+/* Atomic operations.  C-SKY version.
+   Copyright (C) 2018 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 __CSKY_ATOMIC_H_
+#define __CSKY_ATOMIC_H_
+
+#include <stdint.h>
+
+typedef int32_t atomic32_t;
+typedef uint32_t uatomic32_t;
+
+typedef intptr_t atomicptr_t;
+typedef uintptr_t uatomicptr_t;
+typedef intmax_t atomic_max_t;
+typedef uintmax_t uatomic_max_t;
+
+#define __HAVE_64B_ATOMICS 0
+#define USE_ATOMIC_COMPILER_BUILTINS 0
+#define ATOMIC_EXCHANGE_USES_CAS 0
+
+#define __arch_compare_and_exchange_bool_8_int(mem, newval, oldval)	\
+  (abort (), 0)
+
+#define __arch_compare_and_exchange_bool_16_int(mem, newval, oldval)	\
+  (abort (), 0)
+
+#define __arch_compare_and_exchange_bool_32_int(mem, newval, oldval)	\
+  ({ __typeof (mem) _mem = (mem);					\
+     __typeof (oldval) _oldval = oldval;				\
+     __typeof (newval) _newval = newval;				\
+     register int _a0 asm ("a0") = (int)_oldval;			\
+     register int _a1 asm ("a1") = (int)_newval;			\
+     register int _a2 asm ("a2") = (int)_mem;				\
+     __asm__ __volatile__ ("trap   2"					\
+			   : "+r" (_a0) : "r" (_a1) , "r" (_a2)		\
+			   : "a3", "memory");				\
+     (int) _a0; })
+
+#define __arch_compare_and_exchange_bool_64_int(mem, newval, oldval)	\
+  (abort (), 0)
+
+#define __arch_compare_and_exchange_val_8_int(mem, newval, oldval)	\
+  (abort (), (__typeof (*mem)) 0)
+
+#define __arch_compare_and_exchange_val_16_int(mem, newval, oldval)	\
+  (abort (), (__typeof (*mem)) 0)
+
+#define __arch_compare_and_exchange_val_32_int(mem, newval, oldval)	\
+  ({ __typeof (mem) _mem = (mem);					\
+     __typeof (*mem) __gret = *_mem;					\
+     unsigned int _tmp = 0;						\
+     __typeof (oldval) _oldval = oldval;				\
+     __typeof (newval) _newval = newval;				\
+     register int _a0 asm ("a0") = (int)_oldval;			\
+     register int _a1 asm ("a1") = (int)_newval;			\
+     register int _a2 asm ("a2") = (int)_mem;				\
+     __asm__ __volatile__ ("1:\tldw %1, (%4, 0x0)\n\t"			\
+			   "cmpne %1, %0\n\t"				\
+			   "bt 2f\n\t"					\
+			   "mov %2, %0\n\t"				\
+			   "trap 2\n\t"					\
+			   "cmpnei %0, 0\n\t"				\
+			   "mov %0, %2\n\t"				\
+			   "bt 1b\n"					\
+			   "2:"						\
+			   : "+r" (_a0), "+r"(__gret), "+r" (_tmp)	\
+			   : "r" (_a1) , "r" (_a2)			\
+			   : "a3", "memory");				\
+     __gret; })
+
+#define __arch_compare_and_exchange_val_64_int(mem, newval, oldval)	\
+  (abort (), (__typeof (*mem)) 0)
+
+#define atomic_compare_and_exchange_bool_acq(mem, new, old)		\
+  __atomic_bool_bysize (__arch_compare_and_exchange_bool, int,		\
+			mem, new, old)
+
+#define atomic_compare_and_exchange_val_acq(mem, new, old)		\
+  __atomic_val_bysize (__arch_compare_and_exchange_val, int,		\
+		       mem, new, old)
+
+#endif /* atomic-machine.h */
diff --git a/sysdeps/csky/nptl/bits/pthreadtypes-arch.h b/sysdeps/csky/nptl/bits/pthreadtypes-arch.h
new file mode 100644
index 0000000..d3423fb
--- /dev/null
+++ b/sysdeps/csky/nptl/bits/pthreadtypes-arch.h
@@ -0,0 +1,70 @@
+/* Machine-specific pthread type layouts.  C-SKY version.
+   Copyright (C) 2018 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_PTHREADTYPES_ARCH_H
+#define _BITS_PTHREADTYPES_ARCH_H	1
+
+#include <endian.h>
+
+#define __SIZEOF_PTHREAD_ATTR_T			36
+#define __SIZEOF_PTHREAD_MUTEX_T		24
+#define __SIZEOF_PTHREAD_MUTEXATTR_T		4
+#define __SIZEOF_PTHREAD_COND_T			48
+#define __SIZEOF_PTHREAD_CONDATTR_T		4
+#define __SIZEOF_PTHREAD_RWLOCK_T		32
+#define __SIZEOF_PTHREAD_RWLOCKATTR_T		8
+#define __SIZEOF_PTHREAD_BARRIER_T		20
+#define __SIZEOF_PTHREAD_BARRIERATTR_T		4
+
+/* Data structure for mutex handling. */
+#define __PTHREAD_COMPAT_PADDING_MID
+#define __PTHREAD_COMPAT_PADDING_END
+#define __PTHREAD_MUTEX_LOCK_ELISION		0
+#define __PTHREAD_MUTEX_NUSERS_AFTER_KIND	1
+#define __PTHREAD_MUTEX_USE_UNION		1
+
+#define __LOCK_ALIGNMENT
+#define __ONCE_ALIGNMENT
+
+/* Paddings in this structure are not strictly necessary on C-SKY.
+   They are left for extensibility as most other architecture do so.  */
+struct __pthread_rwlock_arch_t
+{
+  unsigned int __readers;
+  unsigned int __writers;
+  unsigned int __wrphase_futex;
+  unsigned int __writers_futex;
+  unsigned int __pad3;
+  unsigned int __pad4;
+#if __BYTE_ORDER == __BIG_ENDIAN
+  unsigned char __pad1;
+  unsigned char __pad2;
+  unsigned char __shared;
+  unsigned char __flags;
+#else
+  unsigned char __flags;
+  unsigned char __shared;
+  unsigned char __pad1;
+  unsigned char __pad2;
+#endif
+  int __cur_writer;
+};
+
+#define __PTHREAD_RWLOCK_ELISION_EXTRA 0
+
+#endif
diff --git a/sysdeps/csky/nptl/bits/semaphore.h b/sysdeps/csky/nptl/bits/semaphore.h
new file mode 100644
index 0000000..0b13f59
--- /dev/null
+++ b/sysdeps/csky/nptl/bits/semaphore.h
@@ -0,0 +1,35 @@
+/* Machine-specific POSIX semaphore type layouts.  C-SKY version.
+   Copyright (C) 2018 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 _SEMAPHORE_H
+# error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."
+#endif
+
+
+#define __SIZEOF_SEM_T	16
+
+
+/* Value returned if `sem_open' failed.  */
+#define SEM_FAILED	((sem_t *) 0)
+
+
+typedef union
+{
+  char __size[__SIZEOF_SEM_T];
+  long int __align;
+} sem_t;
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [RFC PATCH v3 06/12] C-SKY: Linux Syscall Interface
  2018-06-29  7:58 [RFC PATCH v3 00/12] port C-SKY to glibc Mao Han
                   ` (4 preceding siblings ...)
  2018-06-29  7:58 ` [RFC PATCH v3 05/12] C-SKY: Atomic and Locking Routines Mao Han
@ 2018-06-29  7:58 ` Mao Han
  2018-06-29  7:58 ` [RFC PATCH v3 07/12] C-SKY: Linux ABI Mao Han
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 22+ messages in thread
From: Mao Han @ 2018-06-29  7:58 UTC (permalink / raw
  To: libc-alpha; +Cc: Mao Han, c-sky_gcc_upstream, gnu-csky

Contains the Linux system call interface.

	* sysdeps/unix/sysv/linux/csky/abiv2/____longjmp_chk.S: New file.
	* sysdeps/unix/sysv/linux/csky/abiv2/clone.S: Likewise.
	* sysdeps/unix/sysv/linux/csky/abiv2/getcontext.S: Likewise.
	* sysdeps/unix/sysv/linux/csky/abiv2/setcontext.S: Likewise.
	* sysdeps/unix/sysv/linux/csky/abiv2/swapcontext.S: Likewise.
	* sysdeps/unix/sysv/linux/csky/abiv2/syscall.S: Likewise.
	* sysdeps/unix/sysv/linux/csky/abiv2/sysdep.S: Likewise.
	* sysdeps/unix/sysv/linux/csky/syscalls.list: Likewise.
	* sysdeps/unix/sysv/linux/csky/pt-vfork.S: Likewise.
---
 .../unix/sysv/linux/csky/abiv2/____longjmp_chk.S   | 81 ++++++++++++++++++
 sysdeps/unix/sysv/linux/csky/abiv2/clone.S         | 88 ++++++++++++++++++++
 sysdeps/unix/sysv/linux/csky/abiv2/getcontext.S    | 73 ++++++++++++++++
 sysdeps/unix/sysv/linux/csky/abiv2/setcontext.S    | 96 ++++++++++++++++++++++
 sysdeps/unix/sysv/linux/csky/abiv2/swapcontext.S   | 78 ++++++++++++++++++
 sysdeps/unix/sysv/linux/csky/abiv2/syscall.S       | 61 ++++++++++++++
 sysdeps/unix/sysv/linux/csky/abiv2/sysdep.S        | 65 +++++++++++++++
 sysdeps/unix/sysv/linux/csky/pt-vfork.S            |  1 +
 sysdeps/unix/sysv/linux/csky/syscalls.list         |  2 +
 9 files changed, 545 insertions(+)
 create mode 100644 sysdeps/unix/sysv/linux/csky/abiv2/____longjmp_chk.S
 create mode 100644 sysdeps/unix/sysv/linux/csky/abiv2/clone.S
 create mode 100644 sysdeps/unix/sysv/linux/csky/abiv2/getcontext.S
 create mode 100644 sysdeps/unix/sysv/linux/csky/abiv2/setcontext.S
 create mode 100644 sysdeps/unix/sysv/linux/csky/abiv2/swapcontext.S
 create mode 100644 sysdeps/unix/sysv/linux/csky/abiv2/syscall.S
 create mode 100644 sysdeps/unix/sysv/linux/csky/abiv2/sysdep.S
 create mode 100644 sysdeps/unix/sysv/linux/csky/pt-vfork.S
 create mode 100644 sysdeps/unix/sysv/linux/csky/syscalls.list

diff --git a/sysdeps/unix/sysv/linux/csky/abiv2/____longjmp_chk.S b/sysdeps/unix/sysv/linux/csky/abiv2/____longjmp_chk.S
new file mode 100644
index 0000000..b620d4a
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/csky/abiv2/____longjmp_chk.S
@@ -0,0 +1,81 @@
+/* longjmp with sp check for C-SKY ABIV2
+   Copyright (C) 2018 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.8,"aMS",@progbits,1
+	.align  2
+	.type   longjmp_msg,@object
+longjmp_msg:
+	.string "longjmp causes uninitialized stack frame"
+	.size   longjmp_msg, .-longjmp_msg
+
+	.text
+#define __longjmp ____longjmp_chk
+
+#ifdef	__PIC__
+# define CALL_FAIL	\
+	subi	sp, 8;						\
+	stw	gb, (sp, 0);					\
+	grs	gb, .Lgetpc1;					\
+.Lgetpc1:							\
+	lrw	t0, .Lgetpc1@GOTPC;				\
+	addu	gb, gb, t0;					\
+	lrw	a0, longjmp_msg@GOTOFF;				\
+	addu	a0, a0, gb;					\
+	lrw	t0, (HIDDEN_JUMPTARGET (__fortify_fail))@PLT;	\
+	ldr.w	t0, (gb, t0 << 0);				\
+	jsr	t0;						\
+	ldw	gb, (sp, 0);					\
+	addi	sp, 8;
+#else /* __PIC__ */
+# define CALL_FAIL	\
+	lrw	a0, longjmp_msg;				\
+	jsri	HIDDEN_JUMPTARGET (__fortify_fail);
+#endif/* __PIC__ */
+
+# define  CHECK_SP(reg)	\
+	cmplt	sp, reg;					\
+	bt	.Lok1;						\
+	mov	r9, a0;						\
+	mov	t0, r7;						\
+	lrw	r7, __NR_sigaltstack;				\
+	movi	a0, 0;						\
+	subi	sp, 12;	/* sizeof (stack_t) */			\
+	mov	a1, sp;						\
+	trap	0;						\
+	mov	r7, t0;						\
+	cmpnei	a0, 0;						\
+	bt	.Lok;						\
+	ldw	a1, (sp, 4);					\
+	btsti	a1, 1;						\
+	bt	.Lfail;						\
+	ldw	a1, (sp, 0);					\
+	ldw	a3, (sp, 8);					\
+	add	a1, a3;						\
+	sub	a1, reg;					\
+	cmphs	a1, a3;						\
+	bt	.Lok;						\
+.Lfail:								\
+	addi	sp, 12;						\
+	CALL_FAIL						\
+.Lok:								\
+	mov	a0, r9;						\
+.Lok1:
+
+#include <__longjmp.S>
diff --git a/sysdeps/unix/sysv/linux/csky/abiv2/clone.S b/sysdeps/unix/sysv/linux/csky/abiv2/clone.S
new file mode 100644
index 0000000..0ad0a07
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/csky/abiv2/clone.S
@@ -0,0 +1,88 @@
+/* Wrapper around clone system call.  C-SKY ABIV2 version.
+   Copyright (C) 2018 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/>.  */
+
+/* clone() is even more special than fork() as it mucks with stacks
+   and invokes a function in the right context after its all over.  */
+
+#include <sysdep.h>
+#define _ERRNO_H	1
+#include <bits/errno.h>
+
+/* int clone (int (*fn) (void *arg), void *child_stack, int flags, void *arg,
+	     pid_t *ptid, struct user_desc *tls, pid_t *ctid); */
+
+        .text
+ENTRY (__clone)
+	/* Sanity check arguments.  */
+	cmpnei	a0, 0		/* no NULL function pointers */
+	bf	__error_arg
+	cmpnei	a1, 0		/* no NULL function pointers */
+	bf	__error_arg
+
+	subi	a1, 8
+	stw	a0, (a1, 0)	/* insert the args onto the new stack */
+	stw	a3, (a1, 4)	/* insert the args onto the new stack */
+
+	mov	t1, r7		/* save r7 */
+	mov	t2, r4		/* save r4 */
+
+	mov	a0, a2		/* arg1 = flags */
+	ldw	a2, (sp, 0)	/* arg3 = ptid */
+	ldw	a3, (sp, 8)	/* arg4 = ctid */
+	ldw	r4, (sp, 4)	/* arg5 = tls */
+	lrw	r7, __NR_clone
+	trap	0
+
+	mov	r7, t1		/* restore r7 */
+	mov	r4, t2		/* restore r4 */
+	btsti	a0, 31		/* is a0 less than zero? */
+	bt	__do_syscall_error
+	cmpnei	a0, 0
+	bf	__child
+	rts
+
+__error_arg:
+	lrw	a0, -EINVAL
+
+__do_syscall_error:
+#ifdef __PIC__
+        grs     gb, .Lgetpc
+.Lgetpc:
+        lrw     t0, .Lgetpc@GOTPC
+        addu    gb, gb, t0
+        lrw     t0, __syscall_error@PLT
+        ldr.w   t0, (gb, t0 << 0)
+        jsr     t0
+#else
+        jmpi    __syscall_error
+#endif /* __PIC__ */
+	rts
+PSEUDO_END (__clone)
+
+__child:
+	ldw	a0, (sp, 4)	/* restore args from new sp */
+	ldw	a1, (sp, 0)	/* restore args from new sp */
+	addi	sp, 8
+	jsr	a1
+
+	/* exit */
+        lrw     r7, __NR_exit
+        trap    0
+
+libc_hidden_def (__clone)
+weak_alias (__clone, clone)
diff --git a/sysdeps/unix/sysv/linux/csky/abiv2/getcontext.S b/sysdeps/unix/sysv/linux/csky/abiv2/getcontext.S
new file mode 100644
index 0000000..a4bee38
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/csky/abiv2/getcontext.S
@@ -0,0 +1,73 @@
+/* Save current context.  C-SKY ABIV2 version.
+   Copyright (C) 2018 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>
+
+#include "ucontext_i.h"
+
+/* int getcontext (ucontext_t *ucp) */
+
+ENTRY (__getcontext)
+	/* No need to save r2-r7 or a0-a3 */
+	mov	t0, a0
+
+	addi	a0, MCONTEXT_CSKY_R4
+
+	stm	r4-r13, (a0)			/* save r4-r13 */
+	stw	sp, (t0, MCONTEXT_CSKY_SP)	/* save sp */
+	stw	r15, (t0, MCONTEXT_CSKY_LR)	/* save lr */
+	stw	r15, (t0, MCONTEXT_CSKY_PC)	/* Return to PC */
+	addi	a0, t0, MCONTEXT_CSKY_R16
+	stm	r16-r31, (a0)			/* save r16-r31 */
+	movi	a0, 0
+	stw	a0, (t0, MCONTEXT_CSKY_A0)	/* Return zero */
+
+	subi	sp, 8
+	stw	t0, (sp, 0)			/* save t0 after "save sp" */
+
+	/* __sigprocmask (SIG_BLOCK, NULL, &(ucontext->uc_sigmask)) */
+	movi	a0, SIG_BLOCK
+	movi	a1, 0
+	addi	a2, t0, UCONTEXT_SIGMASK
+
+	/* do sigprocmask syscall */
+#ifdef __PIC__
+	subi	sp, 8
+	stw	gb, (sp, 0)
+	grs	gb, .Lgetpc
+.Lgetpc:
+	lrw	a3, .Lgetpc@GOTPC
+	addu	gb, gb, a3
+	lrw	a3, __sigprocmask@PLT
+	ldr.w	a3, (gb, a3 << 0)
+	jsr	a3
+	ldw	gb, (sp, 0)
+	addi	sp, 8
+#else
+	jsri	__sigprocmask
+#endif
+
+	ldw	t0, (sp, 0)
+	addi	sp, 8
+	/* restore r15 for sigprocmask changes*/
+	ldw	r15, (t0, MCONTEXT_CSKY_LR)
+	movi	a0, 0				/* return 0 */
+	jmp	r15
+END (__getcontext)
+
+weak_alias (__getcontext, getcontext)
diff --git a/sysdeps/unix/sysv/linux/csky/abiv2/setcontext.S b/sysdeps/unix/sysv/linux/csky/abiv2/setcontext.S
new file mode 100644
index 0000000..1ceb928
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/csky/abiv2/setcontext.S
@@ -0,0 +1,96 @@
+/* Set saved user context to current context.  C-SKY ABIV2 version.
+   Copyright (C) 2018 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>
+
+#include "ucontext_i.h"
+
+/* int setcontext (const ucontext_t *ucp) */
+
+ENTRY (__setcontext)
+	mov	t0, a0
+	subi	sp, 8
+	stw	a0, (sp, 0)
+
+	/* set sigmask */
+	movi	a0, SIG_SETMASK
+	addi	a1, t0, UCONTEXT_SIGMASK
+	movi	a2, 0
+
+	/* do sigprocmask syscall */
+#ifdef __PIC__
+	subi	sp, 8
+	stw	gb, (sp, 0)
+	grs	gb, .Lgetpc1
+.Lgetpc1:
+	lrw	a3, .Lgetpc1@GOTPC
+	addu	gb, gb, a3
+	lrw	a3, __sigprocmask@PLT
+	ldr.w	a3, (gb, a3 << 0)
+	jsr	a3
+	ldw	gb, (sp, 0)
+	addi	sp, 8
+#else
+	jsri	__sigprocmask
+#endif /* __PIC__ */
+
+	ldw	t0, (sp, 0)
+	addi	sp, 8
+	/* set r0-r11. Load a0-a3, for makecontext requires */
+	addi	t1, t0, MCONTEXT_CSKY_A0
+	ldm	r0-r11, (t1)
+	ldw	sp, (t0, MCONTEXT_CSKY_SP)	/* load sp */
+	ldw	r15, (t0, MCONTEXT_CSKY_LR)	/* load lr */
+	ldw	t0, (t0, MCONTEXT_CSKY_PC)	/* load start addr */
+	jmp	t0
+END (setcontext)
+weak_alias (__setcontext, setcontext)
+
+ENTRY (__startcontext)
+	mov	a0, r9
+	cmpnei	r9, 0	/* r9 was set in makecontext */
+	bf	1f	/* null, then exit */
+
+	/* call setcontext */
+#ifdef __PIC__
+	grs	t1, .Lgetpc2
+.Lgetpc2:
+	lrw	t0, .Lgetpc2@GOTPC
+	addu	t1, t1, t0
+	lrw	t0, __setcontext@GOT
+	ldr.w	t0, (t1, t0 << 0)
+#else
+	lrw	t0, __setcontext
+#endif
+	jsr	t0
+
+1:
+	/* call _exit */
+#ifdef __PIC__
+	grs	t1, .Lgetpc3
+.Lgetpc3:
+	lrw	t0, .Lgetpc3@GOTPC
+	addu	t1, t1, t0
+	lrw	t0, _exit@GOT
+	ldr.w	t0, (t1, t0 << 0)
+#else
+	lrw	t0, _exit
+#endif
+	jsr	t0
+
+END (__startcontext)
diff --git a/sysdeps/unix/sysv/linux/csky/abiv2/swapcontext.S b/sysdeps/unix/sysv/linux/csky/abiv2/swapcontext.S
new file mode 100644
index 0000000..ea398f7
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/csky/abiv2/swapcontext.S
@@ -0,0 +1,78 @@
+/* Save and set current context.  C-SKY ABIV2 version.
+   Copyright (C) 2018 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>
+
+#include "ucontext_i.h"
+
+/* int swapcontext (ucontext_t *oucp, const ucontext_t *ucp) */
+
+ENTRY (swapcontext)
+	/* save params and lr */
+	subi	sp, 16
+	stw	a0, (sp, 0)
+	stw	a1, (sp, 4)
+	stw	r15, (sp, 8)
+
+	/* call getcontext */
+#ifdef __PIC__
+	grs	t1, .Lgetpc1
+.Lgetpc1:
+	lrw	t0, .Lgetpc1@GOTPC
+	addu	t1, t1, t0
+	lrw	t0, __getcontext@GOT
+	ldr.w	t0, (t1, t0 << 0)
+	jsr	t0
+#else /* no pic */
+	jsri	 __getcontext
+#endif
+
+	mov	a3, a0	/* save return value */
+
+	/* restore params and lr */
+	ldw	a0, (sp, 0)
+	ldw	a1, (sp, 4)
+	ldw	r15, (sp, 8)
+	addi	sp, 16
+
+	cmpnei	a3, 0
+	bt	error_exit
+
+	/* Fix up LR and the PC */
+	stw	sp, (a0, MCONTEXT_CSKY_SP)
+	stw	r15, (a0, MCONTEXT_CSKY_LR)
+	stw	r15, (a0, MCONTEXT_CSKY_PC)
+
+	/* set setcontext's arg */
+	mov	a0, a1
+
+#ifdef __PIC__
+	grs	t1, .Lgetpc2
+.Lgetpc2:
+	lrw	a3, .Lgetpc2@GOTPC
+	addu	t1, t1, a3
+	lrw	a3, __setcontext@GOT
+	ldr.w	a3, (t1, a3 << 0)
+#else /* __PIC__ */
+	lrw	a3, __setcontext
+#endif /* __PIC__ */
+	jmp	a3
+
+error_exit:
+	jmp	r15
+END (swapcontext)
diff --git a/sysdeps/unix/sysv/linux/csky/abiv2/syscall.S b/sysdeps/unix/sysv/linux/csky/abiv2/syscall.S
new file mode 100644
index 0000000..0d03b1b
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/csky/abiv2/syscall.S
@@ -0,0 +1,61 @@
+/* System call interface.  C-SKY ABIV2 version.
+   Copyright (C) 2018 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>
+
+/* long syscall(long sysnum, long a, long b, long c, long d, long e, long f) */
+
+ENTRY (syscall)
+	subi	sp, 8
+	stw	r4, (sp, 0)
+	stw	r5, (sp, 4)
+
+	mov	t0, r7
+	mov	r7, a0		/* r7 = sysnum */
+
+	mov	a0, a1		/* arg1 = a */
+	mov	a1, a2		/* arg2 = b */
+	mov	a2, a3		/* arg3 = c */
+	ldw	a3, (sp, 8)	/* arg4 = d */
+	ldw	r4, (sp, 12)	/* arg5 = e */
+	ldw	r5, (sp, 16)	/* arg6 = f */
+	trap	0
+
+	mov	r7, t0
+
+	ldw	r4, (sp, 0)
+	ldw	r5, (sp, 4)
+	addi	sp, 8
+
+	lrw	t0, 0xfffff000
+	cmphs	a0, t0
+	bf	1f
+#ifdef __PIC__
+	grs	gb, .Lgetpc
+.Lgetpc:
+	lrw	t0, .Lgetpc@GOTPC
+	addu	gb, gb, t0
+	lrw	t0, __syscall_error@PLT
+	ldr.w	t0, (gb, t0 << 0)
+	jsr	t0
+#else
+        jmpi    __syscall_error
+#endif /* __PIC__ */
+1:
+	rts
+PSEUDO_END (syscall)
diff --git a/sysdeps/unix/sysv/linux/csky/abiv2/sysdep.S b/sysdeps/unix/sysv/linux/csky/abiv2/sysdep.S
new file mode 100644
index 0000000..6cefaeb
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/csky/abiv2/sysdep.S
@@ -0,0 +1,65 @@
+/* syscall error handlers.  C-SKY ABIV2 version.
+   Copyright (C) 2018 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>
+
+/* The syscall stubs jump here when they detect an error.
+   The code for Linux is almost identical to the canonical Unix
+   code, except that the error number in R0 is negated.  */
+
+#undef CALL_MCOUNT
+#define CALL_MCOUNT /* Don't insert the profiling call, it clobbers R0.  */
+
+	.text
+ENTRY (__syscall_error)
+	movi	a1, 0
+	rsub	a0, a0, a1
+
+# if !IS_IN (rtld)
+	mov	a1, a0
+	mov	a0, tls
+
+        grs     t1, .Lgetpc1
+.Lgetpc1:
+        lrw     t0, errno@gottpoff
+        add     t1, t1, t0
+        ldw     t1, (t1)
+        add     t1, a0
+        stw     a1, (t1)
+        bmaski  a0, 0
+        rts
+# elif RTLD_PRIVATE_ERRNO /* !IS_IN (rtld) */
+#  ifdef  __PIC__
+        grs     t1, .Lgetpc2
+.Lgetpc2:
+        lrw     t0, .Lgetpc2@GOTPC
+        addu    t1, t1, t0
+        lrw     t0, rtld_errno@PLT
+        ldr.w   t0, (t1, t0 << 0)
+#  else
+        lrw     t0, rtld_errno
+#  endif /* __PIC__ */
+        stw     a0, (t0)
+        bmaski  a0, 0
+        rts
+# else
+#  error "Unsupported non-TLS case"
+# endif /* RTLD_PRIVATE_ERRNO */
+
+# undef  __syscall_error
+END (__syscall_error)
diff --git a/sysdeps/unix/sysv/linux/csky/pt-vfork.S b/sysdeps/unix/sysv/linux/csky/pt-vfork.S
new file mode 100644
index 0000000..1cc8931
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/csky/pt-vfork.S
@@ -0,0 +1 @@
+/* Not needed.  */
diff --git a/sysdeps/unix/sysv/linux/csky/syscalls.list b/sysdeps/unix/sysv/linux/csky/syscalls.list
new file mode 100644
index 0000000..2a8feb1
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/csky/syscalls.list
@@ -0,0 +1,2 @@
+# File name	Caller	Syscall name	Args	Strong name	Weak names
+cacheflush	-	cacheflush	i:pii	_flush_cache	cacheflush
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [RFC PATCH v3 07/12] C-SKY: Linux ABI
  2018-06-29  7:58 [RFC PATCH v3 00/12] port C-SKY to glibc Mao Han
                   ` (5 preceding siblings ...)
  2018-06-29  7:58 ` [RFC PATCH v3 06/12] C-SKY: Linux Syscall Interface Mao Han
@ 2018-06-29  7:58 ` Mao Han
  2018-06-29 16:53   ` Joseph Myers
  2018-06-29  7:58 ` [RFC PATCH v3 08/12] C-SKY: ABI Lists Mao Han
                   ` (4 subsequent siblings)
  11 siblings, 1 reply; 22+ messages in thread
From: Mao Han @ 2018-06-29  7:58 UTC (permalink / raw
  To: libc-alpha; +Cc: Mao Han, c-sky_gcc_upstream, gnu-csky

Linux-specific code that is required for maintaining ABI compatibility.
This doesn't contain the actual system call interface.

	* sysdeps/csky/nptl/pthread-offsets.h: New file.
	* sysdeps/csky/nptl/pthreaddef.h: Likewise.
	* sysdeps/unix/sysv/linux/csky/bits/mman.h: Likewise.
	* sysdeps/unix/sysv/linux/csky/bits/shm.h: Likewise.
	* sysdeps/unix/sysv/linux/csky/c++-types.data: Likewise.
	* sysdeps/unix/sysv/linux/csky/abiv2/ucontext_i.sym: Likewise.
	* sysdeps/unix/sysv/linux/csky/ipc_priv.h: Likewise.
	* sysdeps/unix/sysv/linux/csky/jmp_buf-macros.h: Likewise.
	* sysdeps/unix/sysv/linux/csky/kernel-features.h: Likewise.
	* sysdeps/unix/sysv/linux/csky/localplt.data: Likewise.
	* sysdeps/unix/sysv/linux/csky/makecontext.c: Likewise.
	* sysdeps/unix/sysv/linux/csky/profil-counter.h: Likewise.
	* sysdeps/unix/sysv/linux/csky/register-dump.h: Likewise.
	* sysdeps/unix/sysv/linux/csky/shlib-versions: Likewise.
	* sysdeps/unix/sysv/linux/csky/sigcontextinfo.h: Likewise.
	* sysdeps/unix/sysv/linux/csky/sys/cachectl.h: Likewise.
	* sysdeps/unix/sysv/linux/csky/sys/procfs.h: Likewise.
	* sysdeps/unix/sysv/linux/csky/sys/ucontext.h: Likewise.
	* sysdeps/unix/sysv/linux/csky/sys/user.h: Likewise.
	* sysdeps/unix/sysv/linux/csky/sysdep.h: Likewise.
	* sysdeps/unix/sysv/linux/csky/Versions: Likewise.
---
 sysdeps/csky/nptl/pthread-offsets.h               |   5 +
 sysdeps/csky/nptl/pthreaddef.h                    |  32 ++
 sysdeps/unix/sysv/linux/csky/Versions             |   5 +
 sysdeps/unix/sysv/linux/csky/abiv2/ucontext_i.sym |  32 ++
 sysdeps/unix/sysv/linux/csky/bits/mman.h          |  44 ++
 sysdeps/unix/sysv/linux/csky/bits/shm.h           | 103 ++++
 sysdeps/unix/sysv/linux/csky/c++-types.data       |  67 +++
 sysdeps/unix/sysv/linux/csky/ipc_priv.h           |  21 +
 sysdeps/unix/sysv/linux/csky/jmp_buf-macros.h     |   6 +
 sysdeps/unix/sysv/linux/csky/kernel-features.h    |  23 +
 sysdeps/unix/sysv/linux/csky/localplt.data        |  19 +
 sysdeps/unix/sysv/linux/csky/makecontext.c        |  78 +++
 sysdeps/unix/sysv/linux/csky/profil-counter.h     |  31 ++
 sysdeps/unix/sysv/linux/csky/register-dump.h      | 183 +++++++
 sysdeps/unix/sysv/linux/csky/shlib-versions       |   9 +
 sysdeps/unix/sysv/linux/csky/sigcontextinfo.h     |  38 ++
 sysdeps/unix/sysv/linux/csky/sys/cachectl.h       |  38 ++
 sysdeps/unix/sysv/linux/csky/sys/procfs.h         | 123 +++++
 sysdeps/unix/sysv/linux/csky/sys/ucontext.h       |  97 ++++
 sysdeps/unix/sysv/linux/csky/sys/user.h           |  65 +++
 sysdeps/unix/sysv/linux/csky/sysdep.h             | 596 ++++++++++++++++++++++
 21 files changed, 1615 insertions(+)
 create mode 100644 sysdeps/csky/nptl/pthread-offsets.h
 create mode 100644 sysdeps/csky/nptl/pthreaddef.h
 create mode 100644 sysdeps/unix/sysv/linux/csky/Versions
 create mode 100644 sysdeps/unix/sysv/linux/csky/abiv2/ucontext_i.sym
 create mode 100644 sysdeps/unix/sysv/linux/csky/bits/mman.h
 create mode 100644 sysdeps/unix/sysv/linux/csky/bits/shm.h
 create mode 100644 sysdeps/unix/sysv/linux/csky/c++-types.data
 create mode 100644 sysdeps/unix/sysv/linux/csky/ipc_priv.h
 create mode 100644 sysdeps/unix/sysv/linux/csky/jmp_buf-macros.h
 create mode 100644 sysdeps/unix/sysv/linux/csky/kernel-features.h
 create mode 100644 sysdeps/unix/sysv/linux/csky/localplt.data
 create mode 100644 sysdeps/unix/sysv/linux/csky/makecontext.c
 create mode 100644 sysdeps/unix/sysv/linux/csky/profil-counter.h
 create mode 100644 sysdeps/unix/sysv/linux/csky/register-dump.h
 create mode 100644 sysdeps/unix/sysv/linux/csky/shlib-versions
 create mode 100644 sysdeps/unix/sysv/linux/csky/sigcontextinfo.h
 create mode 100644 sysdeps/unix/sysv/linux/csky/sys/cachectl.h
 create mode 100644 sysdeps/unix/sysv/linux/csky/sys/procfs.h
 create mode 100644 sysdeps/unix/sysv/linux/csky/sys/ucontext.h
 create mode 100644 sysdeps/unix/sysv/linux/csky/sys/user.h
 create mode 100644 sysdeps/unix/sysv/linux/csky/sysdep.h

diff --git a/sysdeps/csky/nptl/pthread-offsets.h b/sysdeps/csky/nptl/pthread-offsets.h
new file mode 100644
index 0000000..9617354
--- /dev/null
+++ b/sysdeps/csky/nptl/pthread-offsets.h
@@ -0,0 +1,5 @@
+#define __PTHREAD_MUTEX_NUSERS_OFFSET   16
+#define __PTHREAD_MUTEX_KIND_OFFSET     12
+#define __PTHREAD_MUTEX_SPINS_OFFSET    20
+#define __PTHREAD_MUTEX_ELISION_OFFSET  22
+#define __PTHREAD_MUTEX_LIST_OFFSET     20
diff --git a/sysdeps/csky/nptl/pthreaddef.h b/sysdeps/csky/nptl/pthreaddef.h
new file mode 100644
index 0000000..f69fbc0
--- /dev/null
+++ b/sysdeps/csky/nptl/pthreaddef.h
@@ -0,0 +1,32 @@
+/* pthread machine parameter definitions.  C-SKY version.
+   Copyright (C) 2018 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/>.  */
+
+/* Default stack size.  */
+#define ARCH_STACK_DEFAULT_SIZE	(2 * 1024 * 1024)
+
+/* Required stack pointer alignment at beginning.  */
+#define STACK_ALIGN		8
+
+/* Minimal stack size after allocating thread descriptor and guard size.  */
+#define MINIMAL_REST_STACK	2048
+
+/* Alignment requirement for TCB.  */
+#define TCB_ALIGNMENT		8
+
+/* Location of current stack frame.  */
+#define CURRENT_STACK_FRAME	__builtin_frame_address (0)
diff --git a/sysdeps/unix/sysv/linux/csky/Versions b/sysdeps/unix/sysv/linux/csky/Versions
new file mode 100644
index 0000000..21bdb8b
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/csky/Versions
@@ -0,0 +1,5 @@
+libc {
+  GLIBC_2.28 {
+    cacheflush;
+  }
+}
diff --git a/sysdeps/unix/sysv/linux/csky/abiv2/ucontext_i.sym b/sysdeps/unix/sysv/linux/csky/abiv2/ucontext_i.sym
new file mode 100644
index 0000000..2da1bc5
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/csky/abiv2/ucontext_i.sym
@@ -0,0 +1,32 @@
+#include <inttypes.h>
+#include <signal.h>
+#include <stddef.h>
+#include <sys/ucontext.h>
+
+SIG_BLOCK
+SIG_SETMASK
+
+-- Offsets of the fields in the ucontext_t structure.
+#define ucontext(member)	offsetof (ucontext_t, member)
+#define mcontext(member)	ucontext (uc_mcontext.member)
+#define greg(member)		mcontext (gregs.member)
+#define fpreg(member)		mcontext (fpregs.member)
+
+UCONTEXT_FLAGS			ucontext (uc_flags)
+UCONTEXT_LINK			ucontext (uc_link)
+UCONTEXT_STACK			ucontext (uc_stack)
+UCONTEXT_MCONTEXT		ucontext (uc_mcontext)
+UCONTEXT_SIGMASK		ucontext (uc_sigmask)
+
+MCONTEXT_CSKY_PC		greg (pc)
+MCONTEXT_CSKY_SP		greg (usp)
+MCONTEXT_CSKY_LR		greg (lr)
+MCONTEXT_CSKY_A0		greg (a0)
+MCONTEXT_CSKY_R8		greg (regs[2])
+MCONTEXT_CSKY_R16		greg (exregs[0])
+MCONTEXT_CSKY_HI		greg (rhi)
+MCONTEXT_CSKY_LO		greg (rlo)
+MCONTEXT_CSKY_R4		greg (regs[0])
+MCONTEXT_CSKY_FESR		fpreg (fesr)
+MCONTEXT_CSKY_FCR		fpreg (fcr)
+MCONTEXT_CSKY_FR0		fpreg (vr[0])
diff --git a/sysdeps/unix/sysv/linux/csky/bits/mman.h b/sysdeps/unix/sysv/linux/csky/bits/mman.h
new file mode 100644
index 0000000..cbb16dc
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/csky/bits/mman.h
@@ -0,0 +1,44 @@
+/* Definitions for POSIX memory map interface.  Linux/C-SKY version.
+   Copyright (C) 2018 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
+
+/* The following definitions basically come from the kernel headers.
+   But the kernel header is not namespace clean.  */
+
+/* These are Linux-specific.  */
+#ifdef __USE_MISC
+# define MAP_GROWSDOWN	0x00100		/* Stack-like segment.  */
+# define MAP_DENYWRITE	0x00800		/* ETXTBSY */
+# define MAP_EXECUTABLE	0x01000		/* Mark it as an executable.  */
+# define MAP_LOCKED	0x02000		/* Lock the mapping.  */
+# define MAP_NORESERVE	0x04000		/* Don't check for reservations.  */
+# define MAP_POPULATE	0x08000		/* Populate (prefault) pagetables.  */
+# define MAP_NONBLOCK	0x10000		/* Do not block on IO.  */
+# define MAP_STACK	0x20000		/* Allocation is for a stack.  */
+# define MAP_HUGETLB	0x40000		/* Create huge page mapping.  */
+# define MAP_SYNC	0x80000		/* Perform synchronous page
+					   faults for the mapping.  */
+# define MAP_FIXED_NOREPLACE 0x100000   /* MAP_FIXED but do not unmap
+                                           underlying mapping.  */
+#endif
+
+/* Include generic Linux declarations.  */
+#include <bits/mman-linux.h>
diff --git a/sysdeps/unix/sysv/linux/csky/bits/shm.h b/sysdeps/unix/sysv/linux/csky/bits/shm.h
new file mode 100644
index 0000000..d745233
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/csky/bits/shm.h
@@ -0,0 +1,103 @@
+/* Copyright (C) 2018 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_SHM_H
+# error "Never include <bits/shm.h> directly; use <sys/shm.h> instead."
+#endif
+
+#include <bits/types.h>
+
+/* Permission flag for shmget.  */
+#define SHM_R		0400		/* or S_IRUGO from <linux/stat.h> */
+#define SHM_W		0200		/* or S_IWUGO from <linux/stat.h> */
+
+/* Flags for `shmat'.  */
+#define SHM_RDONLY	010000		/* attach read-only else read-write */
+#define SHM_RND		020000		/* round attach address to SHMLBA */
+#define SHM_REMAP	040000		/* take-over region on attach */
+#define SHM_EXEC	0100000		/* execution access */
+
+/* Commands for `shmctl'.  */
+#define SHM_LOCK	11		/* lock segment (root only) */
+#define SHM_UNLOCK	12		/* unlock segment (root only) */
+
+__BEGIN_DECLS
+
+/* Segment low boundary address multiple.  */
+#define SHMLBA		(__getpagesize () << 2)
+extern int __getpagesize (void) __THROW __attribute__ ((__const__));
+
+
+/* Type to count number of attaches.  */
+typedef unsigned long int shmatt_t;
+
+/* Data structure describing a shared memory segment.  */
+struct shmid_ds
+  {
+    struct ipc_perm shm_perm;		/* operation permission struct */
+    size_t shm_segsz;			/* size of segment in bytes */
+    __time_t shm_atime;			/* time of last shmat() */
+    unsigned long int __glibc_reserved1;
+    __time_t shm_dtime;			/* time of last shmdt() */
+    unsigned long int __glibc_reserved2;
+    __time_t shm_ctime;			/* time of last change by shmctl() */
+    unsigned long int __glibc_reserved3;
+    __pid_t shm_cpid;			/* pid of creator */
+    __pid_t shm_lpid;			/* pid of last shmop */
+    shmatt_t shm_nattch;		/* number of current attaches */
+    unsigned long int __glibc_reserved4;
+    unsigned long int __glibc_reserved5;
+  };
+
+#ifdef __USE_MISC
+
+/* ipcs ctl commands */
+# define SHM_STAT 	13
+# define SHM_INFO 	14
+
+/* shm_mode upper byte flags */
+# define SHM_DEST	01000	/* segment will be destroyed on last detach */
+# define SHM_LOCKED	02000   /* segment will not be swapped */
+# define SHM_HUGETLB	04000	/* segment is mapped via hugetlb */
+# define SHM_NORESERVE	010000	/* don't check for reservations */
+
+struct	shminfo
+  {
+    unsigned long int shmmax;
+    unsigned long int shmmin;
+    unsigned long int shmmni;
+    unsigned long int shmseg;
+    unsigned long int shmall;
+    unsigned long int __glibc_reserved1;
+    unsigned long int __glibc_reserved2;
+    unsigned long int __glibc_reserved3;
+    unsigned long int __glibc_reserved4;
+  };
+
+struct shm_info
+  {
+    int used_ids;
+    unsigned long int shm_tot;	/* total allocated shm */
+    unsigned long int shm_rss;	/* total resident shm */
+    unsigned long int shm_swp;	/* total swapped shm */
+    unsigned long int swap_attempts;
+    unsigned long int swap_successes;
+  };
+
+#endif /* __USE_MISC */
+
+__END_DECLS
diff --git a/sysdeps/unix/sysv/linux/csky/c++-types.data b/sysdeps/unix/sysv/linux/csky/c++-types.data
new file mode 100644
index 0000000..303f457
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/csky/c++-types.data
@@ -0,0 +1,67 @@
+blkcnt64_t:x
+blkcnt_t:l
+blksize_t:i
+caddr_t:Pc
+clockid_t:i
+clock_t:l
+daddr_t:i
+dev_t:y
+fd_mask:l
+fsblkcnt64_t:y
+fsblkcnt_t:m
+fsfilcnt64_t:y
+fsfilcnt_t:m
+fsid_t:8__fsid_t
+gid_t:j
+id_t:j
+ino64_t:y
+ino_t:m
+int16_t:s
+int32_t:i
+int64_t:x
+int8_t:a
+intptr_t:i
+key_t:i
+loff_t:x
+mode_t:j
+nlink_t:j
+off64_t:x
+off_t:l
+pid_t:i
+pthread_attr_t:14pthread_attr_t
+pthread_barrier_t:17pthread_barrier_t
+pthread_barrierattr_t:21pthread_barrierattr_t
+pthread_cond_t:14pthread_cond_t
+pthread_condattr_t:18pthread_condattr_t
+pthread_key_t:j
+pthread_mutex_t:15pthread_mutex_t
+pthread_mutexattr_t:19pthread_mutexattr_t
+pthread_once_t:i
+pthread_rwlock_t:16pthread_rwlock_t
+pthread_rwlockattr_t:20pthread_rwlockattr_t
+pthread_spinlock_t:i
+pthread_t:m
+quad_t:x
+register_t:i
+rlim64_t:y
+rlim_t:m
+sigset_t:10__sigset_t
+size_t:j
+socklen_t:j
+ssize_t:i
+suseconds_t:l
+time_t:l
+u_char:h
+uid_t:j
+uint:j
+u_int:j
+u_int16_t:t
+u_int32_t:j
+u_int64_t:y
+u_int8_t:h
+ulong:m
+u_long:m
+u_quad_t:y
+useconds_t:j
+ushort:t
+u_short:t
diff --git a/sysdeps/unix/sysv/linux/csky/ipc_priv.h b/sysdeps/unix/sysv/linux/csky/ipc_priv.h
new file mode 100644
index 0000000..56ded89
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/csky/ipc_priv.h
@@ -0,0 +1,21 @@
+/* Old SysV permission definition for Linux.  C-SKY version.
+   Copyright (C) 2017-2018 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/ipc.h>  /* For __key_t  */
+
+#define __IPC_64	0x0
diff --git a/sysdeps/unix/sysv/linux/csky/jmp_buf-macros.h b/sysdeps/unix/sysv/linux/csky/jmp_buf-macros.h
new file mode 100644
index 0000000..5a390c7
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/csky/jmp_buf-macros.h
@@ -0,0 +1,6 @@
+#define JMP_BUF_SIZE 268
+#define SIGJMP_BUF_SIZE 268
+#define JMP_BUF_ALIGN 4
+#define SIGJMP_BUF_ALIGN 4
+#define MASK_WAS_SAVED_OFFSET 136
+#define SAVED_MASK_OFFSET 140
diff --git a/sysdeps/unix/sysv/linux/csky/kernel-features.h b/sysdeps/unix/sysv/linux/csky/kernel-features.h
new file mode 100644
index 0000000..854865b
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/csky/kernel-features.h
@@ -0,0 +1,23 @@
+/* Set flags signalling availability of kernel features based on given
+   kernel version number.
+   Copyright (C) 2018 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_next <kernel-features.h>
+
+/* fadvise64_64 reorganize the syscall arguments.  */
+#define __ASSUME_FADVISE64_64_6ARG	1
diff --git a/sysdeps/unix/sysv/linux/csky/localplt.data b/sysdeps/unix/sysv/linux/csky/localplt.data
new file mode 100644
index 0000000..14c02cb
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/csky/localplt.data
@@ -0,0 +1,19 @@
+# See scripts/check-localplt.awk for how this file is processed.
+# PLT use is required for the malloc family and for matherr because
+# users can define their own functions and have library internals call them.
+libc.so: calloc
+libc.so: free
+libc.so: malloc
+libc.so: memalign
+libc.so: realloc
+# The main malloc is interposed into the dynamic linker, for
+# allocations after the initial link (when dlopen is used).
+ld.so: malloc
+ld.so: calloc
+ld.so: realloc
+ld.so: free
+# The TLS-enabled version of these functions is interposed from libc.so.
+ld.so: _dl_signal_error
+ld.so: _dl_catch_error
+ld.so: _dl_signal_exception
+ld.so: _dl_catch_exception
diff --git a/sysdeps/unix/sysv/linux/csky/makecontext.c b/sysdeps/unix/sysv/linux/csky/makecontext.c
new file mode 100644
index 0000000..fd7910d
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/csky/makecontext.c
@@ -0,0 +1,78 @@
+/* Create new context.  C-SKY version.
+   Copyright (C) 2018 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 <stdarg.h>
+#include <ucontext.h>
+
+/* Number of arguments that go in registers.  */
+#ifdef __CSKYABIV2__
+# define NREG_ARGS  4
+#else
+# define NREG_ARGS  6
+#endif
+
+/* Take a context previously prepared via getcontext() and set to
+   call func() with the given int only args.  */
+void
+__makecontext (ucontext_t *ucp, void (*func) (void), int argc, ...)
+{
+  extern void __startcontext (void);
+  unsigned long *funcstack;
+  va_list vl;
+  unsigned long *regptr;
+  unsigned int reg;
+  int misaligned;
+
+  /* Start at the top of stack.  */
+  funcstack = (unsigned long *) (ucp->uc_stack.ss_sp + ucp->uc_stack.ss_size);
+
+  /* Ensure the stack stays eight byte aligned.  */
+  misaligned = ((unsigned long) funcstack & 4) != 0;
+
+  if ((argc > NREG_ARGS) && (argc & 1) != 0)
+    misaligned = !misaligned;
+
+  if (misaligned)
+    funcstack -= 1;
+
+  va_start (vl, argc);
+
+  /* Reserve space for the on-stack arguments.  */
+  if (argc > NREG_ARGS)
+    funcstack -= (argc - NREG_ARGS);
+
+  ucp->uc_mcontext.gregs.usp = (unsigned long) funcstack;
+  ucp->uc_mcontext.gregs.pc = (unsigned long) func;
+
+  /* Exit to startcontext() with the next context in R9 */
+  ucp->uc_mcontext.gregs.regs[5] = (unsigned long) ucp->uc_link;
+  ucp->uc_mcontext.gregs.lr = (unsigned long) __startcontext;
+
+  /* The first four arguments go into registers.  */
+  regptr = &(ucp->uc_mcontext.gregs.a0);
+
+  for (reg = 0; (reg < argc) && (reg < NREG_ARGS); reg++)
+    *regptr++ = va_arg (vl, unsigned long);
+
+  /* And the remainder on the stack.  */
+  for (; reg < argc; reg++)
+    *funcstack++ = va_arg (vl, unsigned long);
+
+  va_end (vl);
+}
+weak_alias (__makecontext, makecontext)
diff --git a/sysdeps/unix/sysv/linux/csky/profil-counter.h b/sysdeps/unix/sysv/linux/csky/profil-counter.h
new file mode 100644
index 0000000..1f7ec7a
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/csky/profil-counter.h
@@ -0,0 +1,31 @@
+/* Low-level statistical profiling support function.  Linux/C-SKY version.
+   Copyright (C) 2018 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 <signal.h>
+#include <sigcontextinfo.h>
+
+void
+__profil_counter (int signo, const SIGCONTEXT scp)
+{
+  profil_count ((void *) GET_PC (scp));
+
+  /* This is a hack to prevent the compiler from implementing the
+     above function call as a sibcall.  The sibcall would overwrite
+     the signal context.  */
+  asm volatile ("");
+}
diff --git a/sysdeps/unix/sysv/linux/csky/register-dump.h b/sysdeps/unix/sysv/linux/csky/register-dump.h
new file mode 100644
index 0000000..ca265bb
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/csky/register-dump.h
@@ -0,0 +1,183 @@
+/* Dump registers.
+   Copyright (C) 2018 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 <_itoa.h>
+#include <bits/sigcontext.h>
+#include <sys/ucontext.h>
+
+/* abiv2 register dump in this format:
+
+ PSR: XXXXXXXX  PC: XXXXXXXX   SP: XXXXXXXX   LR: XXXXXXXX
+ MASK: XXXXXXXX
+
+ A0: XXXXXXXX   A1: XXXXXXXX   A2: XXXXXXXX   A3: XXXXXXXX
+ R4: XXXXXXXX   R5: XXXXXXXX   R6: XXXXXXXX   R7: XXXXXXXX
+ R8: XXXXXXXX   R9: XXXXXXXX   R10: XXXXXXXX  R11: XXXXXXXX
+ R12: XXXXXXXX  R13: XXXXXXXX  R14: XXXXXXXX  R15: XXXXXXXX
+ R16: XXXXXXXX  R17: XXXXXXXX  R18: XXXXXXXX  R19: XXXXXXXX
+ R20: XXXXXXXX  R21: XXXXXXXX  R22: XXXXXXXX  R23: XXXXXXXX
+ R24: XXXXXXXX  R25: XXXXXXXX  R26: XXXXXXXX  R27: XXXXXXXX
+ R28: XXXXXXXX  R29: XXXXXXXX  R30: XXXXXXXX  R31: XXXXXXXX
+
+ */
+
+static void
+hexvalue (unsigned long int value, char *buf, size_t len)
+{
+  char *cp = _itoa_word (value, buf + len, 16, 0);
+  while (cp > buf)
+    *--cp = '0';
+}
+
+static void
+register_dump (int fd, const struct ucontext_t *ctx)
+{
+  char regs[35][8];
+  struct iovec iov[97];
+  size_t nr = 0;
+
+#define ADD_STRING(str) \
+  iov[nr].iov_base = (char *) str;					      \
+  iov[nr].iov_len = strlen (str);					      \
+  ++nr
+#define ADD_MEM(str, len) \
+  iov[nr].iov_base = str;						      \
+  iov[nr].iov_len = len;						      \
+  ++nr
+
+  /* Generate strings of register contents.  */
+  hexvalue (ctx->uc_mcontext.gregs.sr, regs[0], 8);
+  hexvalue (ctx->uc_mcontext.gregs.pc, regs[1], 8);
+  hexvalue (ctx->uc_mcontext.gregs.usp, regs[2], 8);
+  hexvalue (ctx->uc_mcontext.gregs.lr, regs[3], 8);
+  hexvalue (ctx->uc_mcontext.mask, regs[4], 8);
+  hexvalue (ctx->uc_mcontext.gregs.a0, regs[5], 8);
+  hexvalue (ctx->uc_mcontext.gregs.a1, regs[6], 8);
+  hexvalue (ctx->uc_mcontext.gregs.a2, regs[7], 8);
+  hexvalue (ctx->uc_mcontext.gregs.a3, regs[8], 8);
+  hexvalue (ctx->uc_mcontext.gregs.regs[0], regs[9], 8);
+  hexvalue (ctx->uc_mcontext.gregs.regs[1], regs[10], 8);
+  hexvalue (ctx->uc_mcontext.gregs.regs[2], regs[11], 8);
+  hexvalue (ctx->uc_mcontext.gregs.regs[3], regs[12], 8);
+  hexvalue (ctx->uc_mcontext.gregs.regs[4], regs[13], 8);
+  hexvalue (ctx->uc_mcontext.gregs.regs[5], regs[14], 8);
+  hexvalue (ctx->uc_mcontext.gregs.regs[6], regs[15], 8);
+  hexvalue (ctx->uc_mcontext.gregs.regs[7], regs[16], 8);
+  hexvalue (ctx->uc_mcontext.gregs.regs[8], regs[17], 8);
+  hexvalue (ctx->uc_mcontext.gregs.regs[9], regs[18], 8);
+  hexvalue (ctx->uc_mcontext.gregs.exregs[0], regs[19], 8);
+  hexvalue (ctx->uc_mcontext.gregs.exregs[1], regs[20], 8);
+  hexvalue (ctx->uc_mcontext.gregs.exregs[2], regs[21], 8);
+  hexvalue (ctx->uc_mcontext.gregs.exregs[3], regs[22], 8);
+  hexvalue (ctx->uc_mcontext.gregs.exregs[4], regs[23], 8);
+  hexvalue (ctx->uc_mcontext.gregs.exregs[5], regs[24], 8);
+  hexvalue (ctx->uc_mcontext.gregs.exregs[6], regs[25], 8);
+  hexvalue (ctx->uc_mcontext.gregs.exregs[7], regs[26], 8);
+  hexvalue (ctx->uc_mcontext.gregs.exregs[8], regs[27], 8);
+  hexvalue (ctx->uc_mcontext.gregs.exregs[9], regs[28], 8);
+  hexvalue (ctx->uc_mcontext.gregs.exregs[10], regs[29], 8);
+  hexvalue (ctx->uc_mcontext.gregs.exregs[11], regs[30], 8);
+  hexvalue (ctx->uc_mcontext.gregs.exregs[12], regs[31], 8);
+  hexvalue (ctx->uc_mcontext.gregs.exregs[13], regs[32], 8);
+  hexvalue (ctx->uc_mcontext.gregs.exregs[14], regs[33], 8);
+  hexvalue (ctx->uc_mcontext.gregs.tls, regs[34], 8);
+
+  /* Generate the output.  */
+  ADD_STRING ("Register dump:\n\n PSR: ");
+  ADD_MEM (regs[0], 8);
+  ADD_STRING ("  PC: ");
+  ADD_MEM (regs[1], 8);
+  ADD_STRING ("   SP: ");
+  ADD_MEM (regs[2], 8);
+  ADD_STRING ("   LR: ");
+  ADD_MEM (regs[3], 8);
+  ADD_STRING ("\n MASK: ");
+  ADD_MEM (regs[4], 8);
+  ADD_STRING ("\n\n A0: ");
+  ADD_MEM (regs[5], 8);
+  ADD_STRING ("   A1: ");
+  ADD_MEM (regs[6], 8);
+  ADD_STRING ("   A2: ");
+  ADD_MEM (regs[7], 8);
+  ADD_STRING ("   A3: ");
+  ADD_MEM (regs[8], 8);
+  ADD_STRING ("\n R4: ");
+  ADD_MEM (regs[9], 8);
+  ADD_STRING ("   r5: ");
+  ADD_MEM (regs[10], 8);
+  ADD_STRING ("   r6: ");
+  ADD_MEM (regs[11], 8);
+  ADD_STRING ("   r7: ");
+  ADD_MEM (regs[12], 8);
+  ADD_STRING ("\n R8: ");
+  ADD_MEM (regs[13], 8);
+  ADD_STRING ("   R9: ");
+  ADD_MEM (regs[14], 8);
+  ADD_STRING ("   R10: ");
+  ADD_MEM (regs[15], 8);
+  ADD_STRING ("  R11: ");
+  ADD_MEM (regs[16], 8);
+  ADD_STRING ("\n R12: ");
+  ADD_MEM (regs[17], 8);
+  ADD_STRING ("  R13: ");
+  ADD_MEM (regs[18], 8);
+  ADD_STRING ("  R14: ");
+  ADD_MEM (regs[19], 8);
+  ADD_STRING ("  R15: ");
+  ADD_MEM (regs[20], 8);
+  ADD_STRING ("\n R16: ");
+  ADD_MEM (regs[21], 8);
+  ADD_STRING ("  R17: ");
+  ADD_MEM (regs[22], 8);
+  ADD_STRING ("  R18: ");
+  ADD_MEM (regs[23], 8);
+  ADD_STRING ("  R19: ");
+  ADD_MEM (regs[24], 8);
+  ADD_STRING ("\n R20: ");
+  ADD_MEM (regs[25], 8);
+  ADD_STRING ("  R21: ");
+  ADD_MEM (regs[26], 8);
+  ADD_STRING ("  R22: ");
+  ADD_MEM (regs[27], 8);
+  ADD_STRING ("  R23: ");
+  ADD_MEM (regs[28], 8);
+  ADD_STRING ("\n R24: ");
+  ADD_MEM (regs[29], 8);
+  ADD_STRING ("  R25: ");
+  ADD_MEM (regs[30], 8);
+  ADD_STRING ("  R26: ");
+  ADD_MEM (regs[31], 8);
+  ADD_STRING ("  R27: ");
+  ADD_MEM (regs[32], 8);
+  ADD_STRING ("\n R28: ");
+  ADD_MEM (regs[33], 8);
+  ADD_STRING ("  R29: ");
+  ADD_MEM (regs[34], 8);
+  ADD_STRING ("  R30: ");
+  ADD_MEM (regs[33], 8);
+  ADD_STRING ("  TP: ");
+  ADD_MEM (regs[34], 8);
+
+  ADD_STRING ("\n");
+
+  /* Write the stuff out.  */
+  writev (fd, iov, nr);
+}
+
+#define REGISTER_DUMP register_dump (fd, ctx)
diff --git a/sysdeps/unix/sysv/linux/csky/shlib-versions b/sysdeps/unix/sysv/linux/csky/shlib-versions
new file mode 100644
index 0000000..15d5d7e
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/csky/shlib-versions
@@ -0,0 +1,9 @@
+DEFAULT			GLIBC_2.28
+
+%if CSKYABI == 2 && CSKY_HARD_FLOAT == 0
+ld=ld-linux-cskyv2-sfp-le.so.1
+%elif CSKYABI == 2 && CSKY_HARD_FLOAT == 1
+ld=ld-linux-cskyv2-hfp-le.so.1
+%else
+%error cannot determine ABI
+%endif
diff --git a/sysdeps/unix/sysv/linux/csky/sigcontextinfo.h b/sysdeps/unix/sysv/linux/csky/sigcontextinfo.h
new file mode 100644
index 0000000..a9f55f6
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/csky/sigcontextinfo.h
@@ -0,0 +1,38 @@
+/* C-SKY definitions for signal handling calling conventions.
+   Copyright (C) 2018 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 SIGCONTEXT siginfo_t *_si, struct ucontext_t *
+#define SIGCONTEXT_EXTRA_ARGS _si,
+#define GET_PC(ctx)     ((void *) (ctx)->uc_mcontext.gregs.pc)
+/* r8 is fp, make sure it is in the same area in sigcontext.  */
+#define GET_FRAME(ctx)  ((void *) (ctx)->uc_mcontext.gregs.sc_regs[2])
+#define GET_STACK(ctx)  ((void *) (ctx)->uc_mcontext.gregs.sc_usp)
+#define CALL_SIGHANDLER(handler, signo, ctx) \
+  (handler) ((signo), SIGCONTEXT_EXTRA_ARGS (ctx))
+
+/* There is no reliable way to get the sigcontext unless we use a
+   three-argument signal handler.  */
+#define __sigaction(sig, act, oact) ({ \
+  (act)->sa_flags |= SA_SIGINFO; \
+  (__sigaction) (sig, act, oact); \
+})
+
+#define sigaction(sig, act, oact) ({ \
+  (act)->sa_flags |= SA_SIGINFO; \
+  (sigaction) (sig, act, oact); \
+})
diff --git a/sysdeps/unix/sysv/linux/csky/sys/cachectl.h b/sysdeps/unix/sysv/linux/csky/sys/cachectl.h
new file mode 100644
index 0000000..f3d7be4
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/csky/sys/cachectl.h
@@ -0,0 +1,38 @@
+/* C-SKY cache flushing interface
+   Copyright (C) 2018 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_CACHECTL_H
+#define _SYS_CACHECTL_H 1
+
+#include <features.h>
+
+/* Get the kernel definition for the op bits.  */
+#include <asm/cachectl.h>
+
+__BEGIN_DECLS
+
+#ifdef __USE_MISC
+extern int cacheflush (void *__addr, const int __nbytes,
+		       const int __op) __THROW;
+#endif
+extern int _flush_cache (char *__addr, const int __nbytes,
+		         const int __op) __THROW;
+
+__END_DECLS
+
+#endif /* sys/cachectl.h */
diff --git a/sysdeps/unix/sysv/linux/csky/sys/procfs.h b/sysdeps/unix/sysv/linux/csky/sys/procfs.h
new file mode 100644
index 0000000..4c9721b
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/csky/sys/procfs.h
@@ -0,0 +1,123 @@
+/* Core image file related definitions, C-SKY version.
+   Copyright (C) 2018 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_PROCFS_H
+#define _SYS_PROCFS_H	1
+
+/* This is somewhat modelled after the file of the same name on SVR4
+   systems.  It provides a definition of the core file format for ELF
+   used on Linux.  It doesn't have anything to do with the /proc file
+   system, even though Linux has one.
+
+   Anyway, the whole purpose of this file is for GDB and GDB only.
+   Don't read too much into it.  Don't use it for anything other than
+   GDB unless you know what you are doing.  */
+
+#include <features.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <sys/user.h>
+
+__BEGIN_DECLS
+
+/* Type for a general-purpose register.  */
+typedef unsigned long elf_greg_t;
+
+/* And the whole bunch of them.  We could have used `struct
+   user_regs' directly in the typedef, but tradition says that
+   the register set is an array, which does have some peculiar
+   semantics, so leave it that way.  */
+#define ELF_NGREG (sizeof (struct user_regs) / sizeof(elf_greg_t))
+typedef elf_greg_t elf_gregset_t[ELF_NGREG];
+
+/* Register set for the floating-point registers.  */
+typedef struct user_fpregs elf_fpregset_t;
+
+/* Signal info.  */
+struct elf_siginfo
+  {
+    int si_signo;			/* Signal number.  */
+    int si_code;			/* Extra code.  */
+    int si_errno;			/* Errno.  */
+  };
+
+/* Definitions to generate Intel SVR4-like core files.  These mostly
+   have the same names as the SVR4 types with "elf_" tacked on the
+   front to prevent clashes with Linux definitions, and the typedef
+   forms have been avoided.  This is mostly like the SVR4 structure,
+   but more Linuxy, with things that Linux does not support and which
+   GDB doesn't really use excluded.  */
+
+struct elf_prstatus
+  {
+    struct elf_siginfo pr_info;		/* Info associated with signal.  */
+    short int pr_cursig;		/* Current signal.  */
+    unsigned long int pr_sigpend;	/* Set of pending signals.  */
+    unsigned long int pr_sighold;	/* Set of held signals.  */
+    __pid_t pr_pid;
+    __pid_t pr_ppid;
+    __pid_t pr_pgrp;
+    __pid_t pr_sid;
+    struct timeval pr_utime;		/* User time.  */
+    struct timeval pr_stime;		/* System time.  */
+    struct timeval pr_cutime;		/* Cumulative user time.  */
+    struct timeval pr_cstime;		/* Cumulative system time.  */
+    elf_gregset_t pr_reg;		/* GP registers.  */
+    int pr_fpvalid;			/* True if math copro being used.  */
+  };
+
+
+#define ELF_PRARGSZ     (80)    /* Number of chars for args.  */
+
+struct elf_prpsinfo
+  {
+    char pr_state;			/* Numeric process state.  */
+    char pr_sname;			/* Char for pr_state.  */
+    char pr_zomb;			/* Zombie.  */
+    char pr_nice;			/* Nice val.  */
+    unsigned long int pr_flag;		/* Flags.  */
+    unsigned short int pr_uid;
+    unsigned short int pr_gid;
+    int pr_pid, pr_ppid, pr_pgrp, pr_sid;
+    /* Lots missing */
+    char pr_fname[16];			/* Filename of executable.  */
+    char pr_psargs[ELF_PRARGSZ];	/* Initial part of arg list.  */
+  };
+
+/* The rest of this file provides the types for emulation of the
+   Solaris <proc_service.h> interfaces that should be implemented by
+   users of libthread_db.  */
+
+/* Addresses.  */
+typedef void *psaddr_t;
+
+/* Register sets.  Linux has different names.  */
+typedef elf_gregset_t prgregset_t;
+typedef elf_fpregset_t prfpregset_t;
+
+/* We don't have any differences between processes and threads,
+   therefore have only one PID type.  */
+typedef __pid_t lwpid_t;
+
+/* Process status and info.  In the end we do provide typedefs for them.  */
+typedef struct elf_prstatus prstatus_t;
+typedef struct elf_prpsinfo prpsinfo_t;
+
+__END_DECLS
+
+#endif	/* sys/procfs.h */
diff --git a/sysdeps/unix/sysv/linux/csky/sys/ucontext.h b/sysdeps/unix/sysv/linux/csky/sys/ucontext.h
new file mode 100644
index 0000000..95a0b6b
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/csky/sys/ucontext.h
@@ -0,0 +1,97 @@
+/* struct ucontext definition, C-SKY version.
+   Copyright (C) 2018 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_UCONTEXT_H
+#define _SYS_UCONTEXT_H	1
+
+#include <features.h>
+
+#include <bits/types/sigset_t.h>
+#include <bits/types/stack_t.h>
+
+#ifdef __USE_MISC
+# define __ctx(fld) fld
+#else
+# define __ctx(fld) __ ## fld
+#endif
+
+typedef struct
+  {
+    unsigned long __ctx(tls);
+    unsigned long __ctx(lr);
+    unsigned long __ctx(pc);
+    unsigned long __ctx(sr);
+    unsigned long __ctx(usp);
+
+    /*
+     * a0, a1, a2, a3:
+     * abiv1: r2, r3, r4, r5
+     * abiv2: r0, r1, r2, r3
+     */
+
+    unsigned long __ctx(orig_a0);
+    unsigned long __ctx(a0);
+    unsigned long __ctx(a1);
+    unsigned long __ctx(a2);
+    unsigned long __ctx(a3);
+
+    /*
+     * ABIV2: r4 ~ r13
+     */
+    unsigned long __ctx(regs)[10];
+
+    /* r16 ~ r30 */
+    unsigned long __ctx(exregs)[15];
+
+    unsigned long __ctx(rhi);
+    unsigned long __ctx(rlo);
+    unsigned long __glibc_reserved;
+
+  } gregset_t;
+
+typedef struct
+  {
+    unsigned long __ctx(vr)[64];
+    unsigned long __ctx(fcr);
+    unsigned long __ctx(fesr);
+    unsigned long __ctx(fid);
+    unsigned long __glibc_reserved;
+  } fpregset_t;
+
+/* Context to describe whole processor state. */
+typedef struct
+  {
+    unsigned long __ctx(mask);
+    gregset_t __ctx(gregs);
+    fpregset_t __ctx(fpregs);
+  } mcontext_t;
+
+/* Userlevel context.  */
+typedef struct ucontext_t
+  {
+    unsigned long int __ctx(uc_flags);
+    struct ucontext_t *uc_link;
+    stack_t uc_stack;
+    mcontext_t uc_mcontext;
+    sigset_t uc_sigmask;
+  } ucontext_t;
+
+#undef __ctx
+
+
+#endif /* sys/ucontext.h */
diff --git a/sysdeps/unix/sysv/linux/csky/sys/user.h b/sysdeps/unix/sysv/linux/csky/sys/user.h
new file mode 100644
index 0000000..b98ed60
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/csky/sys/user.h
@@ -0,0 +1,65 @@
+/* ptrace register data format definitions.  C-SKY version.
+   Copyright (C) 2018 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_USER_H
+#define _SYS_USER_H  1
+
+struct user_fpregs {
+  unsigned long fsr;		/* fpu status reg */
+  unsigned long fesr;		/* fpu exception status reg */
+  unsigned long fp[32];		/* fpu general regs */
+};
+
+struct user_regs {
+#if defined(__ck807__) || defined(__ck810__) || defined(__ck860__)
+  unsigned long int uregs[34];	/* CSKY V2 has 32 general rgister */
+#else
+  unsigned long int uregs[18];	/* CSKY V1 has 16 general rgister */
+#endif
+};
+
+/* When the kernel dumps core, it starts by dumping the user struct -
+   this will be used by gdb to figure out where the data and stack segments
+   are within the file, and what virtual addresses to use.
+ */
+struct user{
+/* We start with the registers, to mimic the way that "memory" is returned
+   from the ptrace(3,...) function.  */
+  struct user_regs    regs;	   /* The registers are actually stored */
+  int                 u_fpvalid;   /* True if math co-processor being used. */
+
+/* The rest of this junk is to help gdb figure out what goes where */
+  unsigned long int   u_tsize;	   /* Text segment size (pages). */
+  unsigned long int   u_dsize;	   /* Data segment size (pages). */
+  unsigned long int   u_ssize;	   /* Stack segment size (pages). */
+  unsigned long       start_code;  /* Starting virtual address of text. */
+  unsigned long       start_stack; /* Starting virtual address of stack area.
+				      This is actually the bottom of the stack
+				      the top of the stack is always found in
+				      the esp register.  */
+  long int            signal;	   /* Signal that caused the core dump. */
+  int                 reserved;	   /* No longer used */
+  struct user_regs *  u_ar0;	   /* Used by gdb to help find the values
+				      for the registers. */
+  unsigned long       magic;	   /* To uniquely identify a core file */
+  char                u_comm[32];  /* User command that was responsible */
+  struct user_fpregs  u_fp;
+  struct user_fpregs* u_fpstate;   /* Math Co-processor pointer. */
+};
+
+#endif /* _SYS_USER_H */
diff --git a/sysdeps/unix/sysv/linux/csky/sysdep.h b/sysdeps/unix/sysv/linux/csky/sysdep.h
new file mode 100644
index 0000000..a97aaf1
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/csky/sysdep.h
@@ -0,0 +1,596 @@
+/* Assembly macros for C-SKY.
+   Copyright (C) 2018 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 _LINUX_CSKY_SYSDEP_H
+#define _LINUX_CSKY_SYSDEP_H 1
+
+/* There is some commonality.  */
+#include <sysdeps/unix/sysv/linux/generic/sysdep.h>
+#include <sysdeps/unix/sysv/linux/sysdep.h>
+#include <sysdeps/csky/sysdep.h>
+
+/* Defines RTLD_PRIVATE_ERRNO and USE_DL_SYSINFO.  */
+#include <dl-sysdep.h>
+
+#include <tls.h>
+
+/* In order to get __set_errno() definition in INLINE_SYSCALL.  */
+#ifndef __ASSEMBLER__
+# include <errno.h>
+#endif
+
+#undef SYS_ify
+#define SYS_ify(syscall_name)  (__NR_##syscall_name)
+
+#ifdef __ASSEMBLER__
+/* Linux uses a negative return value to indicate syscall errors,
+   unlike most Unices, which use the condition codes' carry flag.
+
+   Since version 2.1 the return value of a system call might be
+   negative even if the call succeeded.  E.g., the `lseek' system call
+   might return a large offset.  Therefore we must not anymore test
+   for < 0, but test for a real error by making sure the value in R0
+   is a real error number.  Linus said he will make sure the no syscall
+   returns a value in -1 .. -4095 as a valid result so we can safely
+   test with -4095.  */
+
+# undef	PSEUDO
+# define	PSEUDO(name, syscall_name, args)	\
+  .text;						\
+  ENTRY (name);						\
+    DO_CALL (syscall_name, args);
+
+
+# if defined (__PIC__)
+#  define __GET_GB1  \
+	bsr getgb; getgb: lrw gb, getgb@GOTPC; addu gb, lr;
+# else
+#  define __GET_GB1
+# endif /* !__PIC__ */
+
+# undef  PSEUDO_RET
+# ifdef __PIC__
+#  if !IS_IN (libc)
+#   define PSEUDO_RET	\
+	btsti  a0, 31;					\
+	bf	   1f;					\
+	subi sp, 8; st.w lr, (sp); st.w gb, (sp, 4);	\
+	__GET_GB1					\
+	bsr    SYSCALL_ERROR;				\
+	ld.w lr, (sp); ld.w gb, (sp, 4); addi sp, 8;	\
+1:							\
+    rts
+#  else
+#   define PSEUDO_RET	\
+	btsti  a0, 31;					\
+	bf    2f;					\
+	subi sp, 8; st.w lr, (sp); st.w gb, (sp, 4);	\
+	__GET_GB1;					\
+	lrw   a2, SYSCALL_ERROR@PLT;			\
+	add   a2, gb;					\
+	ld.w  a2, (a2);					\
+	jsr   a2;					\
+	ld.w lr, (sp); ld.w gb, (sp, 4); addi sp, 8;	\
+2:							\
+	rts
+#  endif /* IS_IN (libc) */
+# else
+#  if !IS_IN (libc)
+#   define PSEUDO_RET		\
+	btsti  a0, 31;		\
+	bt     SYSCALL_ERROR;	\
+	rts
+#  else
+#   define PSEUDO_RET				\
+	btsti  a0, 31;				\
+	bf     3f;				\
+	jmpi   SYSCALL_ERROR;			\
+3:						\
+	rts
+#  endif /* !IS_IN (libc) */
+# endif /* __PIC__ */
+
+
+# undef ret
+# define ret PSEUDO_RET
+
+# undef	PSEUDO_END
+# define PSEUDO_END(name)	\
+  .align 4;			\
+  SYSCALL_ERROR_HANDLER;	\
+  END (name)
+
+# undef	PSEUDO_NOERRNO
+# define PSEUDO_NOERRNO(name, syscall_name, args)	\
+  .text;				\
+  ENTRY (name);				\
+    DO_CALL (syscall_name, args)
+
+# define PSEUDO_RET_NOERRNO \
+	jmp     r15;
+
+# undef ret_NOERRNO
+# define ret_NOERRNO PSEUDO_RET_NOERRNO
+
+# undef	PSEUDO_END_NOERRNO
+# define PSEUDO_END_NOERRNO(name)	\
+	END (name)
+
+/* The function has to return the error code.  */
+# undef	PSEUDO_ERRVAL
+# define PSEUDO_ERRVAL(name, syscall_name, args)	\
+  .text;				\
+  ENTRY (name)				\
+    DO_CALL (syscall_name, args);	\
+    not  a0;				\
+    addi a0, 1
+
+# undef	PSEUDO_END_ERRVAL
+# define PSEUDO_END_ERRVAL(name) \
+  END (name)
+
+# define ret_ERRVAL rts
+
+# if !IS_IN (libc)
+#  define SYSCALL_ERROR __local_syscall_error
+#  if RTLD_PRIVATE_ERRNO
+#   ifdef __PIC__
+#    define SYSCALL_ERROR_HANDLER	\
+__local_syscall_error:			\
+        lrw     a1, rtld_errno@PLT; 	\
+        addu	a1, gb;			\
+        ldw     a1, (a1);		\
+        rsubi   a0, 0;			\
+        stw     a0, (a1);		\
+        bmaski  a0, 0;			\
+        rts
+#   else /* __PIC__ */
+#    define SYSCALL_ERROR_HANDLER	\
+__local_syscall_error:			\
+        lrw     a1, rtld_errno;		\
+        rsubi   a0, 0;			\
+        stw     a0, (a1);		\
+        bmaski  a0, 0;			\
+        rts
+#   endif /* __PIC__ */
+#  else /* !RTLD_PRIVATE_ERRNO */
+#    ifdef __PIC__
+#     define SYSCALL_ERROR_HANDLER	\
+__local_syscall_error:				\
+        subi    sp, 8;				\
+        stw     a0, (sp, 0);			\
+        stw     r15, (sp, 4);			\
+        lrw     a1, __errno_location@PLT;	\
+	add	a1, gb;				\
+        ldw     a1, (a1);			\
+        jsr     a1;				\
+        ldw     a1, (sp, 0); /* load errno*/	\
+        ldw     r15, (sp, 4);			\
+        addi    sp, 8;				\
+        movi    a2, 0;				\
+        rsub    a1, a1, a2;			\
+        stw     a1, (a0);			\
+        bmaski  a0, 0;				\
+        rts
+#    else
+#     define SYSCALL_ERROR_HANDLER 	\
+__local_syscall_error:                                          \
+        subi    sp, 8;                                          \
+        stw     a0, (sp, 0);                                    \
+        stw     r15, (sp, 4);                                   \
+        lrw     a1, __errno_location;                           \
+        jsr     a1;                                             \
+        ldw     a1, (sp, 0);  /* load errno */                  \
+        ldw     r15, (sp, 4);                                   \
+        addi    sp, 8;                                          \
+        movi    a2, 0;                                          \
+        rsub    a1, a1, a2;                                     \
+        stw     a1, (a0);                                       \
+        bmaski  a0, 0;                                          \
+        rts
+#   endif /* __PIC__ */
+#  endif/* RTLD_PRIVATE_ERROR */
+# else
+#  define SYSCALL_ERROR_HANDLER  /* Nothing here; code in sysdep.S is used.  */
+#  define SYSCALL_ERROR __syscall_error
+# endif/* IS_IN (libc) */
+
+/* define DO_CALL */
+#undef	DO_CALL
+#define DO_CALL(syscall_name, args)		\
+    DOARGS_##args;				\
+    lrw  r7, SYS_ify(syscall_name);		\
+    trap 0;					\
+    UNDOARGS_##args
+
+#undef  DOARGS_0
+#define DOARGS_0    \
+  subi sp, 8;       \
+  cfi_adjust_cfa_offset (8); \
+  stw  r7, (sp, 0);  \
+  cfi_rel_offset (r7, 0);
+
+#undef  DOARGS_1
+#define DOARGS_1 DOARGS_0
+#undef  DOARGS_2
+#define DOARGS_2 DOARGS_0
+#undef  DOARGS_3
+#define DOARGS_3 DOARGS_0
+#undef  DOARGS_4
+#define DOARGS_4 DOARGS_0
+#undef  DOARGS_5
+#define DOARGS_5    \
+  subi sp, 8;       \
+  cfi_adjust_cfa_offset (8); \
+  stw  r7, (sp, 0); \
+  cfi_rel_offset (7, 0); \
+  stw  r4, (sp, 4); \
+  cfi_rel_offset (4, 4); \
+  ldw  r4, (sp, 8)
+#undef  DOARGS_6
+#define DOARGS_6    \
+  subi sp, 16;      \
+  cfi_adjust_cfa_offset (16); \
+  stw  r7, (sp, 0); \
+  cfi_rel_offset (7, 0); \
+  stw  r4, (sp, 4); \
+  cfi_rel_offset (4, 4); \
+  stw  r5, (sp, 8); \
+  cfi_rel_offset (5, 8); \
+  ldw  r4, (sp, 16); \
+  ldw  r5, (sp, 20)
+
+#undef  UNDOARGS_0
+#define UNDOARGS_0 \
+  ldw  r7, (sp, 0); \
+  cfi_restore (r7); \
+  addi sp, 8;   \
+  cfi_adjust_cfa_offset (-8);
+
+#undef  UNDOARGS_1
+#define UNDOARGS_1 UNDOARGS_0
+#undef  UNDOARGS_2
+#define UNDOARGS_2 UNDOARGS_0
+#undef  UNDOARGS_3
+#define UNDOARGS_3 UNDOARGS_0
+#undef  UNDOARGS_4
+#define UNDOARGS_4 UNDOARGS_0
+#undef  UNDOARGS_5
+#define UNDOARGS_5  \
+  ldw  r7, (sp, 0); \
+  cfi_restore (r4); \
+  ldw  r4, (sp, 4); \
+  cfi_restore (r4); \
+  addi sp, 8;  \
+  cfi_adjust_cfa_offset (-8);
+
+#undef  UNDOARGS_6
+#define UNDOARGS_6 \
+  ldw  r7, (sp, 0); \
+  cfi_restore (r7); \
+  ldw  r4, (sp, 4); \
+  cfi_restore (r4); \
+  ldw  r5, (sp, 8); \
+  cfi_restore (r5); \
+  addi sp, 16;    \
+  cfi_adjust_cfa_offset (-16);
+
+#undef	DO_CALL_2
+#define DO_CALL_2(syscall_name, args)		\
+    DOARGS2_##args;				\
+    lrw  r7, SYS_ify(syscall_name);		\
+    trap 0;					\
+    UNDOARGS2_##args
+
+/*
+ * to be quite different with DO_CALL, DO_CALL_2 need not save r7.
+ */
+#undef  DOARGS2_0
+#define DOARGS2_0
+
+#undef  DOARGS2_1
+#define DOARGS2_1 DOARGS2_0
+#undef  DOARGS2_2
+#define DOARGS2_2 DOARGS2_0
+#undef  DOARGS2_3
+#define DOARGS2_3 DOARGS2_0
+#undef  DOARGS2_4
+#define DOARGS2_4 DOARGS2_0
+#undef  DOARGS2_5
+#define DOARGS2_5   \
+  subi sp, 8;       \
+  cfi_adjust_cfa_offset (8); \
+  stw  r4, (sp, 0); \
+  cfi_rel_offset (4, 0); \
+  ldw  r4, (sp, 20)
+#undef  DOARGS2_6
+#define DOARGS2_6    \
+  subi sp, 8;       \
+  cfi_adjust_cfa_offset (8); \
+  stw  r4, (sp, 0); \
+  cfi_rel_offset (4, 0); \
+  stw  r5, (sp, 4); \
+  cfi_rel_offset (5, 0); \
+  ldw  r4, (sp, 20); \
+  ldw  r5, (sp, 24)
+
+#undef  UNDOARGS2_0
+#define UNDOARGS2_0
+
+#undef  UNDOARGS2_1
+#define UNDOARGS2_1 UNDOARGS2_0
+#undef  UNDOARGS2_2
+#define UNDOARGS2_2 UNDOARGS2_0
+#undef  UNDOARGS2_3
+#define UNDOARGS2_3 UNDOARGS2_0
+#undef  UNDOARGS2_4
+#define UNDOARGS2_4 UNDOARGS2_0
+#undef  UNDOARGS2_5
+#define UNDOARGS2_5  \
+  ldw  r4, (sp, 0); \
+  addi sp, 8
+
+#undef  UNDOARGS2_6
+#define UNDOARGS2_6 \
+  ldw  r4, (sp, 0); \
+  ldw  r5, (sp, 4); \
+  addi sp, 8
+
+#else /* not __ASSEMBLER__ */
+
+
+/* Define a macro which expands into the inline wrapper code for a system
+   call.  */
+#undef INLINE_SYSCALL
+#define INLINE_SYSCALL(name, nr, args...)                               \
+  ({ unsigned int _inline_sys_result = INTERNAL_SYSCALL (name, , nr, args);     \
+     if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (_inline_sys_result, ), 0)) \
+       {                                                                \
+         __set_errno (INTERNAL_SYSCALL_ERRNO (_inline_sys_result, ));           \
+         _inline_sys_result = (unsigned int) -1;                                \
+       }                                                                \
+     (int) _inline_sys_result; })
+
+#undef INTERNAL_SYSCALL_DECL
+#define INTERNAL_SYSCALL_DECL(err) do { } while (0)
+
+#undef INTERNAL_SYSCALL_ERROR_P
+#define INTERNAL_SYSCALL_ERROR_P(val, err) \
+  ((unsigned int) (val) >= 0xffffff01u)
+
+#undef INTERNAL_SYSCALL_ERRNO
+#define INTERNAL_SYSCALL_ERRNO(val, err)        (-(val))
+
+
+#undef INTERNAL_SYSCALL_RAW
+#define INTERNAL_SYSCALL_RAW0(name, err, dummy...)                      \
+  ({unsigned int __sys_result;                                          \
+     {                                                                  \
+       register int _a1 __asm__ ("a0"), _nr __asm__ ("r7");             \
+       _nr = name;                                                      \
+       __asm__ __volatile__ ("trap  0 \n\t"                             \
+                             : "=r" (_a1)                               \
+                             : "r" (_nr)                                \
+                             : "memory");                               \
+               __sys_result = _a1;                                      \
+     }                                                                  \
+     (int) __sys_result; })
+
+#define INTERNAL_SYSCALL_RAW1(name, err, arg1)                          \
+  ({unsigned int __sys_result;                                          \
+    register int _tmp_arg1 = (int)(arg1);                               \
+     {                                                                  \
+       register int _a1 __asm__ ("a0"), _nr __asm__ ("r7");             \
+       _a1 = _tmp_arg1;                                                 \
+       _nr = name;                                                      \
+       __asm__ __volatile__ ("trap  0 \n\t"                             \
+                             : "=r" (_a1)                               \
+                             : "r" (_nr), "r" (_a1)                     \
+                             : "memory");                               \
+               __sys_result = _a1;                                      \
+     }                                                                  \
+     (int) __sys_result; })
+
+#define INTERNAL_SYSCALL_RAW2(name, err, arg1, arg2)                    \
+  ({unsigned int __sys_result;                                          \
+    register int _tmp_arg1 = (int)(arg1), _tmp_arg2 = (int)(arg2);      \
+     {                                                                  \
+       register int _nr __asm__ ("r7");                                 \
+       register int _a1 __asm__ ("a0"), _a2 __asm__ ("a1");             \
+       _a1 = _tmp_arg1, _a2 = _tmp_arg2;                                \
+       _nr = name;                                                      \
+       __asm__ __volatile__ ("trap  0 \n\t"                             \
+                             : "=r" (_a1)                               \
+                             : "r" (_nr), "r" (_a1), "r" (_a2)          \
+                             : "memory");                               \
+               __sys_result = _a1;                                      \
+     }                                                                  \
+     (int) __sys_result; })
+
+#define INTERNAL_SYSCALL_RAW3(name, err, arg1, arg2, arg3)              \
+  ({unsigned int __sys_result;                                          \
+    register int _tmp_arg1 = (int)(arg1), _tmp_arg2 = (int)(arg2);      \
+    register int _tmp_arg3 = (int)(arg3);                               \
+     {                                                                  \
+       register int _nr __asm__ ("r7");                                 \
+       register int _a1 __asm__ ("a0"), _a2 __asm__ ("a1");             \
+       register int _a3 __asm__ ("a2");                                 \
+       _a1 = _tmp_arg1;                                                 \
+       _a2 = _tmp_arg2;                                                 \
+       _a3 = _tmp_arg3;                                                 \
+       _nr = name;                                                      \
+       __asm__ __volatile__ ("trap  0 \n\t"                             \
+                             : "=r" (_a1)                               \
+                             : "r" (_nr), "r" (_a1), "r" (_a2),         \
+                               "r" (_a3)                                \
+                             : "memory");                               \
+               __sys_result = _a1;                                      \
+     }                                                                  \
+     (int) __sys_result; })
+
+#define INTERNAL_SYSCALL_RAW4(name, err, arg1, arg2, arg3, arg4)        \
+  ({unsigned int __sys_result;                                          \
+    register int _tmp_arg1 = (int)(arg1), _tmp_arg2 = (int)(arg2);      \
+    register int _tmp_arg3 = (int)(arg3), _tmp_arg4 = (int)(arg4);      \
+     {                                                                  \
+       register int _nr __asm__ ("r7");                                 \
+       register int _a1 __asm__ ("a0"), _a2 __asm__ ("a1");             \
+       register int _a3 __asm__ ("a2"), _a4 __asm__ ("a3");             \
+       _a1 = _tmp_arg1, _a2 = _tmp_arg2, _a3 = _tmp_arg3;               \
+       _a4 = _tmp_arg4;                                                 \
+       _nr = name;                                                      \
+       __asm__ __volatile__ ("trap  0 \n\t"                             \
+                             : "=r" (_a1)                               \
+                             : "r" (_nr), "r" (_a1), "r" (_a2),         \
+                               "r" (_a3), "r" (_a4)                     \
+                             : "memory");                               \
+               __sys_result = _a1;                                      \
+     }                                                                  \
+     (int) __sys_result; })
+
+#define INTERNAL_SYSCALL_RAW5(name, err, arg1, arg2, arg3, arg4,        \
+                              arg5)                                     \
+  ({unsigned int __sys_result;                                          \
+    register int _tmp_arg1 = (int)(arg1), _tmp_arg2 = (int)(arg2);      \
+    register int _tmp_arg3 = (int)(arg3), _tmp_arg4 = (int)(arg4);      \
+    register int _tmp_arg5 = (int)(arg5);                               \
+     {                                                                  \
+       register int _nr __asm__ ("r7");                                 \
+       register int _a1 __asm__ ("a0"), _a2 __asm__ ("a1");             \
+       register int _a3 __asm__ ("a2"), _a4 __asm__ ("a3");             \
+       register int _a5 __asm__ ("r4");                                 \
+       _a1 = _tmp_arg1, _a2 = _tmp_arg2, _a3 = _tmp_arg3;               \
+       _a4 = _tmp_arg4, _a5 = _tmp_arg5;                                \
+       _nr = name;                                                      \
+       __asm__ __volatile__ ("trap  0 \n\t"                             \
+                             : "=r" (_a1)                               \
+                             : "r" (_nr), "r" (_a1), "r" (_a2),         \
+                               "r" (_a3), "r" (_a4), "r" (_a5)          \
+                             : "memory");                               \
+               __sys_result = _a1;                                      \
+     }                                                                  \
+     (int) __sys_result; })
+
+#define INTERNAL_SYSCALL_RAW6(name, err, arg1, arg2, arg3, arg4,        \
+                              arg5, arg6)                               \
+  ({unsigned int __sys_result;                                          \
+    register int _tmp_arg1 = (int)(arg1), _tmp_arg2 = (int)(arg2);      \
+    register int _tmp_arg3 = (int)(arg3), _tmp_arg4 = (int)(arg4);      \
+    register int _tmp_arg5 = (int)(arg5), _tmp_arg6 = (int)(arg6);      \
+     {                                                                  \
+       register int _nr __asm__ ("r7");                                 \
+       register int _a1 __asm__ ("a0"), _a2 __asm__ ("a1");             \
+       register int _a3 __asm__ ("a2"), _a4 __asm__ ("a3");             \
+       register int _a5 __asm__ ("r4"), _a6 __asm__ ("r5");             \
+       _a1 = _tmp_arg1, _a2 = _tmp_arg2, _a3 = _tmp_arg3;               \
+       _a4 = _tmp_arg4, _a5 = _tmp_arg5, _a6 = _tmp_arg6;               \
+       _nr = name;                                                      \
+       __asm__ __volatile__ ("trap  0 \n\t"                             \
+                             : "=r" (_a1)                               \
+                             : "r" (_nr), "r" (_a1), "r" (_a2),         \
+                               "r" (_a3), "r" (_a4), "r" (_a5),         \
+                               "r" (_a6)                                \
+                             : "memory");                               \
+               __sys_result = _a1;                                      \
+     }                                                                  \
+     (int) __sys_result; })
+
+#define INTERNAL_SYSCALL_RAW7(name, err, arg1, arg2, arg3, arg4,        \
+                              arg5, arg6, arg7)                         \
+  ({unsigned int __sys_result;                                          \
+    register int _tmp_arg1 = (int)(arg1), _tmp_arg2 = (int)(arg2);      \
+    register int _tmp_arg3 = (int)(arg3), _tmp_arg4 = (int)(arg4);      \
+    register int _tmp_arg5 = (int)(arg5), _tmp_arg6 = (int)(arg6);      \
+    register int _tmp_arg7 = (int)(arg7);                               \
+     {                                                                  \
+       register int _nr __asm__ ("r7");                                 \
+       register int _a1 __asm__ ("a0"), _a2 __asm__ ("a1");             \
+       register int _a3 __asm__ ("a2"), _a4 __asm__ ("a3");             \
+       register int _a5 __asm__ ("r4"), _a6 __asm__ ("r5");             \
+       register int _a7 __asm__ ("r6");                                 \
+       _a1 = _tmp_arg1, _a2 = _tmp_arg2, _a3 = _tmp_arg3;               \
+       _a4 = _tmp_arg4, _a5 = _tmp_arg5, _a6 = _tmp_arg6;               \
+       _a7 = _tmp_arg7;                                                 \
+       _nr = name;                                                      \
+       __asm__ __volatile__ ("trap  0 \n\t"                             \
+                             : "=r" (_a1)                               \
+                             : "r" (_nr), "r" (_a1), "r" (_a2),         \
+                               "r" (_a3), "r" (_a4), "r" (_a5),         \
+                               "r" (_a6), "r" (_a7)                     \
+                             : "memory");                               \
+               __sys_result = _a1;                                      \
+     }                                                                  \
+     (int) __sys_result; })
+
+#undef INTERNAL_SYSCALL
+#define INTERNAL_SYSCALL(name, err, nr, args...)                \
+        INTERNAL_SYSCALL_RAW##nr(SYS_ify(name), err, args)
+
+#undef INTERNAL_SYSCALL_NCS
+#define INTERNAL_SYSCALL_NCS(number, err, nr, args...)          \
+  INTERNAL_SYSCALL_RAW##nr (number, err, args)
+
+#endif	/* __ASSEMBLER__ */
+
+/* Pointer mangling support.  */
+#if (IS_IN (rtld) || \
+     (!defined SHARED && (IS_IN (libc) || IS_IN (libpthread))))
+# ifdef __ASSEMBLER__
+#  define PTR_MANGLE(dst, src, guard)  \
+  grs   t0, 1f;					\
+1:						\
+  lrw   guard, 1b@GOTPC;			\
+  addu  t0, guard;                              \
+  lrw   guard, __pointer_chk_guard_local@GOT;	\
+  ldr.w guard, (t0, guard << 0);		\
+  ldw   guard, (guard, 0);                      \
+  xor   dst, src, guard;
+#  define PTR_DEMANGLE(dst, src, guard) PTR_MANGLE (dst, src, guard)
+#  define PTR_MANGLE2(dst, src, guard) \
+  xor   dst, src, guard
+#  define PTR_DEMANGLE2(dst, src, guard) PTR_MANGLE2 (dst, src, guard)
+# else
+extern uintptr_t __pointer_chk_guard_local;
+#  define PTR_MANGLE(var) \
+  (var) = (__typeof (var)) ((uintptr_t) (var) ^ __pointer_chk_guard_local)
+#  define PTR_DEMANGLE(var)     PTR_MANGLE (var)
+# endif
+#else
+# ifdef __ASSEMBLER__
+#  define PTR_MANGLE(dst, src, guard)		\
+  grs   t0, 1f;		                	\
+1:                                       	\
+  lrw   guard, 1b@GOTPC;                  	\
+  addu  t0, guard;				\
+  lrw	guard, __pointer_chk_guard@GOT;		\
+  ldr.w guard, (t0, guard << 0);		\
+  ldw   guard, (guard, 0);                      \
+  xor	dst, src, guard;
+#  define PTR_DEMANGLE(dst, src, guard) PTR_MANGLE (dst, src, guard)
+#  define PTR_MANGLE2(dst, src, guard) \
+  xor	dst, src, guard
+#  define PTR_DEMANGLE2(dst, src, guard) PTR_MANGLE2 (dst, src, guard)
+# else
+extern uintptr_t __pointer_chk_guard;
+#  define PTR_MANGLE(var) \
+  (var) = (__typeof (var)) ((uintptr_t) (var) ^ __pointer_chk_guard)
+#  define PTR_DEMANGLE(var)     PTR_MANGLE (var)
+# endif
+#endif
+
+#endif /* linux/csky/sysdep.h */
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [RFC PATCH v3 08/12] C-SKY: ABI Lists
  2018-06-29  7:58 [RFC PATCH v3 00/12] port C-SKY to glibc Mao Han
                   ` (6 preceding siblings ...)
  2018-06-29  7:58 ` [RFC PATCH v3 07/12] C-SKY: Linux ABI Mao Han
@ 2018-06-29  7:58 ` Mao Han
  2018-06-29  7:58 ` [RFC PATCH v3 09/12] C-SKY: Linux Startup and Dynamic Loading Code Mao Han
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 22+ messages in thread
From: Mao Han @ 2018-06-29  7:58 UTC (permalink / raw
  To: libc-alpha; +Cc: Mao Han, c-sky_gcc_upstream, gnu-csky

---
 sysdeps/unix/sysv/linux/csky/ld.abilist            |    9 +
 .../unix/sysv/linux/csky/libBrokenLocale.abilist   |    1 +
 sysdeps/unix/sysv/linux/csky/libanl.abilist        |    4 +
 sysdeps/unix/sysv/linux/csky/libc.abilist          | 2079 ++++++++++++++++++++
 sysdeps/unix/sysv/linux/csky/libcrypt.abilist      |    7 +
 sysdeps/unix/sysv/linux/csky/libdl.abilist         |    9 +
 sysdeps/unix/sysv/linux/csky/libm.abilist          |  753 +++++++
 sysdeps/unix/sysv/linux/csky/libnsl.abilist        |  120 ++
 sysdeps/unix/sysv/linux/csky/libpthread.abilist    |  216 ++
 sysdeps/unix/sysv/linux/csky/libresolv.abilist     |   79 +
 sysdeps/unix/sysv/linux/csky/librt.abilist         |   35 +
 sysdeps/unix/sysv/linux/csky/libthread_db.abilist  |   40 +
 sysdeps/unix/sysv/linux/csky/libutil.abilist       |    6 +
 13 files changed, 3358 insertions(+)
 create mode 100644 sysdeps/unix/sysv/linux/csky/ld.abilist
 create mode 100644 sysdeps/unix/sysv/linux/csky/libBrokenLocale.abilist
 create mode 100644 sysdeps/unix/sysv/linux/csky/libanl.abilist
 create mode 100644 sysdeps/unix/sysv/linux/csky/libc.abilist
 create mode 100644 sysdeps/unix/sysv/linux/csky/libcrypt.abilist
 create mode 100644 sysdeps/unix/sysv/linux/csky/libdl.abilist
 create mode 100644 sysdeps/unix/sysv/linux/csky/libm.abilist
 create mode 100644 sysdeps/unix/sysv/linux/csky/libnsl.abilist
 create mode 100644 sysdeps/unix/sysv/linux/csky/libpthread.abilist
 create mode 100644 sysdeps/unix/sysv/linux/csky/libresolv.abilist
 create mode 100644 sysdeps/unix/sysv/linux/csky/librt.abilist
 create mode 100644 sysdeps/unix/sysv/linux/csky/libthread_db.abilist
 create mode 100644 sysdeps/unix/sysv/linux/csky/libutil.abilist

diff --git a/sysdeps/unix/sysv/linux/csky/ld.abilist b/sysdeps/unix/sysv/linux/csky/ld.abilist
new file mode 100644
index 0000000..e97b573
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/csky/ld.abilist
@@ -0,0 +1,9 @@
+GLIBC_2.28 __libc_stack_end D 0x4
+GLIBC_2.28 __stack_chk_guard D 0x4
+GLIBC_2.28 __tls_get_addr F
+GLIBC_2.28 _dl_mcount F
+GLIBC_2.28 _r_debug D 0x14
+GLIBC_2.28 calloc F
+GLIBC_2.28 free F
+GLIBC_2.28 malloc F
+GLIBC_2.28 realloc F
diff --git a/sysdeps/unix/sysv/linux/csky/libBrokenLocale.abilist b/sysdeps/unix/sysv/linux/csky/libBrokenLocale.abilist
new file mode 100644
index 0000000..5e86ee9
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/csky/libBrokenLocale.abilist
@@ -0,0 +1 @@
+GLIBC_2.28 __ctype_get_mb_cur_max F
diff --git a/sysdeps/unix/sysv/linux/csky/libanl.abilist b/sysdeps/unix/sysv/linux/csky/libanl.abilist
new file mode 100644
index 0000000..5e0b311
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/csky/libanl.abilist
@@ -0,0 +1,4 @@
+GLIBC_2.28 gai_cancel F
+GLIBC_2.28 gai_error F
+GLIBC_2.28 gai_suspend F
+GLIBC_2.28 getaddrinfo_a F
diff --git a/sysdeps/unix/sysv/linux/csky/libc.abilist b/sysdeps/unix/sysv/linux/csky/libc.abilist
new file mode 100644
index 0000000..58bab98
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/csky/libc.abilist
@@ -0,0 +1,2079 @@
+GLIBC_2.28 _Exit F
+GLIBC_2.28 _IO_2_1_stderr_ D 0x98
+GLIBC_2.28 _IO_2_1_stdin_ D 0x98
+GLIBC_2.28 _IO_2_1_stdout_ D 0x98
+GLIBC_2.28 _IO_adjust_column F
+GLIBC_2.28 _IO_adjust_wcolumn F
+GLIBC_2.28 _IO_default_doallocate F
+GLIBC_2.28 _IO_default_finish F
+GLIBC_2.28 _IO_default_pbackfail F
+GLIBC_2.28 _IO_default_uflow F
+GLIBC_2.28 _IO_default_xsgetn F
+GLIBC_2.28 _IO_default_xsputn F
+GLIBC_2.28 _IO_do_write F
+GLIBC_2.28 _IO_doallocbuf F
+GLIBC_2.28 _IO_fclose F
+GLIBC_2.28 _IO_fdopen F
+GLIBC_2.28 _IO_feof F
+GLIBC_2.28 _IO_ferror F
+GLIBC_2.28 _IO_fflush F
+GLIBC_2.28 _IO_fgetpos F
+GLIBC_2.28 _IO_fgetpos64 F
+GLIBC_2.28 _IO_fgets F
+GLIBC_2.28 _IO_file_attach F
+GLIBC_2.28 _IO_file_close F
+GLIBC_2.28 _IO_file_close_it F
+GLIBC_2.28 _IO_file_doallocate F
+GLIBC_2.28 _IO_file_finish F
+GLIBC_2.28 _IO_file_fopen F
+GLIBC_2.28 _IO_file_init F
+GLIBC_2.28 _IO_file_jumps D 0x54
+GLIBC_2.28 _IO_file_open F
+GLIBC_2.28 _IO_file_overflow F
+GLIBC_2.28 _IO_file_read F
+GLIBC_2.28 _IO_file_seek F
+GLIBC_2.28 _IO_file_seekoff F
+GLIBC_2.28 _IO_file_setbuf F
+GLIBC_2.28 _IO_file_stat F
+GLIBC_2.28 _IO_file_sync F
+GLIBC_2.28 _IO_file_underflow F
+GLIBC_2.28 _IO_file_write F
+GLIBC_2.28 _IO_file_xsputn F
+GLIBC_2.28 _IO_flockfile F
+GLIBC_2.28 _IO_flush_all F
+GLIBC_2.28 _IO_flush_all_linebuffered F
+GLIBC_2.28 _IO_fopen F
+GLIBC_2.28 _IO_fprintf F
+GLIBC_2.28 _IO_fputs F
+GLIBC_2.28 _IO_fread F
+GLIBC_2.28 _IO_free_backup_area F
+GLIBC_2.28 _IO_free_wbackup_area F
+GLIBC_2.28 _IO_fsetpos F
+GLIBC_2.28 _IO_fsetpos64 F
+GLIBC_2.28 _IO_ftell F
+GLIBC_2.28 _IO_ftrylockfile F
+GLIBC_2.28 _IO_funlockfile F
+GLIBC_2.28 _IO_fwrite F
+GLIBC_2.28 _IO_getc F
+GLIBC_2.28 _IO_getline F
+GLIBC_2.28 _IO_getline_info F
+GLIBC_2.28 _IO_gets F
+GLIBC_2.28 _IO_init F
+GLIBC_2.28 _IO_init_marker F
+GLIBC_2.28 _IO_init_wmarker F
+GLIBC_2.28 _IO_iter_begin F
+GLIBC_2.28 _IO_iter_end F
+GLIBC_2.28 _IO_iter_file F
+GLIBC_2.28 _IO_iter_next F
+GLIBC_2.28 _IO_least_wmarker F
+GLIBC_2.28 _IO_link_in F
+GLIBC_2.28 _IO_list_all D 0x4
+GLIBC_2.28 _IO_list_lock F
+GLIBC_2.28 _IO_list_resetlock F
+GLIBC_2.28 _IO_list_unlock F
+GLIBC_2.28 _IO_marker_delta F
+GLIBC_2.28 _IO_marker_difference F
+GLIBC_2.28 _IO_padn F
+GLIBC_2.28 _IO_peekc_locked F
+GLIBC_2.28 _IO_popen F
+GLIBC_2.28 _IO_printf F
+GLIBC_2.28 _IO_proc_close F
+GLIBC_2.28 _IO_proc_open F
+GLIBC_2.28 _IO_putc F
+GLIBC_2.28 _IO_puts F
+GLIBC_2.28 _IO_remove_marker F
+GLIBC_2.28 _IO_seekmark F
+GLIBC_2.28 _IO_seekoff F
+GLIBC_2.28 _IO_seekpos F
+GLIBC_2.28 _IO_seekwmark F
+GLIBC_2.28 _IO_setb F
+GLIBC_2.28 _IO_setbuffer F
+GLIBC_2.28 _IO_setvbuf F
+GLIBC_2.28 _IO_sgetn F
+GLIBC_2.28 _IO_sprintf F
+GLIBC_2.28 _IO_sputbackc F
+GLIBC_2.28 _IO_sputbackwc F
+GLIBC_2.28 _IO_sscanf F
+GLIBC_2.28 _IO_str_init_readonly F
+GLIBC_2.28 _IO_str_init_static F
+GLIBC_2.28 _IO_str_overflow F
+GLIBC_2.28 _IO_str_pbackfail F
+GLIBC_2.28 _IO_str_seekoff F
+GLIBC_2.28 _IO_str_underflow F
+GLIBC_2.28 _IO_sungetc F
+GLIBC_2.28 _IO_sungetwc F
+GLIBC_2.28 _IO_switch_to_get_mode F
+GLIBC_2.28 _IO_switch_to_main_wget_area F
+GLIBC_2.28 _IO_switch_to_wbackup_area F
+GLIBC_2.28 _IO_switch_to_wget_mode F
+GLIBC_2.28 _IO_un_link F
+GLIBC_2.28 _IO_ungetc F
+GLIBC_2.28 _IO_unsave_markers F
+GLIBC_2.28 _IO_unsave_wmarkers F
+GLIBC_2.28 _IO_vfprintf F
+GLIBC_2.28 _IO_vfscanf F
+GLIBC_2.28 _IO_vsprintf F
+GLIBC_2.28 _IO_wdefault_doallocate F
+GLIBC_2.28 _IO_wdefault_finish F
+GLIBC_2.28 _IO_wdefault_pbackfail F
+GLIBC_2.28 _IO_wdefault_uflow F
+GLIBC_2.28 _IO_wdefault_xsgetn F
+GLIBC_2.28 _IO_wdefault_xsputn F
+GLIBC_2.28 _IO_wdo_write F
+GLIBC_2.28 _IO_wdoallocbuf F
+GLIBC_2.28 _IO_wfile_jumps D 0x54
+GLIBC_2.28 _IO_wfile_overflow F
+GLIBC_2.28 _IO_wfile_seekoff F
+GLIBC_2.28 _IO_wfile_sync F
+GLIBC_2.28 _IO_wfile_underflow F
+GLIBC_2.28 _IO_wfile_xsputn F
+GLIBC_2.28 _IO_wmarker_delta F
+GLIBC_2.28 _IO_wsetb F
+GLIBC_2.28 ___brk_addr D 0x4
+GLIBC_2.28 __adjtimex F
+GLIBC_2.28 __after_morecore_hook D 0x4
+GLIBC_2.28 __argz_count F
+GLIBC_2.28 __argz_next F
+GLIBC_2.28 __argz_stringify F
+GLIBC_2.28 __asprintf F
+GLIBC_2.28 __asprintf_chk F
+GLIBC_2.28 __assert F
+GLIBC_2.28 __assert_fail F
+GLIBC_2.28 __assert_perror_fail F
+GLIBC_2.28 __backtrace F
+GLIBC_2.28 __backtrace_symbols F
+GLIBC_2.28 __backtrace_symbols_fd F
+GLIBC_2.28 __bsd_getpgrp F
+GLIBC_2.28 __bzero F
+GLIBC_2.28 __check_rhosts_file D 0x4
+GLIBC_2.28 __chk_fail F
+GLIBC_2.28 __clone F
+GLIBC_2.28 __close F
+GLIBC_2.28 __cmsg_nxthdr F
+GLIBC_2.28 __confstr_chk F
+GLIBC_2.28 __connect F
+GLIBC_2.28 __ctype_b_loc F
+GLIBC_2.28 __ctype_get_mb_cur_max F
+GLIBC_2.28 __ctype_tolower_loc F
+GLIBC_2.28 __ctype_toupper_loc F
+GLIBC_2.28 __curbrk D 0x4
+GLIBC_2.28 __cxa_at_quick_exit F
+GLIBC_2.28 __cxa_atexit F
+GLIBC_2.28 __cxa_finalize F
+GLIBC_2.28 __cxa_thread_atexit_impl F
+GLIBC_2.28 __cyg_profile_func_enter F
+GLIBC_2.28 __cyg_profile_func_exit F
+GLIBC_2.28 __daylight D 0x4
+GLIBC_2.28 __dcgettext F
+GLIBC_2.28 __default_morecore F
+GLIBC_2.28 __dgettext F
+GLIBC_2.28 __dprintf_chk F
+GLIBC_2.28 __dup2 F
+GLIBC_2.28 __duplocale F
+GLIBC_2.28 __endmntent F
+GLIBC_2.28 __environ D 0x4
+GLIBC_2.28 __errno_location F
+GLIBC_2.28 __explicit_bzero_chk F
+GLIBC_2.28 __fbufsize F
+GLIBC_2.28 __fcntl F
+GLIBC_2.28 __fdelt_chk F
+GLIBC_2.28 __fdelt_warn F
+GLIBC_2.28 __ffs F
+GLIBC_2.28 __fgets_chk F
+GLIBC_2.28 __fgets_unlocked_chk F
+GLIBC_2.28 __fgetws_chk F
+GLIBC_2.28 __fgetws_unlocked_chk F
+GLIBC_2.28 __finite F
+GLIBC_2.28 __finitef F
+GLIBC_2.28 __flbf F
+GLIBC_2.28 __fork F
+GLIBC_2.28 __fpending F
+GLIBC_2.28 __fprintf_chk F
+GLIBC_2.28 __fpu_control D 0x4
+GLIBC_2.28 __fpurge F
+GLIBC_2.28 __fread_chk F
+GLIBC_2.28 __fread_unlocked_chk F
+GLIBC_2.28 __freadable F
+GLIBC_2.28 __freading F
+GLIBC_2.28 __free_hook D 0x4
+GLIBC_2.28 __freelocale F
+GLIBC_2.28 __fsetlocking F
+GLIBC_2.28 __fwprintf_chk F
+GLIBC_2.28 __fwritable F
+GLIBC_2.28 __fwriting F
+GLIBC_2.28 __fxstat F
+GLIBC_2.28 __fxstat64 F
+GLIBC_2.28 __fxstatat F
+GLIBC_2.28 __fxstatat64 F
+GLIBC_2.28 __getauxval F
+GLIBC_2.28 __getcwd_chk F
+GLIBC_2.28 __getdelim F
+GLIBC_2.28 __getdomainname_chk F
+GLIBC_2.28 __getgroups_chk F
+GLIBC_2.28 __gethostname_chk F
+GLIBC_2.28 __getlogin_r_chk F
+GLIBC_2.28 __getmntent_r F
+GLIBC_2.28 __getpagesize F
+GLIBC_2.28 __getpgid F
+GLIBC_2.28 __getpid F
+GLIBC_2.28 __gets_chk F
+GLIBC_2.28 __gettimeofday F
+GLIBC_2.28 __getwd_chk F
+GLIBC_2.28 __gmtime_r F
+GLIBC_2.28 __h_errno_location F
+GLIBC_2.28 __isalnum_l F
+GLIBC_2.28 __isalpha_l F
+GLIBC_2.28 __isascii_l F
+GLIBC_2.28 __isblank_l F
+GLIBC_2.28 __iscntrl_l F
+GLIBC_2.28 __isctype F
+GLIBC_2.28 __isdigit_l F
+GLIBC_2.28 __isgraph_l F
+GLIBC_2.28 __isinf F
+GLIBC_2.28 __isinff F
+GLIBC_2.28 __islower_l F
+GLIBC_2.28 __isnan F
+GLIBC_2.28 __isnanf F
+GLIBC_2.28 __isoc99_fscanf F
+GLIBC_2.28 __isoc99_fwscanf F
+GLIBC_2.28 __isoc99_scanf F
+GLIBC_2.28 __isoc99_sscanf F
+GLIBC_2.28 __isoc99_swscanf F
+GLIBC_2.28 __isoc99_vfscanf F
+GLIBC_2.28 __isoc99_vfwscanf F
+GLIBC_2.28 __isoc99_vscanf F
+GLIBC_2.28 __isoc99_vsscanf F
+GLIBC_2.28 __isoc99_vswscanf F
+GLIBC_2.28 __isoc99_vwscanf F
+GLIBC_2.28 __isoc99_wscanf F
+GLIBC_2.28 __isprint_l F
+GLIBC_2.28 __ispunct_l F
+GLIBC_2.28 __isspace_l F
+GLIBC_2.28 __isupper_l F
+GLIBC_2.28 __iswalnum_l F
+GLIBC_2.28 __iswalpha_l F
+GLIBC_2.28 __iswblank_l F
+GLIBC_2.28 __iswcntrl_l F
+GLIBC_2.28 __iswctype F
+GLIBC_2.28 __iswctype_l F
+GLIBC_2.28 __iswdigit_l F
+GLIBC_2.28 __iswgraph_l F
+GLIBC_2.28 __iswlower_l F
+GLIBC_2.28 __iswprint_l F
+GLIBC_2.28 __iswpunct_l F
+GLIBC_2.28 __iswspace_l F
+GLIBC_2.28 __iswupper_l F
+GLIBC_2.28 __iswxdigit_l F
+GLIBC_2.28 __isxdigit_l F
+GLIBC_2.28 __ivaliduser F
+GLIBC_2.28 __key_decryptsession_pk_LOCAL D 0x4
+GLIBC_2.28 __key_encryptsession_pk_LOCAL D 0x4
+GLIBC_2.28 __key_gendes_LOCAL D 0x4
+GLIBC_2.28 __libc_allocate_rtsig F
+GLIBC_2.28 __libc_calloc F
+GLIBC_2.28 __libc_current_sigrtmax F
+GLIBC_2.28 __libc_current_sigrtmin F
+GLIBC_2.28 __libc_free F
+GLIBC_2.28 __libc_freeres F
+GLIBC_2.28 __libc_init_first F
+GLIBC_2.28 __libc_mallinfo F
+GLIBC_2.28 __libc_malloc F
+GLIBC_2.28 __libc_mallopt F
+GLIBC_2.28 __libc_memalign F
+GLIBC_2.28 __libc_pvalloc F
+GLIBC_2.28 __libc_realloc F
+GLIBC_2.28 __libc_sa_len F
+GLIBC_2.28 __libc_start_main F
+GLIBC_2.28 __libc_valloc F
+GLIBC_2.28 __longjmp_chk F
+GLIBC_2.28 __lseek F
+GLIBC_2.28 __lxstat F
+GLIBC_2.28 __lxstat64 F
+GLIBC_2.28 __malloc_hook D 0x4
+GLIBC_2.28 __mbrlen F
+GLIBC_2.28 __mbrtowc F
+GLIBC_2.28 __mbsnrtowcs_chk F
+GLIBC_2.28 __mbsrtowcs_chk F
+GLIBC_2.28 __mbstowcs_chk F
+GLIBC_2.28 __memalign_hook D 0x4
+GLIBC_2.28 __memcpy_chk F
+GLIBC_2.28 __memmove_chk F
+GLIBC_2.28 __mempcpy F
+GLIBC_2.28 __mempcpy_chk F
+GLIBC_2.28 __memset_chk F
+GLIBC_2.28 __monstartup F
+GLIBC_2.28 __morecore D 0x4
+GLIBC_2.28 __nanosleep F
+GLIBC_2.28 __newlocale F
+GLIBC_2.28 __nl_langinfo_l F
+GLIBC_2.28 __nss_configure_lookup F
+GLIBC_2.28 __nss_database_lookup F
+GLIBC_2.28 __nss_hostname_digits_dots F
+GLIBC_2.28 __nss_next F
+GLIBC_2.28 __obstack_printf_chk F
+GLIBC_2.28 __obstack_vprintf_chk F
+GLIBC_2.28 __open F
+GLIBC_2.28 __open64 F
+GLIBC_2.28 __open64_2 F
+GLIBC_2.28 __open_2 F
+GLIBC_2.28 __openat64_2 F
+GLIBC_2.28 __openat_2 F
+GLIBC_2.28 __overflow F
+GLIBC_2.28 __pipe F
+GLIBC_2.28 __poll F
+GLIBC_2.28 __poll_chk F
+GLIBC_2.28 __posix_getopt F
+GLIBC_2.28 __ppoll_chk F
+GLIBC_2.28 __pread64 F
+GLIBC_2.28 __pread64_chk F
+GLIBC_2.28 __pread_chk F
+GLIBC_2.28 __printf_chk F
+GLIBC_2.28 __printf_fp F
+GLIBC_2.28 __profile_frequency F
+GLIBC_2.28 __progname D 0x4
+GLIBC_2.28 __progname_full D 0x4
+GLIBC_2.28 __ptsname_r_chk F
+GLIBC_2.28 __pwrite64 F
+GLIBC_2.28 __rawmemchr F
+GLIBC_2.28 __rcmd_errstr D 0x4
+GLIBC_2.28 __read F
+GLIBC_2.28 __read_chk F
+GLIBC_2.28 __readlink_chk F
+GLIBC_2.28 __readlinkat_chk F
+GLIBC_2.28 __realloc_hook D 0x4
+GLIBC_2.28 __realpath_chk F
+GLIBC_2.28 __recv_chk F
+GLIBC_2.28 __recvfrom_chk F
+GLIBC_2.28 __register_atfork F
+GLIBC_2.28 __res_init F
+GLIBC_2.28 __res_nclose F
+GLIBC_2.28 __res_ninit F
+GLIBC_2.28 __res_randomid F
+GLIBC_2.28 __res_state F
+GLIBC_2.28 __rpc_thread_createerr F
+GLIBC_2.28 __rpc_thread_svc_fdset F
+GLIBC_2.28 __rpc_thread_svc_max_pollfd F
+GLIBC_2.28 __rpc_thread_svc_pollfd F
+GLIBC_2.28 __sbrk F
+GLIBC_2.28 __sched_cpualloc F
+GLIBC_2.28 __sched_cpucount F
+GLIBC_2.28 __sched_cpufree F
+GLIBC_2.28 __sched_get_priority_max F
+GLIBC_2.28 __sched_get_priority_min F
+GLIBC_2.28 __sched_getparam F
+GLIBC_2.28 __sched_getscheduler F
+GLIBC_2.28 __sched_setscheduler F
+GLIBC_2.28 __sched_yield F
+GLIBC_2.28 __select F
+GLIBC_2.28 __send F
+GLIBC_2.28 __setmntent F
+GLIBC_2.28 __setpgid F
+GLIBC_2.28 __sigaction F
+GLIBC_2.28 __signbit F
+GLIBC_2.28 __signbitf F
+GLIBC_2.28 __sigpause F
+GLIBC_2.28 __sigsetjmp F
+GLIBC_2.28 __sigsuspend F
+GLIBC_2.28 __snprintf_chk F
+GLIBC_2.28 __sprintf_chk F
+GLIBC_2.28 __stack_chk_fail F
+GLIBC_2.28 __statfs F
+GLIBC_2.28 __stpcpy F
+GLIBC_2.28 __stpcpy_chk F
+GLIBC_2.28 __stpncpy F
+GLIBC_2.28 __stpncpy_chk F
+GLIBC_2.28 __strcasecmp F
+GLIBC_2.28 __strcasecmp_l F
+GLIBC_2.28 __strcasestr F
+GLIBC_2.28 __strcat_chk F
+GLIBC_2.28 __strcoll_l F
+GLIBC_2.28 __strcpy_chk F
+GLIBC_2.28 __strdup F
+GLIBC_2.28 __strerror_r F
+GLIBC_2.28 __strfmon_l F
+GLIBC_2.28 __strftime_l F
+GLIBC_2.28 __strncasecmp_l F
+GLIBC_2.28 __strncat_chk F
+GLIBC_2.28 __strncpy_chk F
+GLIBC_2.28 __strndup F
+GLIBC_2.28 __strsep_g F
+GLIBC_2.28 __strtod_internal F
+GLIBC_2.28 __strtod_l F
+GLIBC_2.28 __strtof_internal F
+GLIBC_2.28 __strtof_l F
+GLIBC_2.28 __strtok_r F
+GLIBC_2.28 __strtol_internal F
+GLIBC_2.28 __strtol_l F
+GLIBC_2.28 __strtold_internal F
+GLIBC_2.28 __strtold_l F
+GLIBC_2.28 __strtoll_internal F
+GLIBC_2.28 __strtoll_l F
+GLIBC_2.28 __strtoul_internal F
+GLIBC_2.28 __strtoul_l F
+GLIBC_2.28 __strtoull_internal F
+GLIBC_2.28 __strtoull_l F
+GLIBC_2.28 __strverscmp F
+GLIBC_2.28 __strxfrm_l F
+GLIBC_2.28 __swprintf_chk F
+GLIBC_2.28 __sysconf F
+GLIBC_2.28 __syslog_chk F
+GLIBC_2.28 __sysv_signal F
+GLIBC_2.28 __timezone D 0x4
+GLIBC_2.28 __toascii_l F
+GLIBC_2.28 __tolower_l F
+GLIBC_2.28 __toupper_l F
+GLIBC_2.28 __towctrans F
+GLIBC_2.28 __towctrans_l F
+GLIBC_2.28 __towlower_l F
+GLIBC_2.28 __towupper_l F
+GLIBC_2.28 __ttyname_r_chk F
+GLIBC_2.28 __tzname D 0x8
+GLIBC_2.28 __uflow F
+GLIBC_2.28 __underflow F
+GLIBC_2.28 __uselocale F
+GLIBC_2.28 __vasprintf_chk F
+GLIBC_2.28 __vdprintf_chk F
+GLIBC_2.28 __vfork F
+GLIBC_2.28 __vfprintf_chk F
+GLIBC_2.28 __vfscanf F
+GLIBC_2.28 __vfwprintf_chk F
+GLIBC_2.28 __vprintf_chk F
+GLIBC_2.28 __vsnprintf F
+GLIBC_2.28 __vsnprintf_chk F
+GLIBC_2.28 __vsprintf_chk F
+GLIBC_2.28 __vsscanf F
+GLIBC_2.28 __vswprintf_chk F
+GLIBC_2.28 __vsyslog_chk F
+GLIBC_2.28 __vwprintf_chk F
+GLIBC_2.28 __wait F
+GLIBC_2.28 __waitpid F
+GLIBC_2.28 __wcpcpy_chk F
+GLIBC_2.28 __wcpncpy_chk F
+GLIBC_2.28 __wcrtomb_chk F
+GLIBC_2.28 __wcscasecmp_l F
+GLIBC_2.28 __wcscat_chk F
+GLIBC_2.28 __wcscoll_l F
+GLIBC_2.28 __wcscpy_chk F
+GLIBC_2.28 __wcsftime_l F
+GLIBC_2.28 __wcsncasecmp_l F
+GLIBC_2.28 __wcsncat_chk F
+GLIBC_2.28 __wcsncpy_chk F
+GLIBC_2.28 __wcsnrtombs_chk F
+GLIBC_2.28 __wcsrtombs_chk F
+GLIBC_2.28 __wcstod_internal F
+GLIBC_2.28 __wcstod_l F
+GLIBC_2.28 __wcstof_internal F
+GLIBC_2.28 __wcstof_l F
+GLIBC_2.28 __wcstol_internal F
+GLIBC_2.28 __wcstol_l F
+GLIBC_2.28 __wcstold_internal F
+GLIBC_2.28 __wcstold_l F
+GLIBC_2.28 __wcstoll_internal F
+GLIBC_2.28 __wcstoll_l F
+GLIBC_2.28 __wcstombs_chk F
+GLIBC_2.28 __wcstoul_internal F
+GLIBC_2.28 __wcstoul_l F
+GLIBC_2.28 __wcstoull_internal F
+GLIBC_2.28 __wcstoull_l F
+GLIBC_2.28 __wcsxfrm_l F
+GLIBC_2.28 __wctomb_chk F
+GLIBC_2.28 __wctrans_l F
+GLIBC_2.28 __wctype_l F
+GLIBC_2.28 __wmemcpy_chk F
+GLIBC_2.28 __wmemmove_chk F
+GLIBC_2.28 __wmempcpy_chk F
+GLIBC_2.28 __wmemset_chk F
+GLIBC_2.28 __woverflow F
+GLIBC_2.28 __wprintf_chk F
+GLIBC_2.28 __write F
+GLIBC_2.28 __wuflow F
+GLIBC_2.28 __wunderflow F
+GLIBC_2.28 __xmknod F
+GLIBC_2.28 __xmknodat F
+GLIBC_2.28 __xpg_basename F
+GLIBC_2.28 __xpg_sigpause F
+GLIBC_2.28 __xpg_strerror_r F
+GLIBC_2.28 __xstat F
+GLIBC_2.28 __xstat64 F
+GLIBC_2.28 _authenticate F
+GLIBC_2.28 _dl_mcount_wrapper F
+GLIBC_2.28 _dl_mcount_wrapper_check F
+GLIBC_2.28 _environ D 0x4
+GLIBC_2.28 _exit F
+GLIBC_2.28 _flushlbf F
+GLIBC_2.28 _libc_intl_domainname D 0x5
+GLIBC_2.28 _longjmp F
+GLIBC_2.28 _mcleanup F
+GLIBC_2.28 _mcount F
+GLIBC_2.28 _nl_default_dirname D 0x12
+GLIBC_2.28 _nl_domain_bindings D 0x4
+GLIBC_2.28 _nl_msg_cat_cntr D 0x4
+GLIBC_2.28 _null_auth D 0xc
+GLIBC_2.28 _obstack_allocated_p F
+GLIBC_2.28 _obstack_begin F
+GLIBC_2.28 _obstack_begin_1 F
+GLIBC_2.28 _obstack_free F
+GLIBC_2.28 _obstack_memory_used F
+GLIBC_2.28 _obstack_newchunk F
+GLIBC_2.28 _res D 0x200
+GLIBC_2.28 _res_hconf D 0x30
+GLIBC_2.28 _rpc_dtablesize F
+GLIBC_2.28 _seterr_reply F
+GLIBC_2.28 _setjmp F
+GLIBC_2.28 _sys_errlist D 0x21c
+GLIBC_2.28 _sys_nerr D 0x4
+GLIBC_2.28 _sys_siglist D 0x104
+GLIBC_2.28 _tolower F
+GLIBC_2.28 _toupper F
+GLIBC_2.28 a64l F
+GLIBC_2.28 abort F
+GLIBC_2.28 abs F
+GLIBC_2.28 accept F
+GLIBC_2.28 accept4 F
+GLIBC_2.28 access F
+GLIBC_2.28 acct F
+GLIBC_2.28 addmntent F
+GLIBC_2.28 addseverity F
+GLIBC_2.28 adjtime F
+GLIBC_2.28 adjtimex F
+GLIBC_2.28 alarm F
+GLIBC_2.28 aligned_alloc F
+GLIBC_2.28 alphasort F
+GLIBC_2.28 alphasort64 F
+GLIBC_2.28 argp_err_exit_status D 0x4
+GLIBC_2.28 argp_error F
+GLIBC_2.28 argp_failure F
+GLIBC_2.28 argp_help F
+GLIBC_2.28 argp_parse F
+GLIBC_2.28 argp_program_bug_address D 0x4
+GLIBC_2.28 argp_program_version D 0x4
+GLIBC_2.28 argp_program_version_hook D 0x4
+GLIBC_2.28 argp_state_help F
+GLIBC_2.28 argp_usage F
+GLIBC_2.28 argz_add F
+GLIBC_2.28 argz_add_sep F
+GLIBC_2.28 argz_append F
+GLIBC_2.28 argz_count F
+GLIBC_2.28 argz_create F
+GLIBC_2.28 argz_create_sep F
+GLIBC_2.28 argz_delete F
+GLIBC_2.28 argz_extract F
+GLIBC_2.28 argz_insert F
+GLIBC_2.28 argz_next F
+GLIBC_2.28 argz_replace F
+GLIBC_2.28 argz_stringify F
+GLIBC_2.28 asctime F
+GLIBC_2.28 asctime_r F
+GLIBC_2.28 asprintf F
+GLIBC_2.28 atof F
+GLIBC_2.28 atoi F
+GLIBC_2.28 atol F
+GLIBC_2.28 atoll F
+GLIBC_2.28 authdes_create F
+GLIBC_2.28 authdes_getucred F
+GLIBC_2.28 authdes_pk_create F
+GLIBC_2.28 authnone_create F
+GLIBC_2.28 authunix_create F
+GLIBC_2.28 authunix_create_default F
+GLIBC_2.28 backtrace F
+GLIBC_2.28 backtrace_symbols F
+GLIBC_2.28 backtrace_symbols_fd F
+GLIBC_2.28 basename F
+GLIBC_2.28 bcmp F
+GLIBC_2.28 bcopy F
+GLIBC_2.28 bind F
+GLIBC_2.28 bind_textdomain_codeset F
+GLIBC_2.28 bindresvport F
+GLIBC_2.28 bindtextdomain F
+GLIBC_2.28 brk F
+GLIBC_2.28 bsd_signal F
+GLIBC_2.28 bsearch F
+GLIBC_2.28 btowc F
+GLIBC_2.28 bzero F
+GLIBC_2.28 c16rtomb F
+GLIBC_2.28 c32rtomb F
+GLIBC_2.28 cacheflush F
+GLIBC_2.28 calloc F
+GLIBC_2.28 callrpc F
+GLIBC_2.28 canonicalize_file_name F
+GLIBC_2.28 capget F
+GLIBC_2.28 capset F
+GLIBC_2.28 catclose F
+GLIBC_2.28 catgets F
+GLIBC_2.28 catopen F
+GLIBC_2.28 cbc_crypt F
+GLIBC_2.28 cfgetispeed F
+GLIBC_2.28 cfgetospeed F
+GLIBC_2.28 cfmakeraw F
+GLIBC_2.28 cfsetispeed F
+GLIBC_2.28 cfsetospeed F
+GLIBC_2.28 cfsetspeed F
+GLIBC_2.28 chdir F
+GLIBC_2.28 chflags F
+GLIBC_2.28 chmod F
+GLIBC_2.28 chown F
+GLIBC_2.28 chroot F
+GLIBC_2.28 clearenv F
+GLIBC_2.28 clearerr F
+GLIBC_2.28 clearerr_unlocked F
+GLIBC_2.28 clnt_broadcast F
+GLIBC_2.28 clnt_create F
+GLIBC_2.28 clnt_pcreateerror F
+GLIBC_2.28 clnt_perrno F
+GLIBC_2.28 clnt_perror F
+GLIBC_2.28 clnt_spcreateerror F
+GLIBC_2.28 clnt_sperrno F
+GLIBC_2.28 clnt_sperror F
+GLIBC_2.28 clntraw_create F
+GLIBC_2.28 clnttcp_create F
+GLIBC_2.28 clntudp_bufcreate F
+GLIBC_2.28 clntudp_create F
+GLIBC_2.28 clntunix_create F
+GLIBC_2.28 clock F
+GLIBC_2.28 clock_adjtime F
+GLIBC_2.28 clock_getcpuclockid F
+GLIBC_2.28 clock_getres F
+GLIBC_2.28 clock_gettime F
+GLIBC_2.28 clock_nanosleep F
+GLIBC_2.28 clock_settime F
+GLIBC_2.28 clone F
+GLIBC_2.28 close F
+GLIBC_2.28 closedir F
+GLIBC_2.28 closelog F
+GLIBC_2.28 confstr F
+GLIBC_2.28 connect F
+GLIBC_2.28 copy_file_range F
+GLIBC_2.28 copysign F
+GLIBC_2.28 copysignf F
+GLIBC_2.28 copysignl F
+GLIBC_2.28 creat F
+GLIBC_2.28 creat64 F
+GLIBC_2.28 ctermid F
+GLIBC_2.28 ctime F
+GLIBC_2.28 ctime_r F
+GLIBC_2.28 cuserid F
+GLIBC_2.28 daemon F
+GLIBC_2.28 daylight D 0x4
+GLIBC_2.28 dcgettext F
+GLIBC_2.28 dcngettext F
+GLIBC_2.28 delete_module F
+GLIBC_2.28 des_setparity F
+GLIBC_2.28 dgettext F
+GLIBC_2.28 difftime F
+GLIBC_2.28 dirfd F
+GLIBC_2.28 dirname F
+GLIBC_2.28 div F
+GLIBC_2.28 dl_iterate_phdr F
+GLIBC_2.28 dngettext F
+GLIBC_2.28 dprintf F
+GLIBC_2.28 drand48 F
+GLIBC_2.28 drand48_r F
+GLIBC_2.28 dup F
+GLIBC_2.28 dup2 F
+GLIBC_2.28 dup3 F
+GLIBC_2.28 duplocale F
+GLIBC_2.28 dysize F
+GLIBC_2.28 eaccess F
+GLIBC_2.28 ecb_crypt F
+GLIBC_2.28 ecvt F
+GLIBC_2.28 ecvt_r F
+GLIBC_2.28 endaliasent F
+GLIBC_2.28 endfsent F
+GLIBC_2.28 endgrent F
+GLIBC_2.28 endhostent F
+GLIBC_2.28 endmntent F
+GLIBC_2.28 endnetent F
+GLIBC_2.28 endnetgrent F
+GLIBC_2.28 endprotoent F
+GLIBC_2.28 endpwent F
+GLIBC_2.28 endrpcent F
+GLIBC_2.28 endservent F
+GLIBC_2.28 endsgent F
+GLIBC_2.28 endspent F
+GLIBC_2.28 endttyent F
+GLIBC_2.28 endusershell F
+GLIBC_2.28 endutent F
+GLIBC_2.28 endutxent F
+GLIBC_2.28 environ D 0x4
+GLIBC_2.28 envz_add F
+GLIBC_2.28 envz_entry F
+GLIBC_2.28 envz_get F
+GLIBC_2.28 envz_merge F
+GLIBC_2.28 envz_remove F
+GLIBC_2.28 envz_strip F
+GLIBC_2.28 epoll_create F
+GLIBC_2.28 epoll_create1 F
+GLIBC_2.28 epoll_ctl F
+GLIBC_2.28 epoll_pwait F
+GLIBC_2.28 epoll_wait F
+GLIBC_2.28 erand48 F
+GLIBC_2.28 erand48_r F
+GLIBC_2.28 err F
+GLIBC_2.28 error F
+GLIBC_2.28 error_at_line F
+GLIBC_2.28 error_message_count D 0x4
+GLIBC_2.28 error_one_per_line D 0x4
+GLIBC_2.28 error_print_progname D 0x4
+GLIBC_2.28 errx F
+GLIBC_2.28 ether_aton F
+GLIBC_2.28 ether_aton_r F
+GLIBC_2.28 ether_hostton F
+GLIBC_2.28 ether_line F
+GLIBC_2.28 ether_ntoa F
+GLIBC_2.28 ether_ntoa_r F
+GLIBC_2.28 ether_ntohost F
+GLIBC_2.28 euidaccess F
+GLIBC_2.28 eventfd F
+GLIBC_2.28 eventfd_read F
+GLIBC_2.28 eventfd_write F
+GLIBC_2.28 execl F
+GLIBC_2.28 execle F
+GLIBC_2.28 execlp F
+GLIBC_2.28 execv F
+GLIBC_2.28 execve F
+GLIBC_2.28 execvp F
+GLIBC_2.28 execvpe F
+GLIBC_2.28 exit F
+GLIBC_2.28 explicit_bzero F
+GLIBC_2.28 faccessat F
+GLIBC_2.28 fallocate F
+GLIBC_2.28 fallocate64 F
+GLIBC_2.28 fanotify_init F
+GLIBC_2.28 fanotify_mark F
+GLIBC_2.28 fattach F
+GLIBC_2.28 fchdir F
+GLIBC_2.28 fchflags F
+GLIBC_2.28 fchmod F
+GLIBC_2.28 fchmodat F
+GLIBC_2.28 fchown F
+GLIBC_2.28 fchownat F
+GLIBC_2.28 fclose F
+GLIBC_2.28 fcloseall F
+GLIBC_2.28 fcntl F
+GLIBC_2.28 fcvt F
+GLIBC_2.28 fcvt_r F
+GLIBC_2.28 fdatasync F
+GLIBC_2.28 fdetach F
+GLIBC_2.28 fdopen F
+GLIBC_2.28 fdopendir F
+GLIBC_2.28 feof F
+GLIBC_2.28 feof_unlocked F
+GLIBC_2.28 ferror F
+GLIBC_2.28 ferror_unlocked F
+GLIBC_2.28 fexecve F
+GLIBC_2.28 fflush F
+GLIBC_2.28 fflush_unlocked F
+GLIBC_2.28 ffs F
+GLIBC_2.28 ffsl F
+GLIBC_2.28 ffsll F
+GLIBC_2.28 fgetc F
+GLIBC_2.28 fgetc_unlocked F
+GLIBC_2.28 fgetgrent F
+GLIBC_2.28 fgetgrent_r F
+GLIBC_2.28 fgetpos F
+GLIBC_2.28 fgetpos64 F
+GLIBC_2.28 fgetpwent F
+GLIBC_2.28 fgetpwent_r F
+GLIBC_2.28 fgets F
+GLIBC_2.28 fgets_unlocked F
+GLIBC_2.28 fgetsgent F
+GLIBC_2.28 fgetsgent_r F
+GLIBC_2.28 fgetspent F
+GLIBC_2.28 fgetspent_r F
+GLIBC_2.28 fgetwc F
+GLIBC_2.28 fgetwc_unlocked F
+GLIBC_2.28 fgetws F
+GLIBC_2.28 fgetws_unlocked F
+GLIBC_2.28 fgetxattr F
+GLIBC_2.28 fileno F
+GLIBC_2.28 fileno_unlocked F
+GLIBC_2.28 finite F
+GLIBC_2.28 finitef F
+GLIBC_2.28 finitel F
+GLIBC_2.28 flistxattr F
+GLIBC_2.28 flock F
+GLIBC_2.28 flockfile F
+GLIBC_2.28 fmemopen F
+GLIBC_2.28 fmtmsg F
+GLIBC_2.28 fnmatch F
+GLIBC_2.28 fopen F
+GLIBC_2.28 fopen64 F
+GLIBC_2.28 fopencookie F
+GLIBC_2.28 fork F
+GLIBC_2.28 fpathconf F
+GLIBC_2.28 fprintf F
+GLIBC_2.28 fputc F
+GLIBC_2.28 fputc_unlocked F
+GLIBC_2.28 fputs F
+GLIBC_2.28 fputs_unlocked F
+GLIBC_2.28 fputwc F
+GLIBC_2.28 fputwc_unlocked F
+GLIBC_2.28 fputws F
+GLIBC_2.28 fputws_unlocked F
+GLIBC_2.28 fread F
+GLIBC_2.28 fread_unlocked F
+GLIBC_2.28 free F
+GLIBC_2.28 freeaddrinfo F
+GLIBC_2.28 freeifaddrs F
+GLIBC_2.28 freelocale F
+GLIBC_2.28 fremovexattr F
+GLIBC_2.28 freopen F
+GLIBC_2.28 freopen64 F
+GLIBC_2.28 frexp F
+GLIBC_2.28 frexpf F
+GLIBC_2.28 frexpl F
+GLIBC_2.28 fscanf F
+GLIBC_2.28 fseek F
+GLIBC_2.28 fseeko F
+GLIBC_2.28 fseeko64 F
+GLIBC_2.28 fsetpos F
+GLIBC_2.28 fsetpos64 F
+GLIBC_2.28 fsetxattr F
+GLIBC_2.28 fstatfs F
+GLIBC_2.28 fstatfs64 F
+GLIBC_2.28 fstatvfs F
+GLIBC_2.28 fstatvfs64 F
+GLIBC_2.28 fsync F
+GLIBC_2.28 ftell F
+GLIBC_2.28 ftello F
+GLIBC_2.28 ftello64 F
+GLIBC_2.28 ftime F
+GLIBC_2.28 ftok F
+GLIBC_2.28 ftruncate F
+GLIBC_2.28 ftruncate64 F
+GLIBC_2.28 ftrylockfile F
+GLIBC_2.28 fts64_children F
+GLIBC_2.28 fts64_close F
+GLIBC_2.28 fts64_open F
+GLIBC_2.28 fts64_read F
+GLIBC_2.28 fts64_set F
+GLIBC_2.28 fts_children F
+GLIBC_2.28 fts_close F
+GLIBC_2.28 fts_open F
+GLIBC_2.28 fts_read F
+GLIBC_2.28 fts_set F
+GLIBC_2.28 ftw F
+GLIBC_2.28 ftw64 F
+GLIBC_2.28 funlockfile F
+GLIBC_2.28 futimens F
+GLIBC_2.28 futimes F
+GLIBC_2.28 futimesat F
+GLIBC_2.28 fwide F
+GLIBC_2.28 fwprintf F
+GLIBC_2.28 fwrite F
+GLIBC_2.28 fwrite_unlocked F
+GLIBC_2.28 fwscanf F
+GLIBC_2.28 gai_strerror F
+GLIBC_2.28 gcvt F
+GLIBC_2.28 get_avphys_pages F
+GLIBC_2.28 get_current_dir_name F
+GLIBC_2.28 get_myaddress F
+GLIBC_2.28 get_nprocs F
+GLIBC_2.28 get_nprocs_conf F
+GLIBC_2.28 get_phys_pages F
+GLIBC_2.28 getaddrinfo F
+GLIBC_2.28 getaliasbyname F
+GLIBC_2.28 getaliasbyname_r F
+GLIBC_2.28 getaliasent F
+GLIBC_2.28 getaliasent_r F
+GLIBC_2.28 getauxval F
+GLIBC_2.28 getc F
+GLIBC_2.28 getc_unlocked F
+GLIBC_2.28 getchar F
+GLIBC_2.28 getchar_unlocked F
+GLIBC_2.28 getcontext F
+GLIBC_2.28 getcwd F
+GLIBC_2.28 getdate F
+GLIBC_2.28 getdate_err D 0x4
+GLIBC_2.28 getdate_r F
+GLIBC_2.28 getdelim F
+GLIBC_2.28 getdirentries F
+GLIBC_2.28 getdirentries64 F
+GLIBC_2.28 getdomainname F
+GLIBC_2.28 getdtablesize F
+GLIBC_2.28 getegid F
+GLIBC_2.28 getentropy F
+GLIBC_2.28 getenv F
+GLIBC_2.28 geteuid F
+GLIBC_2.28 getfsent F
+GLIBC_2.28 getfsfile F
+GLIBC_2.28 getfsspec F
+GLIBC_2.28 getgid F
+GLIBC_2.28 getgrent F
+GLIBC_2.28 getgrent_r F
+GLIBC_2.28 getgrgid F
+GLIBC_2.28 getgrgid_r F
+GLIBC_2.28 getgrnam F
+GLIBC_2.28 getgrnam_r F
+GLIBC_2.28 getgrouplist F
+GLIBC_2.28 getgroups F
+GLIBC_2.28 gethostbyaddr F
+GLIBC_2.28 gethostbyaddr_r F
+GLIBC_2.28 gethostbyname F
+GLIBC_2.28 gethostbyname2 F
+GLIBC_2.28 gethostbyname2_r F
+GLIBC_2.28 gethostbyname_r F
+GLIBC_2.28 gethostent F
+GLIBC_2.28 gethostent_r F
+GLIBC_2.28 gethostid F
+GLIBC_2.28 gethostname F
+GLIBC_2.28 getifaddrs F
+GLIBC_2.28 getipv4sourcefilter F
+GLIBC_2.28 getitimer F
+GLIBC_2.28 getline F
+GLIBC_2.28 getloadavg F
+GLIBC_2.28 getlogin F
+GLIBC_2.28 getlogin_r F
+GLIBC_2.28 getmntent F
+GLIBC_2.28 getmntent_r F
+GLIBC_2.28 getmsg F
+GLIBC_2.28 getnameinfo F
+GLIBC_2.28 getnetbyaddr F
+GLIBC_2.28 getnetbyaddr_r F
+GLIBC_2.28 getnetbyname F
+GLIBC_2.28 getnetbyname_r F
+GLIBC_2.28 getnetent F
+GLIBC_2.28 getnetent_r F
+GLIBC_2.28 getnetgrent F
+GLIBC_2.28 getnetgrent_r F
+GLIBC_2.28 getnetname F
+GLIBC_2.28 getopt F
+GLIBC_2.28 getopt_long F
+GLIBC_2.28 getopt_long_only F
+GLIBC_2.28 getpagesize F
+GLIBC_2.28 getpass F
+GLIBC_2.28 getpeername F
+GLIBC_2.28 getpgid F
+GLIBC_2.28 getpgrp F
+GLIBC_2.28 getpid F
+GLIBC_2.28 getpmsg F
+GLIBC_2.28 getppid F
+GLIBC_2.28 getpriority F
+GLIBC_2.28 getprotobyname F
+GLIBC_2.28 getprotobyname_r F
+GLIBC_2.28 getprotobynumber F
+GLIBC_2.28 getprotobynumber_r F
+GLIBC_2.28 getprotoent F
+GLIBC_2.28 getprotoent_r F
+GLIBC_2.28 getpt F
+GLIBC_2.28 getpublickey F
+GLIBC_2.28 getpw F
+GLIBC_2.28 getpwent F
+GLIBC_2.28 getpwent_r F
+GLIBC_2.28 getpwnam F
+GLIBC_2.28 getpwnam_r F
+GLIBC_2.28 getpwuid F
+GLIBC_2.28 getpwuid_r F
+GLIBC_2.28 getrandom F
+GLIBC_2.28 getresgid F
+GLIBC_2.28 getresuid F
+GLIBC_2.28 getrlimit F
+GLIBC_2.28 getrlimit64 F
+GLIBC_2.28 getrpcbyname F
+GLIBC_2.28 getrpcbyname_r F
+GLIBC_2.28 getrpcbynumber F
+GLIBC_2.28 getrpcbynumber_r F
+GLIBC_2.28 getrpcent F
+GLIBC_2.28 getrpcent_r F
+GLIBC_2.28 getrpcport F
+GLIBC_2.28 getrusage F
+GLIBC_2.28 gets F
+GLIBC_2.28 getsecretkey F
+GLIBC_2.28 getservbyname F
+GLIBC_2.28 getservbyname_r F
+GLIBC_2.28 getservbyport F
+GLIBC_2.28 getservbyport_r F
+GLIBC_2.28 getservent F
+GLIBC_2.28 getservent_r F
+GLIBC_2.28 getsgent F
+GLIBC_2.28 getsgent_r F
+GLIBC_2.28 getsgnam F
+GLIBC_2.28 getsgnam_r F
+GLIBC_2.28 getsid F
+GLIBC_2.28 getsockname F
+GLIBC_2.28 getsockopt F
+GLIBC_2.28 getsourcefilter F
+GLIBC_2.28 getspent F
+GLIBC_2.28 getspent_r F
+GLIBC_2.28 getspnam F
+GLIBC_2.28 getspnam_r F
+GLIBC_2.28 getsubopt F
+GLIBC_2.28 gettext F
+GLIBC_2.28 gettimeofday F
+GLIBC_2.28 getttyent F
+GLIBC_2.28 getttynam F
+GLIBC_2.28 getuid F
+GLIBC_2.28 getusershell F
+GLIBC_2.28 getutent F
+GLIBC_2.28 getutent_r F
+GLIBC_2.28 getutid F
+GLIBC_2.28 getutid_r F
+GLIBC_2.28 getutline F
+GLIBC_2.28 getutline_r F
+GLIBC_2.28 getutmp F
+GLIBC_2.28 getutmpx F
+GLIBC_2.28 getutxent F
+GLIBC_2.28 getutxid F
+GLIBC_2.28 getutxline F
+GLIBC_2.28 getw F
+GLIBC_2.28 getwc F
+GLIBC_2.28 getwc_unlocked F
+GLIBC_2.28 getwchar F
+GLIBC_2.28 getwchar_unlocked F
+GLIBC_2.28 getwd F
+GLIBC_2.28 getxattr F
+GLIBC_2.28 glob F
+GLIBC_2.28 glob64 F
+GLIBC_2.28 glob_pattern_p F
+GLIBC_2.28 globfree F
+GLIBC_2.28 globfree64 F
+GLIBC_2.28 gmtime F
+GLIBC_2.28 gmtime_r F
+GLIBC_2.28 gnu_dev_major F
+GLIBC_2.28 gnu_dev_makedev F
+GLIBC_2.28 gnu_dev_minor F
+GLIBC_2.28 gnu_get_libc_release F
+GLIBC_2.28 gnu_get_libc_version F
+GLIBC_2.28 grantpt F
+GLIBC_2.28 group_member F
+GLIBC_2.28 gsignal F
+GLIBC_2.28 gtty F
+GLIBC_2.28 h_errlist D 0x14
+GLIBC_2.28 h_nerr D 0x4
+GLIBC_2.28 hasmntopt F
+GLIBC_2.28 hcreate F
+GLIBC_2.28 hcreate_r F
+GLIBC_2.28 hdestroy F
+GLIBC_2.28 hdestroy_r F
+GLIBC_2.28 herror F
+GLIBC_2.28 host2netname F
+GLIBC_2.28 hsearch F
+GLIBC_2.28 hsearch_r F
+GLIBC_2.28 hstrerror F
+GLIBC_2.28 htonl F
+GLIBC_2.28 htons F
+GLIBC_2.28 iconv F
+GLIBC_2.28 iconv_close F
+GLIBC_2.28 iconv_open F
+GLIBC_2.28 if_freenameindex F
+GLIBC_2.28 if_indextoname F
+GLIBC_2.28 if_nameindex F
+GLIBC_2.28 if_nametoindex F
+GLIBC_2.28 imaxabs F
+GLIBC_2.28 imaxdiv F
+GLIBC_2.28 in6addr_any D 0x10
+GLIBC_2.28 in6addr_loopback D 0x10
+GLIBC_2.28 index F
+GLIBC_2.28 inet6_opt_append F
+GLIBC_2.28 inet6_opt_find F
+GLIBC_2.28 inet6_opt_finish F
+GLIBC_2.28 inet6_opt_get_val F
+GLIBC_2.28 inet6_opt_init F
+GLIBC_2.28 inet6_opt_next F
+GLIBC_2.28 inet6_opt_set_val F
+GLIBC_2.28 inet6_option_alloc F
+GLIBC_2.28 inet6_option_append F
+GLIBC_2.28 inet6_option_find F
+GLIBC_2.28 inet6_option_init F
+GLIBC_2.28 inet6_option_next F
+GLIBC_2.28 inet6_option_space F
+GLIBC_2.28 inet6_rth_add F
+GLIBC_2.28 inet6_rth_getaddr F
+GLIBC_2.28 inet6_rth_init F
+GLIBC_2.28 inet6_rth_reverse F
+GLIBC_2.28 inet6_rth_segments F
+GLIBC_2.28 inet6_rth_space F
+GLIBC_2.28 inet_addr F
+GLIBC_2.28 inet_aton F
+GLIBC_2.28 inet_lnaof F
+GLIBC_2.28 inet_makeaddr F
+GLIBC_2.28 inet_netof F
+GLIBC_2.28 inet_network F
+GLIBC_2.28 inet_nsap_addr F
+GLIBC_2.28 inet_nsap_ntoa F
+GLIBC_2.28 inet_ntoa F
+GLIBC_2.28 inet_ntop F
+GLIBC_2.28 inet_pton F
+GLIBC_2.28 init_module F
+GLIBC_2.28 initgroups F
+GLIBC_2.28 initstate F
+GLIBC_2.28 initstate_r F
+GLIBC_2.28 innetgr F
+GLIBC_2.28 inotify_add_watch F
+GLIBC_2.28 inotify_init F
+GLIBC_2.28 inotify_init1 F
+GLIBC_2.28 inotify_rm_watch F
+GLIBC_2.28 insque F
+GLIBC_2.28 ioctl F
+GLIBC_2.28 iruserok F
+GLIBC_2.28 iruserok_af F
+GLIBC_2.28 isalnum F
+GLIBC_2.28 isalnum_l F
+GLIBC_2.28 isalpha F
+GLIBC_2.28 isalpha_l F
+GLIBC_2.28 isascii F
+GLIBC_2.28 isastream F
+GLIBC_2.28 isatty F
+GLIBC_2.28 isblank F
+GLIBC_2.28 isblank_l F
+GLIBC_2.28 iscntrl F
+GLIBC_2.28 iscntrl_l F
+GLIBC_2.28 isctype F
+GLIBC_2.28 isdigit F
+GLIBC_2.28 isdigit_l F
+GLIBC_2.28 isfdtype F
+GLIBC_2.28 isgraph F
+GLIBC_2.28 isgraph_l F
+GLIBC_2.28 isinf F
+GLIBC_2.28 isinff F
+GLIBC_2.28 isinfl F
+GLIBC_2.28 islower F
+GLIBC_2.28 islower_l F
+GLIBC_2.28 isnan F
+GLIBC_2.28 isnanf F
+GLIBC_2.28 isnanl F
+GLIBC_2.28 isprint F
+GLIBC_2.28 isprint_l F
+GLIBC_2.28 ispunct F
+GLIBC_2.28 ispunct_l F
+GLIBC_2.28 isspace F
+GLIBC_2.28 isspace_l F
+GLIBC_2.28 isupper F
+GLIBC_2.28 isupper_l F
+GLIBC_2.28 iswalnum F
+GLIBC_2.28 iswalnum_l F
+GLIBC_2.28 iswalpha F
+GLIBC_2.28 iswalpha_l F
+GLIBC_2.28 iswblank F
+GLIBC_2.28 iswblank_l F
+GLIBC_2.28 iswcntrl F
+GLIBC_2.28 iswcntrl_l F
+GLIBC_2.28 iswctype F
+GLIBC_2.28 iswctype_l F
+GLIBC_2.28 iswdigit F
+GLIBC_2.28 iswdigit_l F
+GLIBC_2.28 iswgraph F
+GLIBC_2.28 iswgraph_l F
+GLIBC_2.28 iswlower F
+GLIBC_2.28 iswlower_l F
+GLIBC_2.28 iswprint F
+GLIBC_2.28 iswprint_l F
+GLIBC_2.28 iswpunct F
+GLIBC_2.28 iswpunct_l F
+GLIBC_2.28 iswspace F
+GLIBC_2.28 iswspace_l F
+GLIBC_2.28 iswupper F
+GLIBC_2.28 iswupper_l F
+GLIBC_2.28 iswxdigit F
+GLIBC_2.28 iswxdigit_l F
+GLIBC_2.28 isxdigit F
+GLIBC_2.28 isxdigit_l F
+GLIBC_2.28 jrand48 F
+GLIBC_2.28 jrand48_r F
+GLIBC_2.28 key_decryptsession F
+GLIBC_2.28 key_decryptsession_pk F
+GLIBC_2.28 key_encryptsession F
+GLIBC_2.28 key_encryptsession_pk F
+GLIBC_2.28 key_gendes F
+GLIBC_2.28 key_get_conv F
+GLIBC_2.28 key_secretkey_is_set F
+GLIBC_2.28 key_setnet F
+GLIBC_2.28 key_setsecret F
+GLIBC_2.28 kill F
+GLIBC_2.28 killpg F
+GLIBC_2.28 klogctl F
+GLIBC_2.28 l64a F
+GLIBC_2.28 labs F
+GLIBC_2.28 lchmod F
+GLIBC_2.28 lchown F
+GLIBC_2.28 lckpwdf F
+GLIBC_2.28 lcong48 F
+GLIBC_2.28 lcong48_r F
+GLIBC_2.28 ldexp F
+GLIBC_2.28 ldexpf F
+GLIBC_2.28 ldexpl F
+GLIBC_2.28 ldiv F
+GLIBC_2.28 lfind F
+GLIBC_2.28 lgetxattr F
+GLIBC_2.28 link F
+GLIBC_2.28 linkat F
+GLIBC_2.28 listen F
+GLIBC_2.28 listxattr F
+GLIBC_2.28 llabs F
+GLIBC_2.28 lldiv F
+GLIBC_2.28 llistxattr F
+GLIBC_2.28 localeconv F
+GLIBC_2.28 localtime F
+GLIBC_2.28 localtime_r F
+GLIBC_2.28 lockf F
+GLIBC_2.28 lockf64 F
+GLIBC_2.28 longjmp F
+GLIBC_2.28 lrand48 F
+GLIBC_2.28 lrand48_r F
+GLIBC_2.28 lremovexattr F
+GLIBC_2.28 lsearch F
+GLIBC_2.28 lseek F
+GLIBC_2.28 lseek64 F
+GLIBC_2.28 lsetxattr F
+GLIBC_2.28 lutimes F
+GLIBC_2.28 madvise F
+GLIBC_2.28 makecontext F
+GLIBC_2.28 mallinfo F
+GLIBC_2.28 malloc F
+GLIBC_2.28 malloc_info F
+GLIBC_2.28 malloc_stats F
+GLIBC_2.28 malloc_trim F
+GLIBC_2.28 malloc_usable_size F
+GLIBC_2.28 mallopt F
+GLIBC_2.28 mallwatch D 0x4
+GLIBC_2.28 mblen F
+GLIBC_2.28 mbrlen F
+GLIBC_2.28 mbrtoc16 F
+GLIBC_2.28 mbrtoc32 F
+GLIBC_2.28 mbrtowc F
+GLIBC_2.28 mbsinit F
+GLIBC_2.28 mbsnrtowcs F
+GLIBC_2.28 mbsrtowcs F
+GLIBC_2.28 mbstowcs F
+GLIBC_2.28 mbtowc F
+GLIBC_2.28 mcheck F
+GLIBC_2.28 mcheck_check_all F
+GLIBC_2.28 mcheck_pedantic F
+GLIBC_2.28 mcount F
+GLIBC_2.28 memalign F
+GLIBC_2.28 memccpy F
+GLIBC_2.28 memchr F
+GLIBC_2.28 memcmp F
+GLIBC_2.28 memcpy F
+GLIBC_2.28 memfd_create F
+GLIBC_2.28 memfrob F
+GLIBC_2.28 memmem F
+GLIBC_2.28 memmove F
+GLIBC_2.28 mempcpy F
+GLIBC_2.28 memrchr F
+GLIBC_2.28 memset F
+GLIBC_2.28 mincore F
+GLIBC_2.28 mkdir F
+GLIBC_2.28 mkdirat F
+GLIBC_2.28 mkdtemp F
+GLIBC_2.28 mkfifo F
+GLIBC_2.28 mkfifoat F
+GLIBC_2.28 mkostemp F
+GLIBC_2.28 mkostemp64 F
+GLIBC_2.28 mkostemps F
+GLIBC_2.28 mkostemps64 F
+GLIBC_2.28 mkstemp F
+GLIBC_2.28 mkstemp64 F
+GLIBC_2.28 mkstemps F
+GLIBC_2.28 mkstemps64 F
+GLIBC_2.28 mktemp F
+GLIBC_2.28 mktime F
+GLIBC_2.28 mlock F
+GLIBC_2.28 mlock2 F
+GLIBC_2.28 mlockall F
+GLIBC_2.28 mmap F
+GLIBC_2.28 mmap64 F
+GLIBC_2.28 modf F
+GLIBC_2.28 modff F
+GLIBC_2.28 modfl F
+GLIBC_2.28 moncontrol F
+GLIBC_2.28 monstartup F
+GLIBC_2.28 mount F
+GLIBC_2.28 mprobe F
+GLIBC_2.28 mprotect F
+GLIBC_2.28 mrand48 F
+GLIBC_2.28 mrand48_r F
+GLIBC_2.28 mremap F
+GLIBC_2.28 msgctl F
+GLIBC_2.28 msgget F
+GLIBC_2.28 msgrcv F
+GLIBC_2.28 msgsnd F
+GLIBC_2.28 msync F
+GLIBC_2.28 mtrace F
+GLIBC_2.28 munlock F
+GLIBC_2.28 munlockall F
+GLIBC_2.28 munmap F
+GLIBC_2.28 muntrace F
+GLIBC_2.28 name_to_handle_at F
+GLIBC_2.28 nanosleep F
+GLIBC_2.28 netname2host F
+GLIBC_2.28 netname2user F
+GLIBC_2.28 newlocale F
+GLIBC_2.28 nftw F
+GLIBC_2.28 nftw64 F
+GLIBC_2.28 ngettext F
+GLIBC_2.28 nice F
+GLIBC_2.28 nl_langinfo F
+GLIBC_2.28 nl_langinfo_l F
+GLIBC_2.28 nrand48 F
+GLIBC_2.28 nrand48_r F
+GLIBC_2.28 ntohl F
+GLIBC_2.28 ntohs F
+GLIBC_2.28 ntp_adjtime F
+GLIBC_2.28 ntp_gettime F
+GLIBC_2.28 ntp_gettimex F
+GLIBC_2.28 obstack_alloc_failed_handler D 0x4
+GLIBC_2.28 obstack_exit_failure D 0x4
+GLIBC_2.28 obstack_free F
+GLIBC_2.28 obstack_printf F
+GLIBC_2.28 obstack_vprintf F
+GLIBC_2.28 on_exit F
+GLIBC_2.28 open F
+GLIBC_2.28 open64 F
+GLIBC_2.28 open_by_handle_at F
+GLIBC_2.28 open_memstream F
+GLIBC_2.28 open_wmemstream F
+GLIBC_2.28 openat F
+GLIBC_2.28 openat64 F
+GLIBC_2.28 opendir F
+GLIBC_2.28 openlog F
+GLIBC_2.28 optarg D 0x4
+GLIBC_2.28 opterr D 0x4
+GLIBC_2.28 optind D 0x4
+GLIBC_2.28 optopt D 0x4
+GLIBC_2.28 parse_printf_format F
+GLIBC_2.28 passwd2des F
+GLIBC_2.28 pathconf F
+GLIBC_2.28 pause F
+GLIBC_2.28 pclose F
+GLIBC_2.28 perror F
+GLIBC_2.28 personality F
+GLIBC_2.28 pipe F
+GLIBC_2.28 pipe2 F
+GLIBC_2.28 pivot_root F
+GLIBC_2.28 pkey_alloc F
+GLIBC_2.28 pkey_free F
+GLIBC_2.28 pkey_get F
+GLIBC_2.28 pkey_mprotect F
+GLIBC_2.28 pkey_set F
+GLIBC_2.28 pmap_getmaps F
+GLIBC_2.28 pmap_getport F
+GLIBC_2.28 pmap_rmtcall F
+GLIBC_2.28 pmap_set F
+GLIBC_2.28 pmap_unset F
+GLIBC_2.28 poll F
+GLIBC_2.28 popen F
+GLIBC_2.28 posix_fadvise F
+GLIBC_2.28 posix_fadvise64 F
+GLIBC_2.28 posix_fallocate F
+GLIBC_2.28 posix_fallocate64 F
+GLIBC_2.28 posix_madvise F
+GLIBC_2.28 posix_memalign F
+GLIBC_2.28 posix_openpt F
+GLIBC_2.28 posix_spawn F
+GLIBC_2.28 posix_spawn_file_actions_addclose F
+GLIBC_2.28 posix_spawn_file_actions_adddup2 F
+GLIBC_2.28 posix_spawn_file_actions_addopen F
+GLIBC_2.28 posix_spawn_file_actions_destroy F
+GLIBC_2.28 posix_spawn_file_actions_init F
+GLIBC_2.28 posix_spawnattr_destroy F
+GLIBC_2.28 posix_spawnattr_getflags F
+GLIBC_2.28 posix_spawnattr_getpgroup F
+GLIBC_2.28 posix_spawnattr_getschedparam F
+GLIBC_2.28 posix_spawnattr_getschedpolicy F
+GLIBC_2.28 posix_spawnattr_getsigdefault F
+GLIBC_2.28 posix_spawnattr_getsigmask F
+GLIBC_2.28 posix_spawnattr_init F
+GLIBC_2.28 posix_spawnattr_setflags F
+GLIBC_2.28 posix_spawnattr_setpgroup F
+GLIBC_2.28 posix_spawnattr_setschedparam F
+GLIBC_2.28 posix_spawnattr_setschedpolicy F
+GLIBC_2.28 posix_spawnattr_setsigdefault F
+GLIBC_2.28 posix_spawnattr_setsigmask F
+GLIBC_2.28 posix_spawnp F
+GLIBC_2.28 ppoll F
+GLIBC_2.28 prctl F
+GLIBC_2.28 pread F
+GLIBC_2.28 pread64 F
+GLIBC_2.28 preadv F
+GLIBC_2.28 preadv2 F
+GLIBC_2.28 preadv64 F
+GLIBC_2.28 preadv64v2 F
+GLIBC_2.28 printf F
+GLIBC_2.28 printf_size F
+GLIBC_2.28 printf_size_info F
+GLIBC_2.28 prlimit F
+GLIBC_2.28 prlimit64 F
+GLIBC_2.28 process_vm_readv F
+GLIBC_2.28 process_vm_writev F
+GLIBC_2.28 profil F
+GLIBC_2.28 program_invocation_name D 0x4
+GLIBC_2.28 program_invocation_short_name D 0x4
+GLIBC_2.28 pselect F
+GLIBC_2.28 psiginfo F
+GLIBC_2.28 psignal F
+GLIBC_2.28 pthread_attr_destroy F
+GLIBC_2.28 pthread_attr_getdetachstate F
+GLIBC_2.28 pthread_attr_getinheritsched F
+GLIBC_2.28 pthread_attr_getschedparam F
+GLIBC_2.28 pthread_attr_getschedpolicy F
+GLIBC_2.28 pthread_attr_getscope F
+GLIBC_2.28 pthread_attr_init F
+GLIBC_2.28 pthread_attr_setdetachstate F
+GLIBC_2.28 pthread_attr_setinheritsched F
+GLIBC_2.28 pthread_attr_setschedparam F
+GLIBC_2.28 pthread_attr_setschedpolicy F
+GLIBC_2.28 pthread_attr_setscope F
+GLIBC_2.28 pthread_cond_broadcast F
+GLIBC_2.28 pthread_cond_destroy F
+GLIBC_2.28 pthread_cond_init F
+GLIBC_2.28 pthread_cond_signal F
+GLIBC_2.28 pthread_cond_timedwait F
+GLIBC_2.28 pthread_cond_wait F
+GLIBC_2.28 pthread_condattr_destroy F
+GLIBC_2.28 pthread_condattr_init F
+GLIBC_2.28 pthread_equal F
+GLIBC_2.28 pthread_exit F
+GLIBC_2.28 pthread_getschedparam F
+GLIBC_2.28 pthread_mutex_destroy F
+GLIBC_2.28 pthread_mutex_init F
+GLIBC_2.28 pthread_mutex_lock F
+GLIBC_2.28 pthread_mutex_unlock F
+GLIBC_2.28 pthread_self F
+GLIBC_2.28 pthread_setcancelstate F
+GLIBC_2.28 pthread_setcanceltype F
+GLIBC_2.28 pthread_setschedparam F
+GLIBC_2.28 ptrace F
+GLIBC_2.28 ptsname F
+GLIBC_2.28 ptsname_r F
+GLIBC_2.28 putc F
+GLIBC_2.28 putc_unlocked F
+GLIBC_2.28 putchar F
+GLIBC_2.28 putchar_unlocked F
+GLIBC_2.28 putenv F
+GLIBC_2.28 putgrent F
+GLIBC_2.28 putmsg F
+GLIBC_2.28 putpmsg F
+GLIBC_2.28 putpwent F
+GLIBC_2.28 puts F
+GLIBC_2.28 putsgent F
+GLIBC_2.28 putspent F
+GLIBC_2.28 pututline F
+GLIBC_2.28 pututxline F
+GLIBC_2.28 putw F
+GLIBC_2.28 putwc F
+GLIBC_2.28 putwc_unlocked F
+GLIBC_2.28 putwchar F
+GLIBC_2.28 putwchar_unlocked F
+GLIBC_2.28 pvalloc F
+GLIBC_2.28 pwrite F
+GLIBC_2.28 pwrite64 F
+GLIBC_2.28 pwritev F
+GLIBC_2.28 pwritev2 F
+GLIBC_2.28 pwritev64 F
+GLIBC_2.28 pwritev64v2 F
+GLIBC_2.28 qecvt F
+GLIBC_2.28 qecvt_r F
+GLIBC_2.28 qfcvt F
+GLIBC_2.28 qfcvt_r F
+GLIBC_2.28 qgcvt F
+GLIBC_2.28 qsort F
+GLIBC_2.28 qsort_r F
+GLIBC_2.28 quick_exit F
+GLIBC_2.28 quotactl F
+GLIBC_2.28 raise F
+GLIBC_2.28 rand F
+GLIBC_2.28 rand_r F
+GLIBC_2.28 random F
+GLIBC_2.28 random_r F
+GLIBC_2.28 rawmemchr F
+GLIBC_2.28 rcmd F
+GLIBC_2.28 rcmd_af F
+GLIBC_2.28 re_comp F
+GLIBC_2.28 re_compile_fastmap F
+GLIBC_2.28 re_compile_pattern F
+GLIBC_2.28 re_exec F
+GLIBC_2.28 re_match F
+GLIBC_2.28 re_match_2 F
+GLIBC_2.28 re_search F
+GLIBC_2.28 re_search_2 F
+GLIBC_2.28 re_set_registers F
+GLIBC_2.28 re_set_syntax F
+GLIBC_2.28 re_syntax_options D 0x4
+GLIBC_2.28 read F
+GLIBC_2.28 readahead F
+GLIBC_2.28 readdir F
+GLIBC_2.28 readdir64 F
+GLIBC_2.28 readdir64_r F
+GLIBC_2.28 readdir_r F
+GLIBC_2.28 readlink F
+GLIBC_2.28 readlinkat F
+GLIBC_2.28 readv F
+GLIBC_2.28 realloc F
+GLIBC_2.28 reallocarray F
+GLIBC_2.28 realpath F
+GLIBC_2.28 reboot F
+GLIBC_2.28 recv F
+GLIBC_2.28 recvfrom F
+GLIBC_2.28 recvmmsg F
+GLIBC_2.28 recvmsg F
+GLIBC_2.28 regcomp F
+GLIBC_2.28 regerror F
+GLIBC_2.28 regexec F
+GLIBC_2.28 regfree F
+GLIBC_2.28 register_printf_function F
+GLIBC_2.28 register_printf_modifier F
+GLIBC_2.28 register_printf_specifier F
+GLIBC_2.28 register_printf_type F
+GLIBC_2.28 registerrpc F
+GLIBC_2.28 remap_file_pages F
+GLIBC_2.28 remove F
+GLIBC_2.28 removexattr F
+GLIBC_2.28 remque F
+GLIBC_2.28 rename F
+GLIBC_2.28 renameat F
+GLIBC_2.28 revoke F
+GLIBC_2.28 rewind F
+GLIBC_2.28 rewinddir F
+GLIBC_2.28 rexec F
+GLIBC_2.28 rexec_af F
+GLIBC_2.28 rexecoptions D 0x4
+GLIBC_2.28 rindex F
+GLIBC_2.28 rmdir F
+GLIBC_2.28 rpc_createerr D 0x10
+GLIBC_2.28 rpmatch F
+GLIBC_2.28 rresvport F
+GLIBC_2.28 rresvport_af F
+GLIBC_2.28 rtime F
+GLIBC_2.28 ruserok F
+GLIBC_2.28 ruserok_af F
+GLIBC_2.28 ruserpass F
+GLIBC_2.28 sbrk F
+GLIBC_2.28 scalbn F
+GLIBC_2.28 scalbnf F
+GLIBC_2.28 scalbnl F
+GLIBC_2.28 scandir F
+GLIBC_2.28 scandir64 F
+GLIBC_2.28 scandirat F
+GLIBC_2.28 scandirat64 F
+GLIBC_2.28 scanf F
+GLIBC_2.28 sched_get_priority_max F
+GLIBC_2.28 sched_get_priority_min F
+GLIBC_2.28 sched_getaffinity F
+GLIBC_2.28 sched_getcpu F
+GLIBC_2.28 sched_getparam F
+GLIBC_2.28 sched_getscheduler F
+GLIBC_2.28 sched_rr_get_interval F
+GLIBC_2.28 sched_setaffinity F
+GLIBC_2.28 sched_setparam F
+GLIBC_2.28 sched_setscheduler F
+GLIBC_2.28 sched_yield F
+GLIBC_2.28 secure_getenv F
+GLIBC_2.28 seed48 F
+GLIBC_2.28 seed48_r F
+GLIBC_2.28 seekdir F
+GLIBC_2.28 select F
+GLIBC_2.28 semctl F
+GLIBC_2.28 semget F
+GLIBC_2.28 semop F
+GLIBC_2.28 semtimedop F
+GLIBC_2.28 send F
+GLIBC_2.28 sendfile F
+GLIBC_2.28 sendfile64 F
+GLIBC_2.28 sendmmsg F
+GLIBC_2.28 sendmsg F
+GLIBC_2.28 sendto F
+GLIBC_2.28 setaliasent F
+GLIBC_2.28 setbuf F
+GLIBC_2.28 setbuffer F
+GLIBC_2.28 setcontext F
+GLIBC_2.28 setdomainname F
+GLIBC_2.28 setegid F
+GLIBC_2.28 setenv F
+GLIBC_2.28 seteuid F
+GLIBC_2.28 setfsent F
+GLIBC_2.28 setfsgid F
+GLIBC_2.28 setfsuid F
+GLIBC_2.28 setgid F
+GLIBC_2.28 setgrent F
+GLIBC_2.28 setgroups F
+GLIBC_2.28 sethostent F
+GLIBC_2.28 sethostid F
+GLIBC_2.28 sethostname F
+GLIBC_2.28 setipv4sourcefilter F
+GLIBC_2.28 setitimer F
+GLIBC_2.28 setjmp F
+GLIBC_2.28 setlinebuf F
+GLIBC_2.28 setlocale F
+GLIBC_2.28 setlogin F
+GLIBC_2.28 setlogmask F
+GLIBC_2.28 setmntent F
+GLIBC_2.28 setnetent F
+GLIBC_2.28 setnetgrent F
+GLIBC_2.28 setns F
+GLIBC_2.28 setpgid F
+GLIBC_2.28 setpgrp F
+GLIBC_2.28 setpriority F
+GLIBC_2.28 setprotoent F
+GLIBC_2.28 setpwent F
+GLIBC_2.28 setregid F
+GLIBC_2.28 setresgid F
+GLIBC_2.28 setresuid F
+GLIBC_2.28 setreuid F
+GLIBC_2.28 setrlimit F
+GLIBC_2.28 setrlimit64 F
+GLIBC_2.28 setrpcent F
+GLIBC_2.28 setservent F
+GLIBC_2.28 setsgent F
+GLIBC_2.28 setsid F
+GLIBC_2.28 setsockopt F
+GLIBC_2.28 setsourcefilter F
+GLIBC_2.28 setspent F
+GLIBC_2.28 setstate F
+GLIBC_2.28 setstate_r F
+GLIBC_2.28 settimeofday F
+GLIBC_2.28 setttyent F
+GLIBC_2.28 setuid F
+GLIBC_2.28 setusershell F
+GLIBC_2.28 setutent F
+GLIBC_2.28 setutxent F
+GLIBC_2.28 setvbuf F
+GLIBC_2.28 setxattr F
+GLIBC_2.28 sgetsgent F
+GLIBC_2.28 sgetsgent_r F
+GLIBC_2.28 sgetspent F
+GLIBC_2.28 sgetspent_r F
+GLIBC_2.28 shmat F
+GLIBC_2.28 shmctl F
+GLIBC_2.28 shmdt F
+GLIBC_2.28 shmget F
+GLIBC_2.28 shutdown F
+GLIBC_2.28 sigaction F
+GLIBC_2.28 sigaddset F
+GLIBC_2.28 sigaltstack F
+GLIBC_2.28 sigandset F
+GLIBC_2.28 sigblock F
+GLIBC_2.28 sigdelset F
+GLIBC_2.28 sigemptyset F
+GLIBC_2.28 sigfillset F
+GLIBC_2.28 siggetmask F
+GLIBC_2.28 sighold F
+GLIBC_2.28 sigignore F
+GLIBC_2.28 siginterrupt F
+GLIBC_2.28 sigisemptyset F
+GLIBC_2.28 sigismember F
+GLIBC_2.28 siglongjmp F
+GLIBC_2.28 signal F
+GLIBC_2.28 signalfd F
+GLIBC_2.28 sigorset F
+GLIBC_2.28 sigpause F
+GLIBC_2.28 sigpending F
+GLIBC_2.28 sigprocmask F
+GLIBC_2.28 sigqueue F
+GLIBC_2.28 sigrelse F
+GLIBC_2.28 sigreturn F
+GLIBC_2.28 sigset F
+GLIBC_2.28 sigsetmask F
+GLIBC_2.28 sigstack F
+GLIBC_2.28 sigsuspend F
+GLIBC_2.28 sigtimedwait F
+GLIBC_2.28 sigwait F
+GLIBC_2.28 sigwaitinfo F
+GLIBC_2.28 sleep F
+GLIBC_2.28 snprintf F
+GLIBC_2.28 sockatmark F
+GLIBC_2.28 socket F
+GLIBC_2.28 socketpair F
+GLIBC_2.28 splice F
+GLIBC_2.28 sprintf F
+GLIBC_2.28 sprofil F
+GLIBC_2.28 srand F
+GLIBC_2.28 srand48 F
+GLIBC_2.28 srand48_r F
+GLIBC_2.28 srandom F
+GLIBC_2.28 srandom_r F
+GLIBC_2.28 sscanf F
+GLIBC_2.28 ssignal F
+GLIBC_2.28 sstk F
+GLIBC_2.28 statfs F
+GLIBC_2.28 statfs64 F
+GLIBC_2.28 statvfs F
+GLIBC_2.28 statvfs64 F
+GLIBC_2.28 stderr D 0x4
+GLIBC_2.28 stdin D 0x4
+GLIBC_2.28 stdout D 0x4
+GLIBC_2.28 stime F
+GLIBC_2.28 stpcpy F
+GLIBC_2.28 stpncpy F
+GLIBC_2.28 strcasecmp F
+GLIBC_2.28 strcasecmp_l F
+GLIBC_2.28 strcasestr F
+GLIBC_2.28 strcat F
+GLIBC_2.28 strchr F
+GLIBC_2.28 strchrnul F
+GLIBC_2.28 strcmp F
+GLIBC_2.28 strcoll F
+GLIBC_2.28 strcoll_l F
+GLIBC_2.28 strcpy F
+GLIBC_2.28 strcspn F
+GLIBC_2.28 strdup F
+GLIBC_2.28 strerror F
+GLIBC_2.28 strerror_l F
+GLIBC_2.28 strerror_r F
+GLIBC_2.28 strfmon F
+GLIBC_2.28 strfmon_l F
+GLIBC_2.28 strfromd F
+GLIBC_2.28 strfromf F
+GLIBC_2.28 strfromf32 F
+GLIBC_2.28 strfromf32x F
+GLIBC_2.28 strfromf64 F
+GLIBC_2.28 strfroml F
+GLIBC_2.28 strfry F
+GLIBC_2.28 strftime F
+GLIBC_2.28 strftime_l F
+GLIBC_2.28 strlen F
+GLIBC_2.28 strncasecmp F
+GLIBC_2.28 strncasecmp_l F
+GLIBC_2.28 strncat F
+GLIBC_2.28 strncmp F
+GLIBC_2.28 strncpy F
+GLIBC_2.28 strndup F
+GLIBC_2.28 strnlen F
+GLIBC_2.28 strpbrk F
+GLIBC_2.28 strptime F
+GLIBC_2.28 strptime_l F
+GLIBC_2.28 strrchr F
+GLIBC_2.28 strsep F
+GLIBC_2.28 strsignal F
+GLIBC_2.28 strspn F
+GLIBC_2.28 strstr F
+GLIBC_2.28 strtod F
+GLIBC_2.28 strtod_l F
+GLIBC_2.28 strtof F
+GLIBC_2.28 strtof32 F
+GLIBC_2.28 strtof32_l F
+GLIBC_2.28 strtof32x F
+GLIBC_2.28 strtof32x_l F
+GLIBC_2.28 strtof64 F
+GLIBC_2.28 strtof64_l F
+GLIBC_2.28 strtof_l F
+GLIBC_2.28 strtoimax F
+GLIBC_2.28 strtok F
+GLIBC_2.28 strtok_r F
+GLIBC_2.28 strtol F
+GLIBC_2.28 strtol_l F
+GLIBC_2.28 strtold F
+GLIBC_2.28 strtold_l F
+GLIBC_2.28 strtoll F
+GLIBC_2.28 strtoll_l F
+GLIBC_2.28 strtoq F
+GLIBC_2.28 strtoul F
+GLIBC_2.28 strtoul_l F
+GLIBC_2.28 strtoull F
+GLIBC_2.28 strtoull_l F
+GLIBC_2.28 strtoumax F
+GLIBC_2.28 strtouq F
+GLIBC_2.28 strverscmp F
+GLIBC_2.28 strxfrm F
+GLIBC_2.28 strxfrm_l F
+GLIBC_2.28 stty F
+GLIBC_2.28 svc_exit F
+GLIBC_2.28 svc_fdset D 0x80
+GLIBC_2.28 svc_getreq F
+GLIBC_2.28 svc_getreq_common F
+GLIBC_2.28 svc_getreq_poll F
+GLIBC_2.28 svc_getreqset F
+GLIBC_2.28 svc_max_pollfd D 0x4
+GLIBC_2.28 svc_pollfd D 0x4
+GLIBC_2.28 svc_register F
+GLIBC_2.28 svc_run F
+GLIBC_2.28 svc_sendreply F
+GLIBC_2.28 svc_unregister F
+GLIBC_2.28 svcauthdes_stats D 0xc
+GLIBC_2.28 svcerr_auth F
+GLIBC_2.28 svcerr_decode F
+GLIBC_2.28 svcerr_noproc F
+GLIBC_2.28 svcerr_noprog F
+GLIBC_2.28 svcerr_progvers F
+GLIBC_2.28 svcerr_systemerr F
+GLIBC_2.28 svcerr_weakauth F
+GLIBC_2.28 svcfd_create F
+GLIBC_2.28 svcraw_create F
+GLIBC_2.28 svctcp_create F
+GLIBC_2.28 svcudp_bufcreate F
+GLIBC_2.28 svcudp_create F
+GLIBC_2.28 svcudp_enablecache F
+GLIBC_2.28 svcunix_create F
+GLIBC_2.28 svcunixfd_create F
+GLIBC_2.28 swab F
+GLIBC_2.28 swapcontext F
+GLIBC_2.28 swapoff F
+GLIBC_2.28 swapon F
+GLIBC_2.28 swprintf F
+GLIBC_2.28 swscanf F
+GLIBC_2.28 symlink F
+GLIBC_2.28 symlinkat F
+GLIBC_2.28 sync F
+GLIBC_2.28 sync_file_range F
+GLIBC_2.28 syncfs F
+GLIBC_2.28 sys_errlist D 0x21c
+GLIBC_2.28 sys_nerr D 0x4
+GLIBC_2.28 sys_sigabbrev D 0x104
+GLIBC_2.28 sys_siglist D 0x104
+GLIBC_2.28 syscall F
+GLIBC_2.28 sysconf F
+GLIBC_2.28 sysctl F
+GLIBC_2.28 sysinfo F
+GLIBC_2.28 syslog F
+GLIBC_2.28 system F
+GLIBC_2.28 sysv_signal F
+GLIBC_2.28 tcdrain F
+GLIBC_2.28 tcflow F
+GLIBC_2.28 tcflush F
+GLIBC_2.28 tcgetattr F
+GLIBC_2.28 tcgetpgrp F
+GLIBC_2.28 tcgetsid F
+GLIBC_2.28 tcsendbreak F
+GLIBC_2.28 tcsetattr F
+GLIBC_2.28 tcsetpgrp F
+GLIBC_2.28 tdelete F
+GLIBC_2.28 tdestroy F
+GLIBC_2.28 tee F
+GLIBC_2.28 telldir F
+GLIBC_2.28 tempnam F
+GLIBC_2.28 textdomain F
+GLIBC_2.28 tfind F
+GLIBC_2.28 time F
+GLIBC_2.28 timegm F
+GLIBC_2.28 timelocal F
+GLIBC_2.28 timerfd_create F
+GLIBC_2.28 timerfd_gettime F
+GLIBC_2.28 timerfd_settime F
+GLIBC_2.28 times F
+GLIBC_2.28 timespec_get F
+GLIBC_2.28 timezone D 0x4
+GLIBC_2.28 tmpfile F
+GLIBC_2.28 tmpfile64 F
+GLIBC_2.28 tmpnam F
+GLIBC_2.28 tmpnam_r F
+GLIBC_2.28 toascii F
+GLIBC_2.28 tolower F
+GLIBC_2.28 tolower_l F
+GLIBC_2.28 toupper F
+GLIBC_2.28 toupper_l F
+GLIBC_2.28 towctrans F
+GLIBC_2.28 towctrans_l F
+GLIBC_2.28 towlower F
+GLIBC_2.28 towlower_l F
+GLIBC_2.28 towupper F
+GLIBC_2.28 towupper_l F
+GLIBC_2.28 tr_break F
+GLIBC_2.28 truncate F
+GLIBC_2.28 truncate64 F
+GLIBC_2.28 tsearch F
+GLIBC_2.28 ttyname F
+GLIBC_2.28 ttyname_r F
+GLIBC_2.28 ttyslot F
+GLIBC_2.28 twalk F
+GLIBC_2.28 tzname D 0x8
+GLIBC_2.28 tzset F
+GLIBC_2.28 ualarm F
+GLIBC_2.28 ulckpwdf F
+GLIBC_2.28 ulimit F
+GLIBC_2.28 umask F
+GLIBC_2.28 umount F
+GLIBC_2.28 umount2 F
+GLIBC_2.28 uname F
+GLIBC_2.28 ungetc F
+GLIBC_2.28 ungetwc F
+GLIBC_2.28 unlink F
+GLIBC_2.28 unlinkat F
+GLIBC_2.28 unlockpt F
+GLIBC_2.28 unsetenv F
+GLIBC_2.28 unshare F
+GLIBC_2.28 updwtmp F
+GLIBC_2.28 updwtmpx F
+GLIBC_2.28 uselocale F
+GLIBC_2.28 user2netname F
+GLIBC_2.28 usleep F
+GLIBC_2.28 utime F
+GLIBC_2.28 utimensat F
+GLIBC_2.28 utimes F
+GLIBC_2.28 utmpname F
+GLIBC_2.28 utmpxname F
+GLIBC_2.28 valloc F
+GLIBC_2.28 vasprintf F
+GLIBC_2.28 vdprintf F
+GLIBC_2.28 verr F
+GLIBC_2.28 verrx F
+GLIBC_2.28 versionsort F
+GLIBC_2.28 versionsort64 F
+GLIBC_2.28 vfork F
+GLIBC_2.28 vfprintf F
+GLIBC_2.28 vfscanf F
+GLIBC_2.28 vfwprintf F
+GLIBC_2.28 vfwscanf F
+GLIBC_2.28 vhangup F
+GLIBC_2.28 vlimit F
+GLIBC_2.28 vmsplice F
+GLIBC_2.28 vprintf F
+GLIBC_2.28 vscanf F
+GLIBC_2.28 vsnprintf F
+GLIBC_2.28 vsprintf F
+GLIBC_2.28 vsscanf F
+GLIBC_2.28 vswprintf F
+GLIBC_2.28 vswscanf F
+GLIBC_2.28 vsyslog F
+GLIBC_2.28 vtimes F
+GLIBC_2.28 vwarn F
+GLIBC_2.28 vwarnx F
+GLIBC_2.28 vwprintf F
+GLIBC_2.28 vwscanf F
+GLIBC_2.28 wait F
+GLIBC_2.28 wait3 F
+GLIBC_2.28 wait4 F
+GLIBC_2.28 waitid F
+GLIBC_2.28 waitpid F
+GLIBC_2.28 warn F
+GLIBC_2.28 warnx F
+GLIBC_2.28 wcpcpy F
+GLIBC_2.28 wcpncpy F
+GLIBC_2.28 wcrtomb F
+GLIBC_2.28 wcscasecmp F
+GLIBC_2.28 wcscasecmp_l F
+GLIBC_2.28 wcscat F
+GLIBC_2.28 wcschr F
+GLIBC_2.28 wcschrnul F
+GLIBC_2.28 wcscmp F
+GLIBC_2.28 wcscoll F
+GLIBC_2.28 wcscoll_l F
+GLIBC_2.28 wcscpy F
+GLIBC_2.28 wcscspn F
+GLIBC_2.28 wcsdup F
+GLIBC_2.28 wcsftime F
+GLIBC_2.28 wcsftime_l F
+GLIBC_2.28 wcslen F
+GLIBC_2.28 wcsncasecmp F
+GLIBC_2.28 wcsncasecmp_l F
+GLIBC_2.28 wcsncat F
+GLIBC_2.28 wcsncmp F
+GLIBC_2.28 wcsncpy F
+GLIBC_2.28 wcsnlen F
+GLIBC_2.28 wcsnrtombs F
+GLIBC_2.28 wcspbrk F
+GLIBC_2.28 wcsrchr F
+GLIBC_2.28 wcsrtombs F
+GLIBC_2.28 wcsspn F
+GLIBC_2.28 wcsstr F
+GLIBC_2.28 wcstod F
+GLIBC_2.28 wcstod_l F
+GLIBC_2.28 wcstof F
+GLIBC_2.28 wcstof32 F
+GLIBC_2.28 wcstof32_l F
+GLIBC_2.28 wcstof32x F
+GLIBC_2.28 wcstof32x_l F
+GLIBC_2.28 wcstof64 F
+GLIBC_2.28 wcstof64_l F
+GLIBC_2.28 wcstof_l F
+GLIBC_2.28 wcstoimax F
+GLIBC_2.28 wcstok F
+GLIBC_2.28 wcstol F
+GLIBC_2.28 wcstol_l F
+GLIBC_2.28 wcstold F
+GLIBC_2.28 wcstold_l F
+GLIBC_2.28 wcstoll F
+GLIBC_2.28 wcstoll_l F
+GLIBC_2.28 wcstombs F
+GLIBC_2.28 wcstoq F
+GLIBC_2.28 wcstoul F
+GLIBC_2.28 wcstoul_l F
+GLIBC_2.28 wcstoull F
+GLIBC_2.28 wcstoull_l F
+GLIBC_2.28 wcstoumax F
+GLIBC_2.28 wcstouq F
+GLIBC_2.28 wcswcs F
+GLIBC_2.28 wcswidth F
+GLIBC_2.28 wcsxfrm F
+GLIBC_2.28 wcsxfrm_l F
+GLIBC_2.28 wctob F
+GLIBC_2.28 wctomb F
+GLIBC_2.28 wctrans F
+GLIBC_2.28 wctrans_l F
+GLIBC_2.28 wctype F
+GLIBC_2.28 wctype_l F
+GLIBC_2.28 wcwidth F
+GLIBC_2.28 wmemchr F
+GLIBC_2.28 wmemcmp F
+GLIBC_2.28 wmemcpy F
+GLIBC_2.28 wmemmove F
+GLIBC_2.28 wmempcpy F
+GLIBC_2.28 wmemset F
+GLIBC_2.28 wordexp F
+GLIBC_2.28 wordfree F
+GLIBC_2.28 wprintf F
+GLIBC_2.28 write F
+GLIBC_2.28 writev F
+GLIBC_2.28 wscanf F
+GLIBC_2.28 xdecrypt F
+GLIBC_2.28 xdr_accepted_reply F
+GLIBC_2.28 xdr_array F
+GLIBC_2.28 xdr_authdes_cred F
+GLIBC_2.28 xdr_authdes_verf F
+GLIBC_2.28 xdr_authunix_parms F
+GLIBC_2.28 xdr_bool F
+GLIBC_2.28 xdr_bytes F
+GLIBC_2.28 xdr_callhdr F
+GLIBC_2.28 xdr_callmsg F
+GLIBC_2.28 xdr_char F
+GLIBC_2.28 xdr_cryptkeyarg F
+GLIBC_2.28 xdr_cryptkeyarg2 F
+GLIBC_2.28 xdr_cryptkeyres F
+GLIBC_2.28 xdr_des_block F
+GLIBC_2.28 xdr_double F
+GLIBC_2.28 xdr_enum F
+GLIBC_2.28 xdr_float F
+GLIBC_2.28 xdr_free F
+GLIBC_2.28 xdr_getcredres F
+GLIBC_2.28 xdr_hyper F
+GLIBC_2.28 xdr_int F
+GLIBC_2.28 xdr_int16_t F
+GLIBC_2.28 xdr_int32_t F
+GLIBC_2.28 xdr_int64_t F
+GLIBC_2.28 xdr_int8_t F
+GLIBC_2.28 xdr_key_netstarg F
+GLIBC_2.28 xdr_key_netstres F
+GLIBC_2.28 xdr_keybuf F
+GLIBC_2.28 xdr_keystatus F
+GLIBC_2.28 xdr_long F
+GLIBC_2.28 xdr_longlong_t F
+GLIBC_2.28 xdr_netnamestr F
+GLIBC_2.28 xdr_netobj F
+GLIBC_2.28 xdr_opaque F
+GLIBC_2.28 xdr_opaque_auth F
+GLIBC_2.28 xdr_pmap F
+GLIBC_2.28 xdr_pmaplist F
+GLIBC_2.28 xdr_pointer F
+GLIBC_2.28 xdr_quad_t F
+GLIBC_2.28 xdr_reference F
+GLIBC_2.28 xdr_rejected_reply F
+GLIBC_2.28 xdr_replymsg F
+GLIBC_2.28 xdr_rmtcall_args F
+GLIBC_2.28 xdr_rmtcallres F
+GLIBC_2.28 xdr_short F
+GLIBC_2.28 xdr_sizeof F
+GLIBC_2.28 xdr_string F
+GLIBC_2.28 xdr_u_char F
+GLIBC_2.28 xdr_u_hyper F
+GLIBC_2.28 xdr_u_int F
+GLIBC_2.28 xdr_u_long F
+GLIBC_2.28 xdr_u_longlong_t F
+GLIBC_2.28 xdr_u_quad_t F
+GLIBC_2.28 xdr_u_short F
+GLIBC_2.28 xdr_uint16_t F
+GLIBC_2.28 xdr_uint32_t F
+GLIBC_2.28 xdr_uint64_t F
+GLIBC_2.28 xdr_uint8_t F
+GLIBC_2.28 xdr_union F
+GLIBC_2.28 xdr_unixcred F
+GLIBC_2.28 xdr_vector F
+GLIBC_2.28 xdr_void F
+GLIBC_2.28 xdr_wrapstring F
+GLIBC_2.28 xdrmem_create F
+GLIBC_2.28 xdrrec_create F
+GLIBC_2.28 xdrrec_endofrecord F
+GLIBC_2.28 xdrrec_eof F
+GLIBC_2.28 xdrrec_skiprecord F
+GLIBC_2.28 xdrstdio_create F
+GLIBC_2.28 xencrypt F
+GLIBC_2.28 xprt_register F
+GLIBC_2.28 xprt_unregister F
diff --git a/sysdeps/unix/sysv/linux/csky/libcrypt.abilist b/sysdeps/unix/sysv/linux/csky/libcrypt.abilist
new file mode 100644
index 0000000..4cf2ba1
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/csky/libcrypt.abilist
@@ -0,0 +1,7 @@
+GLIBC_2.28 crypt F
+GLIBC_2.28 crypt_r F
+GLIBC_2.28 encrypt F
+GLIBC_2.28 encrypt_r F
+GLIBC_2.28 fcrypt F
+GLIBC_2.28 setkey F
+GLIBC_2.28 setkey_r F
diff --git a/sysdeps/unix/sysv/linux/csky/libdl.abilist b/sysdeps/unix/sysv/linux/csky/libdl.abilist
new file mode 100644
index 0000000..41b4dea
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/csky/libdl.abilist
@@ -0,0 +1,9 @@
+GLIBC_2.28 dladdr F
+GLIBC_2.28 dladdr1 F
+GLIBC_2.28 dlclose F
+GLIBC_2.28 dlerror F
+GLIBC_2.28 dlinfo F
+GLIBC_2.28 dlmopen F
+GLIBC_2.28 dlopen F
+GLIBC_2.28 dlsym F
+GLIBC_2.28 dlvsym F
diff --git a/sysdeps/unix/sysv/linux/csky/libm.abilist b/sysdeps/unix/sysv/linux/csky/libm.abilist
new file mode 100644
index 0000000..bc773fa
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/csky/libm.abilist
@@ -0,0 +1,753 @@
+GLIBC_2.28 __acos_finite F
+GLIBC_2.28 __acosf_finite F
+GLIBC_2.28 __acosh_finite F
+GLIBC_2.28 __acoshf_finite F
+GLIBC_2.28 __asin_finite F
+GLIBC_2.28 __asinf_finite F
+GLIBC_2.28 __atan2_finite F
+GLIBC_2.28 __atan2f_finite F
+GLIBC_2.28 __atanh_finite F
+GLIBC_2.28 __atanhf_finite F
+GLIBC_2.28 __clog10 F
+GLIBC_2.28 __clog10f F
+GLIBC_2.28 __clog10l F
+GLIBC_2.28 __cosh_finite F
+GLIBC_2.28 __coshf_finite F
+GLIBC_2.28 __exp10_finite F
+GLIBC_2.28 __exp10f_finite F
+GLIBC_2.28 __exp2_finite F
+GLIBC_2.28 __exp2f_finite F
+GLIBC_2.28 __exp_finite F
+GLIBC_2.28 __expf_finite F
+GLIBC_2.28 __finite F
+GLIBC_2.28 __finitef F
+GLIBC_2.28 __fmod_finite F
+GLIBC_2.28 __fmodf_finite F
+GLIBC_2.28 __fpclassify F
+GLIBC_2.28 __fpclassifyf F
+GLIBC_2.28 __gamma_r_finite F
+GLIBC_2.28 __gammaf_r_finite F
+GLIBC_2.28 __hypot_finite F
+GLIBC_2.28 __hypotf_finite F
+GLIBC_2.28 __iseqsig F
+GLIBC_2.28 __iseqsigf F
+GLIBC_2.28 __issignaling F
+GLIBC_2.28 __issignalingf F
+GLIBC_2.28 __j0_finite F
+GLIBC_2.28 __j0f_finite F
+GLIBC_2.28 __j1_finite F
+GLIBC_2.28 __j1f_finite F
+GLIBC_2.28 __jn_finite F
+GLIBC_2.28 __jnf_finite F
+GLIBC_2.28 __lgamma_r_finite F
+GLIBC_2.28 __lgammaf_r_finite F
+GLIBC_2.28 __log10_finite F
+GLIBC_2.28 __log10f_finite F
+GLIBC_2.28 __log2_finite F
+GLIBC_2.28 __log2f_finite F
+GLIBC_2.28 __log_finite F
+GLIBC_2.28 __logf_finite F
+GLIBC_2.28 __pow_finite F
+GLIBC_2.28 __powf_finite F
+GLIBC_2.28 __remainder_finite F
+GLIBC_2.28 __remainderf_finite F
+GLIBC_2.28 __scalb_finite F
+GLIBC_2.28 __scalbf_finite F
+GLIBC_2.28 __signbit F
+GLIBC_2.28 __signbitf F
+GLIBC_2.28 __signgam D 0x4
+GLIBC_2.28 __sinh_finite F
+GLIBC_2.28 __sinhf_finite F
+GLIBC_2.28 __sqrt_finite F
+GLIBC_2.28 __sqrtf_finite F
+GLIBC_2.28 __y0_finite F
+GLIBC_2.28 __y0f_finite F
+GLIBC_2.28 __y1_finite F
+GLIBC_2.28 __y1f_finite F
+GLIBC_2.28 __yn_finite F
+GLIBC_2.28 __ynf_finite F
+GLIBC_2.28 acos F
+GLIBC_2.28 acosf F
+GLIBC_2.28 acosf32 F
+GLIBC_2.28 acosf32x F
+GLIBC_2.28 acosf64 F
+GLIBC_2.28 acosh F
+GLIBC_2.28 acoshf F
+GLIBC_2.28 acoshf32 F
+GLIBC_2.28 acoshf32x F
+GLIBC_2.28 acoshf64 F
+GLIBC_2.28 acoshl F
+GLIBC_2.28 acosl F
+GLIBC_2.28 asin F
+GLIBC_2.28 asinf F
+GLIBC_2.28 asinf32 F
+GLIBC_2.28 asinf32x F
+GLIBC_2.28 asinf64 F
+GLIBC_2.28 asinh F
+GLIBC_2.28 asinhf F
+GLIBC_2.28 asinhf32 F
+GLIBC_2.28 asinhf32x F
+GLIBC_2.28 asinhf64 F
+GLIBC_2.28 asinhl F
+GLIBC_2.28 asinl F
+GLIBC_2.28 atan F
+GLIBC_2.28 atan2 F
+GLIBC_2.28 atan2f F
+GLIBC_2.28 atan2f32 F
+GLIBC_2.28 atan2f32x F
+GLIBC_2.28 atan2f64 F
+GLIBC_2.28 atan2l F
+GLIBC_2.28 atanf F
+GLIBC_2.28 atanf32 F
+GLIBC_2.28 atanf32x F
+GLIBC_2.28 atanf64 F
+GLIBC_2.28 atanh F
+GLIBC_2.28 atanhf F
+GLIBC_2.28 atanhf32 F
+GLIBC_2.28 atanhf32x F
+GLIBC_2.28 atanhf64 F
+GLIBC_2.28 atanhl F
+GLIBC_2.28 atanl F
+GLIBC_2.28 cabs F
+GLIBC_2.28 cabsf F
+GLIBC_2.28 cabsf32 F
+GLIBC_2.28 cabsf32x F
+GLIBC_2.28 cabsf64 F
+GLIBC_2.28 cabsl F
+GLIBC_2.28 cacos F
+GLIBC_2.28 cacosf F
+GLIBC_2.28 cacosf32 F
+GLIBC_2.28 cacosf32x F
+GLIBC_2.28 cacosf64 F
+GLIBC_2.28 cacosh F
+GLIBC_2.28 cacoshf F
+GLIBC_2.28 cacoshf32 F
+GLIBC_2.28 cacoshf32x F
+GLIBC_2.28 cacoshf64 F
+GLIBC_2.28 cacoshl F
+GLIBC_2.28 cacosl F
+GLIBC_2.28 canonicalize F
+GLIBC_2.28 canonicalizef F
+GLIBC_2.28 canonicalizef32 F
+GLIBC_2.28 canonicalizef32x F
+GLIBC_2.28 canonicalizef64 F
+GLIBC_2.28 canonicalizel F
+GLIBC_2.28 carg F
+GLIBC_2.28 cargf F
+GLIBC_2.28 cargf32 F
+GLIBC_2.28 cargf32x F
+GLIBC_2.28 cargf64 F
+GLIBC_2.28 cargl F
+GLIBC_2.28 casin F
+GLIBC_2.28 casinf F
+GLIBC_2.28 casinf32 F
+GLIBC_2.28 casinf32x F
+GLIBC_2.28 casinf64 F
+GLIBC_2.28 casinh F
+GLIBC_2.28 casinhf F
+GLIBC_2.28 casinhf32 F
+GLIBC_2.28 casinhf32x F
+GLIBC_2.28 casinhf64 F
+GLIBC_2.28 casinhl F
+GLIBC_2.28 casinl F
+GLIBC_2.28 catan F
+GLIBC_2.28 catanf F
+GLIBC_2.28 catanf32 F
+GLIBC_2.28 catanf32x F
+GLIBC_2.28 catanf64 F
+GLIBC_2.28 catanh F
+GLIBC_2.28 catanhf F
+GLIBC_2.28 catanhf32 F
+GLIBC_2.28 catanhf32x F
+GLIBC_2.28 catanhf64 F
+GLIBC_2.28 catanhl F
+GLIBC_2.28 catanl F
+GLIBC_2.28 cbrt F
+GLIBC_2.28 cbrtf F
+GLIBC_2.28 cbrtf32 F
+GLIBC_2.28 cbrtf32x F
+GLIBC_2.28 cbrtf64 F
+GLIBC_2.28 cbrtl F
+GLIBC_2.28 ccos F
+GLIBC_2.28 ccosf F
+GLIBC_2.28 ccosf32 F
+GLIBC_2.28 ccosf32x F
+GLIBC_2.28 ccosf64 F
+GLIBC_2.28 ccosh F
+GLIBC_2.28 ccoshf F
+GLIBC_2.28 ccoshf32 F
+GLIBC_2.28 ccoshf32x F
+GLIBC_2.28 ccoshf64 F
+GLIBC_2.28 ccoshl F
+GLIBC_2.28 ccosl F
+GLIBC_2.28 ceil F
+GLIBC_2.28 ceilf F
+GLIBC_2.28 ceilf32 F
+GLIBC_2.28 ceilf32x F
+GLIBC_2.28 ceilf64 F
+GLIBC_2.28 ceill F
+GLIBC_2.28 cexp F
+GLIBC_2.28 cexpf F
+GLIBC_2.28 cexpf32 F
+GLIBC_2.28 cexpf32x F
+GLIBC_2.28 cexpf64 F
+GLIBC_2.28 cexpl F
+GLIBC_2.28 cimag F
+GLIBC_2.28 cimagf F
+GLIBC_2.28 cimagf32 F
+GLIBC_2.28 cimagf32x F
+GLIBC_2.28 cimagf64 F
+GLIBC_2.28 cimagl F
+GLIBC_2.28 clog F
+GLIBC_2.28 clog10 F
+GLIBC_2.28 clog10f F
+GLIBC_2.28 clog10f32 F
+GLIBC_2.28 clog10f32x F
+GLIBC_2.28 clog10f64 F
+GLIBC_2.28 clog10l F
+GLIBC_2.28 clogf F
+GLIBC_2.28 clogf32 F
+GLIBC_2.28 clogf32x F
+GLIBC_2.28 clogf64 F
+GLIBC_2.28 clogl F
+GLIBC_2.28 conj F
+GLIBC_2.28 conjf F
+GLIBC_2.28 conjf32 F
+GLIBC_2.28 conjf32x F
+GLIBC_2.28 conjf64 F
+GLIBC_2.28 conjl F
+GLIBC_2.28 copysign F
+GLIBC_2.28 copysignf F
+GLIBC_2.28 copysignf32 F
+GLIBC_2.28 copysignf32x F
+GLIBC_2.28 copysignf64 F
+GLIBC_2.28 copysignl F
+GLIBC_2.28 cos F
+GLIBC_2.28 cosf F
+GLIBC_2.28 cosf32 F
+GLIBC_2.28 cosf32x F
+GLIBC_2.28 cosf64 F
+GLIBC_2.28 cosh F
+GLIBC_2.28 coshf F
+GLIBC_2.28 coshf32 F
+GLIBC_2.28 coshf32x F
+GLIBC_2.28 coshf64 F
+GLIBC_2.28 coshl F
+GLIBC_2.28 cosl F
+GLIBC_2.28 cpow F
+GLIBC_2.28 cpowf F
+GLIBC_2.28 cpowf32 F
+GLIBC_2.28 cpowf32x F
+GLIBC_2.28 cpowf64 F
+GLIBC_2.28 cpowl F
+GLIBC_2.28 cproj F
+GLIBC_2.28 cprojf F
+GLIBC_2.28 cprojf32 F
+GLIBC_2.28 cprojf32x F
+GLIBC_2.28 cprojf64 F
+GLIBC_2.28 cprojl F
+GLIBC_2.28 creal F
+GLIBC_2.28 crealf F
+GLIBC_2.28 crealf32 F
+GLIBC_2.28 crealf32x F
+GLIBC_2.28 crealf64 F
+GLIBC_2.28 creall F
+GLIBC_2.28 csin F
+GLIBC_2.28 csinf F
+GLIBC_2.28 csinf32 F
+GLIBC_2.28 csinf32x F
+GLIBC_2.28 csinf64 F
+GLIBC_2.28 csinh F
+GLIBC_2.28 csinhf F
+GLIBC_2.28 csinhf32 F
+GLIBC_2.28 csinhf32x F
+GLIBC_2.28 csinhf64 F
+GLIBC_2.28 csinhl F
+GLIBC_2.28 csinl F
+GLIBC_2.28 csqrt F
+GLIBC_2.28 csqrtf F
+GLIBC_2.28 csqrtf32 F
+GLIBC_2.28 csqrtf32x F
+GLIBC_2.28 csqrtf64 F
+GLIBC_2.28 csqrtl F
+GLIBC_2.28 ctan F
+GLIBC_2.28 ctanf F
+GLIBC_2.28 ctanf32 F
+GLIBC_2.28 ctanf32x F
+GLIBC_2.28 ctanf64 F
+GLIBC_2.28 ctanh F
+GLIBC_2.28 ctanhf F
+GLIBC_2.28 ctanhf32 F
+GLIBC_2.28 ctanhf32x F
+GLIBC_2.28 ctanhf64 F
+GLIBC_2.28 ctanhl F
+GLIBC_2.28 ctanl F
+GLIBC_2.28 daddl F
+GLIBC_2.28 ddivl F
+GLIBC_2.28 dmull F
+GLIBC_2.28 drem F
+GLIBC_2.28 dremf F
+GLIBC_2.28 dreml F
+GLIBC_2.28 dsubl F
+GLIBC_2.28 erf F
+GLIBC_2.28 erfc F
+GLIBC_2.28 erfcf F
+GLIBC_2.28 erfcf32 F
+GLIBC_2.28 erfcf32x F
+GLIBC_2.28 erfcf64 F
+GLIBC_2.28 erfcl F
+GLIBC_2.28 erff F
+GLIBC_2.28 erff32 F
+GLIBC_2.28 erff32x F
+GLIBC_2.28 erff64 F
+GLIBC_2.28 erfl F
+GLIBC_2.28 exp F
+GLIBC_2.28 exp10 F
+GLIBC_2.28 exp10f F
+GLIBC_2.28 exp10f32 F
+GLIBC_2.28 exp10f32x F
+GLIBC_2.28 exp10f64 F
+GLIBC_2.28 exp10l F
+GLIBC_2.28 exp2 F
+GLIBC_2.28 exp2f F
+GLIBC_2.28 exp2f32 F
+GLIBC_2.28 exp2f32x F
+GLIBC_2.28 exp2f64 F
+GLIBC_2.28 exp2l F
+GLIBC_2.28 expf F
+GLIBC_2.28 expf32 F
+GLIBC_2.28 expf32x F
+GLIBC_2.28 expf64 F
+GLIBC_2.28 expl F
+GLIBC_2.28 expm1 F
+GLIBC_2.28 expm1f F
+GLIBC_2.28 expm1f32 F
+GLIBC_2.28 expm1f32x F
+GLIBC_2.28 expm1f64 F
+GLIBC_2.28 expm1l F
+GLIBC_2.28 f32addf32x F
+GLIBC_2.28 f32addf64 F
+GLIBC_2.28 f32divf32x F
+GLIBC_2.28 f32divf64 F
+GLIBC_2.28 f32mulf32x F
+GLIBC_2.28 f32mulf64 F
+GLIBC_2.28 f32subf32x F
+GLIBC_2.28 f32subf64 F
+GLIBC_2.28 f32xaddf64 F
+GLIBC_2.28 f32xdivf64 F
+GLIBC_2.28 f32xmulf64 F
+GLIBC_2.28 f32xsubf64 F
+GLIBC_2.28 fabs F
+GLIBC_2.28 fabsf F
+GLIBC_2.28 fabsf32 F
+GLIBC_2.28 fabsf32x F
+GLIBC_2.28 fabsf64 F
+GLIBC_2.28 fabsl F
+GLIBC_2.28 fadd F
+GLIBC_2.28 faddl F
+GLIBC_2.28 fdim F
+GLIBC_2.28 fdimf F
+GLIBC_2.28 fdimf32 F
+GLIBC_2.28 fdimf32x F
+GLIBC_2.28 fdimf64 F
+GLIBC_2.28 fdiml F
+GLIBC_2.28 fdiv F
+GLIBC_2.28 fdivl F
+GLIBC_2.28 feclearexcept F
+GLIBC_2.28 fedisableexcept F
+GLIBC_2.28 feenableexcept F
+GLIBC_2.28 fegetenv F
+GLIBC_2.28 fegetexcept F
+GLIBC_2.28 fegetexceptflag F
+GLIBC_2.28 fegetmode F
+GLIBC_2.28 fegetround F
+GLIBC_2.28 feholdexcept F
+GLIBC_2.28 feraiseexcept F
+GLIBC_2.28 fesetenv F
+GLIBC_2.28 fesetexcept F
+GLIBC_2.28 fesetexceptflag F
+GLIBC_2.28 fesetmode F
+GLIBC_2.28 fesetround F
+GLIBC_2.28 fetestexcept F
+GLIBC_2.28 fetestexceptflag F
+GLIBC_2.28 feupdateenv F
+GLIBC_2.28 finite F
+GLIBC_2.28 finitef F
+GLIBC_2.28 finitel F
+GLIBC_2.28 floor F
+GLIBC_2.28 floorf F
+GLIBC_2.28 floorf32 F
+GLIBC_2.28 floorf32x F
+GLIBC_2.28 floorf64 F
+GLIBC_2.28 floorl F
+GLIBC_2.28 fma F
+GLIBC_2.28 fmaf F
+GLIBC_2.28 fmaf32 F
+GLIBC_2.28 fmaf32x F
+GLIBC_2.28 fmaf64 F
+GLIBC_2.28 fmal F
+GLIBC_2.28 fmax F
+GLIBC_2.28 fmaxf F
+GLIBC_2.28 fmaxf32 F
+GLIBC_2.28 fmaxf32x F
+GLIBC_2.28 fmaxf64 F
+GLIBC_2.28 fmaxl F
+GLIBC_2.28 fmaxmag F
+GLIBC_2.28 fmaxmagf F
+GLIBC_2.28 fmaxmagf32 F
+GLIBC_2.28 fmaxmagf32x F
+GLIBC_2.28 fmaxmagf64 F
+GLIBC_2.28 fmaxmagl F
+GLIBC_2.28 fmin F
+GLIBC_2.28 fminf F
+GLIBC_2.28 fminf32 F
+GLIBC_2.28 fminf32x F
+GLIBC_2.28 fminf64 F
+GLIBC_2.28 fminl F
+GLIBC_2.28 fminmag F
+GLIBC_2.28 fminmagf F
+GLIBC_2.28 fminmagf32 F
+GLIBC_2.28 fminmagf32x F
+GLIBC_2.28 fminmagf64 F
+GLIBC_2.28 fminmagl F
+GLIBC_2.28 fmod F
+GLIBC_2.28 fmodf F
+GLIBC_2.28 fmodf32 F
+GLIBC_2.28 fmodf32x F
+GLIBC_2.28 fmodf64 F
+GLIBC_2.28 fmodl F
+GLIBC_2.28 fmul F
+GLIBC_2.28 fmull F
+GLIBC_2.28 frexp F
+GLIBC_2.28 frexpf F
+GLIBC_2.28 frexpf32 F
+GLIBC_2.28 frexpf32x F
+GLIBC_2.28 frexpf64 F
+GLIBC_2.28 frexpl F
+GLIBC_2.28 fromfp F
+GLIBC_2.28 fromfpf F
+GLIBC_2.28 fromfpf32 F
+GLIBC_2.28 fromfpf32x F
+GLIBC_2.28 fromfpf64 F
+GLIBC_2.28 fromfpl F
+GLIBC_2.28 fromfpx F
+GLIBC_2.28 fromfpxf F
+GLIBC_2.28 fromfpxf32 F
+GLIBC_2.28 fromfpxf32x F
+GLIBC_2.28 fromfpxf64 F
+GLIBC_2.28 fromfpxl F
+GLIBC_2.28 fsub F
+GLIBC_2.28 fsubl F
+GLIBC_2.28 gamma F
+GLIBC_2.28 gammaf F
+GLIBC_2.28 gammal F
+GLIBC_2.28 getpayload F
+GLIBC_2.28 getpayloadf F
+GLIBC_2.28 getpayloadf32 F
+GLIBC_2.28 getpayloadf32x F
+GLIBC_2.28 getpayloadf64 F
+GLIBC_2.28 getpayloadl F
+GLIBC_2.28 hypot F
+GLIBC_2.28 hypotf F
+GLIBC_2.28 hypotf32 F
+GLIBC_2.28 hypotf32x F
+GLIBC_2.28 hypotf64 F
+GLIBC_2.28 hypotl F
+GLIBC_2.28 ilogb F
+GLIBC_2.28 ilogbf F
+GLIBC_2.28 ilogbf32 F
+GLIBC_2.28 ilogbf32x F
+GLIBC_2.28 ilogbf64 F
+GLIBC_2.28 ilogbl F
+GLIBC_2.28 j0 F
+GLIBC_2.28 j0f F
+GLIBC_2.28 j0f32 F
+GLIBC_2.28 j0f32x F
+GLIBC_2.28 j0f64 F
+GLIBC_2.28 j0l F
+GLIBC_2.28 j1 F
+GLIBC_2.28 j1f F
+GLIBC_2.28 j1f32 F
+GLIBC_2.28 j1f32x F
+GLIBC_2.28 j1f64 F
+GLIBC_2.28 j1l F
+GLIBC_2.28 jn F
+GLIBC_2.28 jnf F
+GLIBC_2.28 jnf32 F
+GLIBC_2.28 jnf32x F
+GLIBC_2.28 jnf64 F
+GLIBC_2.28 jnl F
+GLIBC_2.28 ldexp F
+GLIBC_2.28 ldexpf F
+GLIBC_2.28 ldexpf32 F
+GLIBC_2.28 ldexpf32x F
+GLIBC_2.28 ldexpf64 F
+GLIBC_2.28 ldexpl F
+GLIBC_2.28 lgamma F
+GLIBC_2.28 lgamma_r F
+GLIBC_2.28 lgammaf F
+GLIBC_2.28 lgammaf32 F
+GLIBC_2.28 lgammaf32_r F
+GLIBC_2.28 lgammaf32x F
+GLIBC_2.28 lgammaf32x_r F
+GLIBC_2.28 lgammaf64 F
+GLIBC_2.28 lgammaf64_r F
+GLIBC_2.28 lgammaf_r F
+GLIBC_2.28 lgammal F
+GLIBC_2.28 lgammal_r F
+GLIBC_2.28 llogb F
+GLIBC_2.28 llogbf F
+GLIBC_2.28 llogbf32 F
+GLIBC_2.28 llogbf32x F
+GLIBC_2.28 llogbf64 F
+GLIBC_2.28 llogbl F
+GLIBC_2.28 llrint F
+GLIBC_2.28 llrintf F
+GLIBC_2.28 llrintf32 F
+GLIBC_2.28 llrintf32x F
+GLIBC_2.28 llrintf64 F
+GLIBC_2.28 llrintl F
+GLIBC_2.28 llround F
+GLIBC_2.28 llroundf F
+GLIBC_2.28 llroundf32 F
+GLIBC_2.28 llroundf32x F
+GLIBC_2.28 llroundf64 F
+GLIBC_2.28 llroundl F
+GLIBC_2.28 log F
+GLIBC_2.28 log10 F
+GLIBC_2.28 log10f F
+GLIBC_2.28 log10f32 F
+GLIBC_2.28 log10f32x F
+GLIBC_2.28 log10f64 F
+GLIBC_2.28 log10l F
+GLIBC_2.28 log1p F
+GLIBC_2.28 log1pf F
+GLIBC_2.28 log1pf32 F
+GLIBC_2.28 log1pf32x F
+GLIBC_2.28 log1pf64 F
+GLIBC_2.28 log1pl F
+GLIBC_2.28 log2 F
+GLIBC_2.28 log2f F
+GLIBC_2.28 log2f32 F
+GLIBC_2.28 log2f32x F
+GLIBC_2.28 log2f64 F
+GLIBC_2.28 log2l F
+GLIBC_2.28 logb F
+GLIBC_2.28 logbf F
+GLIBC_2.28 logbf32 F
+GLIBC_2.28 logbf32x F
+GLIBC_2.28 logbf64 F
+GLIBC_2.28 logbl F
+GLIBC_2.28 logf F
+GLIBC_2.28 logf32 F
+GLIBC_2.28 logf32x F
+GLIBC_2.28 logf64 F
+GLIBC_2.28 logl F
+GLIBC_2.28 lrint F
+GLIBC_2.28 lrintf F
+GLIBC_2.28 lrintf32 F
+GLIBC_2.28 lrintf32x F
+GLIBC_2.28 lrintf64 F
+GLIBC_2.28 lrintl F
+GLIBC_2.28 lround F
+GLIBC_2.28 lroundf F
+GLIBC_2.28 lroundf32 F
+GLIBC_2.28 lroundf32x F
+GLIBC_2.28 lroundf64 F
+GLIBC_2.28 lroundl F
+GLIBC_2.28 modf F
+GLIBC_2.28 modff F
+GLIBC_2.28 modff32 F
+GLIBC_2.28 modff32x F
+GLIBC_2.28 modff64 F
+GLIBC_2.28 modfl F
+GLIBC_2.28 nan F
+GLIBC_2.28 nanf F
+GLIBC_2.28 nanf32 F
+GLIBC_2.28 nanf32x F
+GLIBC_2.28 nanf64 F
+GLIBC_2.28 nanl F
+GLIBC_2.28 nearbyint F
+GLIBC_2.28 nearbyintf F
+GLIBC_2.28 nearbyintf32 F
+GLIBC_2.28 nearbyintf32x F
+GLIBC_2.28 nearbyintf64 F
+GLIBC_2.28 nearbyintl F
+GLIBC_2.28 nextafter F
+GLIBC_2.28 nextafterf F
+GLIBC_2.28 nextafterf32 F
+GLIBC_2.28 nextafterf32x F
+GLIBC_2.28 nextafterf64 F
+GLIBC_2.28 nextafterl F
+GLIBC_2.28 nextdown F
+GLIBC_2.28 nextdownf F
+GLIBC_2.28 nextdownf32 F
+GLIBC_2.28 nextdownf32x F
+GLIBC_2.28 nextdownf64 F
+GLIBC_2.28 nextdownl F
+GLIBC_2.28 nexttoward F
+GLIBC_2.28 nexttowardf F
+GLIBC_2.28 nexttowardl F
+GLIBC_2.28 nextup F
+GLIBC_2.28 nextupf F
+GLIBC_2.28 nextupf32 F
+GLIBC_2.28 nextupf32x F
+GLIBC_2.28 nextupf64 F
+GLIBC_2.28 nextupl F
+GLIBC_2.28 pow F
+GLIBC_2.28 powf F
+GLIBC_2.28 powf32 F
+GLIBC_2.28 powf32x F
+GLIBC_2.28 powf64 F
+GLIBC_2.28 powl F
+GLIBC_2.28 remainder F
+GLIBC_2.28 remainderf F
+GLIBC_2.28 remainderf32 F
+GLIBC_2.28 remainderf32x F
+GLIBC_2.28 remainderf64 F
+GLIBC_2.28 remainderl F
+GLIBC_2.28 remquo F
+GLIBC_2.28 remquof F
+GLIBC_2.28 remquof32 F
+GLIBC_2.28 remquof32x F
+GLIBC_2.28 remquof64 F
+GLIBC_2.28 remquol F
+GLIBC_2.28 rint F
+GLIBC_2.28 rintf F
+GLIBC_2.28 rintf32 F
+GLIBC_2.28 rintf32x F
+GLIBC_2.28 rintf64 F
+GLIBC_2.28 rintl F
+GLIBC_2.28 round F
+GLIBC_2.28 roundeven F
+GLIBC_2.28 roundevenf F
+GLIBC_2.28 roundevenf32 F
+GLIBC_2.28 roundevenf32x F
+GLIBC_2.28 roundevenf64 F
+GLIBC_2.28 roundevenl F
+GLIBC_2.28 roundf F
+GLIBC_2.28 roundf32 F
+GLIBC_2.28 roundf32x F
+GLIBC_2.28 roundf64 F
+GLIBC_2.28 roundl F
+GLIBC_2.28 scalb F
+GLIBC_2.28 scalbf F
+GLIBC_2.28 scalbl F
+GLIBC_2.28 scalbln F
+GLIBC_2.28 scalblnf F
+GLIBC_2.28 scalblnf32 F
+GLIBC_2.28 scalblnf32x F
+GLIBC_2.28 scalblnf64 F
+GLIBC_2.28 scalblnl F
+GLIBC_2.28 scalbn F
+GLIBC_2.28 scalbnf F
+GLIBC_2.28 scalbnf32 F
+GLIBC_2.28 scalbnf32x F
+GLIBC_2.28 scalbnf64 F
+GLIBC_2.28 scalbnl F
+GLIBC_2.28 setpayload F
+GLIBC_2.28 setpayloadf F
+GLIBC_2.28 setpayloadf32 F
+GLIBC_2.28 setpayloadf32x F
+GLIBC_2.28 setpayloadf64 F
+GLIBC_2.28 setpayloadl F
+GLIBC_2.28 setpayloadsig F
+GLIBC_2.28 setpayloadsigf F
+GLIBC_2.28 setpayloadsigf32 F
+GLIBC_2.28 setpayloadsigf32x F
+GLIBC_2.28 setpayloadsigf64 F
+GLIBC_2.28 setpayloadsigl F
+GLIBC_2.28 signgam D 0x4
+GLIBC_2.28 significand F
+GLIBC_2.28 significandf F
+GLIBC_2.28 significandl F
+GLIBC_2.28 sin F
+GLIBC_2.28 sincos F
+GLIBC_2.28 sincosf F
+GLIBC_2.28 sincosf32 F
+GLIBC_2.28 sincosf32x F
+GLIBC_2.28 sincosf64 F
+GLIBC_2.28 sincosl F
+GLIBC_2.28 sinf F
+GLIBC_2.28 sinf32 F
+GLIBC_2.28 sinf32x F
+GLIBC_2.28 sinf64 F
+GLIBC_2.28 sinh F
+GLIBC_2.28 sinhf F
+GLIBC_2.28 sinhf32 F
+GLIBC_2.28 sinhf32x F
+GLIBC_2.28 sinhf64 F
+GLIBC_2.28 sinhl F
+GLIBC_2.28 sinl F
+GLIBC_2.28 sqrt F
+GLIBC_2.28 sqrtf F
+GLIBC_2.28 sqrtf32 F
+GLIBC_2.28 sqrtf32x F
+GLIBC_2.28 sqrtf64 F
+GLIBC_2.28 sqrtl F
+GLIBC_2.28 tan F
+GLIBC_2.28 tanf F
+GLIBC_2.28 tanf32 F
+GLIBC_2.28 tanf32x F
+GLIBC_2.28 tanf64 F
+GLIBC_2.28 tanh F
+GLIBC_2.28 tanhf F
+GLIBC_2.28 tanhf32 F
+GLIBC_2.28 tanhf32x F
+GLIBC_2.28 tanhf64 F
+GLIBC_2.28 tanhl F
+GLIBC_2.28 tanl F
+GLIBC_2.28 tgamma F
+GLIBC_2.28 tgammaf F
+GLIBC_2.28 tgammaf32 F
+GLIBC_2.28 tgammaf32x F
+GLIBC_2.28 tgammaf64 F
+GLIBC_2.28 tgammal F
+GLIBC_2.28 totalorder F
+GLIBC_2.28 totalorderf F
+GLIBC_2.28 totalorderf32 F
+GLIBC_2.28 totalorderf32x F
+GLIBC_2.28 totalorderf64 F
+GLIBC_2.28 totalorderl F
+GLIBC_2.28 totalordermag F
+GLIBC_2.28 totalordermagf F
+GLIBC_2.28 totalordermagf32 F
+GLIBC_2.28 totalordermagf32x F
+GLIBC_2.28 totalordermagf64 F
+GLIBC_2.28 totalordermagl F
+GLIBC_2.28 trunc F
+GLIBC_2.28 truncf F
+GLIBC_2.28 truncf32 F
+GLIBC_2.28 truncf32x F
+GLIBC_2.28 truncf64 F
+GLIBC_2.28 truncl F
+GLIBC_2.28 ufromfp F
+GLIBC_2.28 ufromfpf F
+GLIBC_2.28 ufromfpf32 F
+GLIBC_2.28 ufromfpf32x F
+GLIBC_2.28 ufromfpf64 F
+GLIBC_2.28 ufromfpl F
+GLIBC_2.28 ufromfpx F
+GLIBC_2.28 ufromfpxf F
+GLIBC_2.28 ufromfpxf32 F
+GLIBC_2.28 ufromfpxf32x F
+GLIBC_2.28 ufromfpxf64 F
+GLIBC_2.28 ufromfpxl F
+GLIBC_2.28 y0 F
+GLIBC_2.28 y0f F
+GLIBC_2.28 y0f32 F
+GLIBC_2.28 y0f32x F
+GLIBC_2.28 y0f64 F
+GLIBC_2.28 y0l F
+GLIBC_2.28 y1 F
+GLIBC_2.28 y1f F
+GLIBC_2.28 y1f32 F
+GLIBC_2.28 y1f32x F
+GLIBC_2.28 y1f64 F
+GLIBC_2.28 y1l F
+GLIBC_2.28 yn F
+GLIBC_2.28 ynf F
+GLIBC_2.28 ynf32 F
+GLIBC_2.28 ynf32x F
+GLIBC_2.28 ynf64 F
+GLIBC_2.28 ynl F
diff --git a/sysdeps/unix/sysv/linux/csky/libnsl.abilist b/sysdeps/unix/sysv/linux/csky/libnsl.abilist
new file mode 100644
index 0000000..02b389f
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/csky/libnsl.abilist
@@ -0,0 +1,120 @@
+GLIBC_2.28 __free_fdresult F
+GLIBC_2.28 __nis_default_access F
+GLIBC_2.28 __nis_default_group F
+GLIBC_2.28 __nis_default_owner F
+GLIBC_2.28 __nis_default_ttl F
+GLIBC_2.28 __nis_finddirectory F
+GLIBC_2.28 __nisbind_connect F
+GLIBC_2.28 __nisbind_create F
+GLIBC_2.28 __nisbind_destroy F
+GLIBC_2.28 __nisbind_next F
+GLIBC_2.28 __yp_check F
+GLIBC_2.28 nis_add F
+GLIBC_2.28 nis_add_entry F
+GLIBC_2.28 nis_addmember F
+GLIBC_2.28 nis_checkpoint F
+GLIBC_2.28 nis_clone_directory F
+GLIBC_2.28 nis_clone_object F
+GLIBC_2.28 nis_clone_result F
+GLIBC_2.28 nis_creategroup F
+GLIBC_2.28 nis_destroy_object F
+GLIBC_2.28 nis_destroygroup F
+GLIBC_2.28 nis_dir_cmp F
+GLIBC_2.28 nis_domain_of F
+GLIBC_2.28 nis_domain_of_r F
+GLIBC_2.28 nis_first_entry F
+GLIBC_2.28 nis_free_directory F
+GLIBC_2.28 nis_free_object F
+GLIBC_2.28 nis_free_request F
+GLIBC_2.28 nis_freenames F
+GLIBC_2.28 nis_freeresult F
+GLIBC_2.28 nis_freeservlist F
+GLIBC_2.28 nis_freetags F
+GLIBC_2.28 nis_getnames F
+GLIBC_2.28 nis_getservlist F
+GLIBC_2.28 nis_ismember F
+GLIBC_2.28 nis_leaf_of F
+GLIBC_2.28 nis_leaf_of_r F
+GLIBC_2.28 nis_lerror F
+GLIBC_2.28 nis_list F
+GLIBC_2.28 nis_local_directory F
+GLIBC_2.28 nis_local_group F
+GLIBC_2.28 nis_local_host F
+GLIBC_2.28 nis_local_principal F
+GLIBC_2.28 nis_lookup F
+GLIBC_2.28 nis_mkdir F
+GLIBC_2.28 nis_modify F
+GLIBC_2.28 nis_modify_entry F
+GLIBC_2.28 nis_name_of F
+GLIBC_2.28 nis_name_of_r F
+GLIBC_2.28 nis_next_entry F
+GLIBC_2.28 nis_perror F
+GLIBC_2.28 nis_ping F
+GLIBC_2.28 nis_print_directory F
+GLIBC_2.28 nis_print_entry F
+GLIBC_2.28 nis_print_group F
+GLIBC_2.28 nis_print_group_entry F
+GLIBC_2.28 nis_print_link F
+GLIBC_2.28 nis_print_object F
+GLIBC_2.28 nis_print_result F
+GLIBC_2.28 nis_print_rights F
+GLIBC_2.28 nis_print_table F
+GLIBC_2.28 nis_read_obj F
+GLIBC_2.28 nis_remove F
+GLIBC_2.28 nis_remove_entry F
+GLIBC_2.28 nis_removemember F
+GLIBC_2.28 nis_rmdir F
+GLIBC_2.28 nis_servstate F
+GLIBC_2.28 nis_sperrno F
+GLIBC_2.28 nis_sperror F
+GLIBC_2.28 nis_sperror_r F
+GLIBC_2.28 nis_stats F
+GLIBC_2.28 nis_verifygroup F
+GLIBC_2.28 nis_write_obj F
+GLIBC_2.28 readColdStartFile F
+GLIBC_2.28 writeColdStartFile F
+GLIBC_2.28 xdr_cback_data F
+GLIBC_2.28 xdr_domainname F
+GLIBC_2.28 xdr_keydat F
+GLIBC_2.28 xdr_mapname F
+GLIBC_2.28 xdr_obj_p F
+GLIBC_2.28 xdr_peername F
+GLIBC_2.28 xdr_valdat F
+GLIBC_2.28 xdr_yp_buf F
+GLIBC_2.28 xdr_ypall F
+GLIBC_2.28 xdr_ypbind_binding F
+GLIBC_2.28 xdr_ypbind_resp F
+GLIBC_2.28 xdr_ypbind_resptype F
+GLIBC_2.28 xdr_ypbind_setdom F
+GLIBC_2.28 xdr_ypdelete_args F
+GLIBC_2.28 xdr_ypmap_parms F
+GLIBC_2.28 xdr_ypmaplist F
+GLIBC_2.28 xdr_yppush_status F
+GLIBC_2.28 xdr_yppushresp_xfr F
+GLIBC_2.28 xdr_ypreq_key F
+GLIBC_2.28 xdr_ypreq_nokey F
+GLIBC_2.28 xdr_ypreq_xfr F
+GLIBC_2.28 xdr_ypresp_all F
+GLIBC_2.28 xdr_ypresp_key_val F
+GLIBC_2.28 xdr_ypresp_maplist F
+GLIBC_2.28 xdr_ypresp_master F
+GLIBC_2.28 xdr_ypresp_order F
+GLIBC_2.28 xdr_ypresp_val F
+GLIBC_2.28 xdr_ypresp_xfr F
+GLIBC_2.28 xdr_ypstat F
+GLIBC_2.28 xdr_ypupdate_args F
+GLIBC_2.28 xdr_ypxfrstat F
+GLIBC_2.28 yp_all F
+GLIBC_2.28 yp_bind F
+GLIBC_2.28 yp_first F
+GLIBC_2.28 yp_get_default_domain F
+GLIBC_2.28 yp_maplist F
+GLIBC_2.28 yp_master F
+GLIBC_2.28 yp_match F
+GLIBC_2.28 yp_next F
+GLIBC_2.28 yp_order F
+GLIBC_2.28 yp_unbind F
+GLIBC_2.28 yp_update F
+GLIBC_2.28 ypbinderr_string F
+GLIBC_2.28 yperr_string F
+GLIBC_2.28 ypprot_err F
diff --git a/sysdeps/unix/sysv/linux/csky/libpthread.abilist b/sysdeps/unix/sysv/linux/csky/libpthread.abilist
new file mode 100644
index 0000000..1250e34
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/csky/libpthread.abilist
@@ -0,0 +1,216 @@
+GLIBC_2.28 _IO_flockfile F
+GLIBC_2.28 _IO_ftrylockfile F
+GLIBC_2.28 _IO_funlockfile F
+GLIBC_2.28 __close F
+GLIBC_2.28 __connect F
+GLIBC_2.28 __errno_location F
+GLIBC_2.28 __fcntl F
+GLIBC_2.28 __h_errno_location F
+GLIBC_2.28 __libc_allocate_rtsig F
+GLIBC_2.28 __libc_current_sigrtmax F
+GLIBC_2.28 __libc_current_sigrtmin F
+GLIBC_2.28 __lseek F
+GLIBC_2.28 __nanosleep F
+GLIBC_2.28 __open F
+GLIBC_2.28 __open64 F
+GLIBC_2.28 __pread64 F
+GLIBC_2.28 __pthread_cleanup_routine F
+GLIBC_2.28 __pthread_getspecific F
+GLIBC_2.28 __pthread_key_create F
+GLIBC_2.28 __pthread_mutex_destroy F
+GLIBC_2.28 __pthread_mutex_init F
+GLIBC_2.28 __pthread_mutex_lock F
+GLIBC_2.28 __pthread_mutex_trylock F
+GLIBC_2.28 __pthread_mutex_unlock F
+GLIBC_2.28 __pthread_mutexattr_destroy F
+GLIBC_2.28 __pthread_mutexattr_init F
+GLIBC_2.28 __pthread_mutexattr_settype F
+GLIBC_2.28 __pthread_once F
+GLIBC_2.28 __pthread_register_cancel F
+GLIBC_2.28 __pthread_register_cancel_defer F
+GLIBC_2.28 __pthread_rwlock_destroy F
+GLIBC_2.28 __pthread_rwlock_init F
+GLIBC_2.28 __pthread_rwlock_rdlock F
+GLIBC_2.28 __pthread_rwlock_tryrdlock F
+GLIBC_2.28 __pthread_rwlock_trywrlock F
+GLIBC_2.28 __pthread_rwlock_unlock F
+GLIBC_2.28 __pthread_rwlock_wrlock F
+GLIBC_2.28 __pthread_setspecific F
+GLIBC_2.28 __pthread_unregister_cancel F
+GLIBC_2.28 __pthread_unregister_cancel_restore F
+GLIBC_2.28 __pthread_unwind_next F
+GLIBC_2.28 __pwrite64 F
+GLIBC_2.28 __read F
+GLIBC_2.28 __res_state F
+GLIBC_2.28 __send F
+GLIBC_2.28 __sigaction F
+GLIBC_2.28 __wait F
+GLIBC_2.28 __write F
+GLIBC_2.28 _pthread_cleanup_pop F
+GLIBC_2.28 _pthread_cleanup_pop_restore F
+GLIBC_2.28 _pthread_cleanup_push F
+GLIBC_2.28 _pthread_cleanup_push_defer F
+GLIBC_2.28 accept F
+GLIBC_2.28 close F
+GLIBC_2.28 connect F
+GLIBC_2.28 fcntl F
+GLIBC_2.28 flockfile F
+GLIBC_2.28 fsync F
+GLIBC_2.28 ftrylockfile F
+GLIBC_2.28 funlockfile F
+GLIBC_2.28 lseek F
+GLIBC_2.28 lseek64 F
+GLIBC_2.28 msync F
+GLIBC_2.28 nanosleep F
+GLIBC_2.28 open F
+GLIBC_2.28 open64 F
+GLIBC_2.28 pause F
+GLIBC_2.28 pread F
+GLIBC_2.28 pread64 F
+GLIBC_2.28 pthread_attr_destroy F
+GLIBC_2.28 pthread_attr_getaffinity_np F
+GLIBC_2.28 pthread_attr_getdetachstate F
+GLIBC_2.28 pthread_attr_getguardsize F
+GLIBC_2.28 pthread_attr_getinheritsched F
+GLIBC_2.28 pthread_attr_getschedparam F
+GLIBC_2.28 pthread_attr_getschedpolicy F
+GLIBC_2.28 pthread_attr_getscope F
+GLIBC_2.28 pthread_attr_getstack F
+GLIBC_2.28 pthread_attr_getstackaddr F
+GLIBC_2.28 pthread_attr_getstacksize F
+GLIBC_2.28 pthread_attr_init F
+GLIBC_2.28 pthread_attr_setaffinity_np F
+GLIBC_2.28 pthread_attr_setdetachstate F
+GLIBC_2.28 pthread_attr_setguardsize F
+GLIBC_2.28 pthread_attr_setinheritsched F
+GLIBC_2.28 pthread_attr_setschedparam F
+GLIBC_2.28 pthread_attr_setschedpolicy F
+GLIBC_2.28 pthread_attr_setscope F
+GLIBC_2.28 pthread_attr_setstack F
+GLIBC_2.28 pthread_attr_setstackaddr F
+GLIBC_2.28 pthread_attr_setstacksize F
+GLIBC_2.28 pthread_barrier_destroy F
+GLIBC_2.28 pthread_barrier_init F
+GLIBC_2.28 pthread_barrier_wait F
+GLIBC_2.28 pthread_barrierattr_destroy F
+GLIBC_2.28 pthread_barrierattr_getpshared F
+GLIBC_2.28 pthread_barrierattr_init F
+GLIBC_2.28 pthread_barrierattr_setpshared F
+GLIBC_2.28 pthread_cancel F
+GLIBC_2.28 pthread_cond_broadcast F
+GLIBC_2.28 pthread_cond_destroy F
+GLIBC_2.28 pthread_cond_init F
+GLIBC_2.28 pthread_cond_signal F
+GLIBC_2.28 pthread_cond_timedwait F
+GLIBC_2.28 pthread_cond_wait F
+GLIBC_2.28 pthread_condattr_destroy F
+GLIBC_2.28 pthread_condattr_getclock F
+GLIBC_2.28 pthread_condattr_getpshared F
+GLIBC_2.28 pthread_condattr_init F
+GLIBC_2.28 pthread_condattr_setclock F
+GLIBC_2.28 pthread_condattr_setpshared F
+GLIBC_2.28 pthread_create F
+GLIBC_2.28 pthread_detach F
+GLIBC_2.28 pthread_equal F
+GLIBC_2.28 pthread_exit F
+GLIBC_2.28 pthread_getaffinity_np F
+GLIBC_2.28 pthread_getattr_default_np F
+GLIBC_2.28 pthread_getattr_np F
+GLIBC_2.28 pthread_getconcurrency F
+GLIBC_2.28 pthread_getcpuclockid F
+GLIBC_2.28 pthread_getname_np F
+GLIBC_2.28 pthread_getschedparam F
+GLIBC_2.28 pthread_getspecific F
+GLIBC_2.28 pthread_join F
+GLIBC_2.28 pthread_key_create F
+GLIBC_2.28 pthread_key_delete F
+GLIBC_2.28 pthread_kill F
+GLIBC_2.28 pthread_kill_other_threads_np F
+GLIBC_2.28 pthread_mutex_consistent F
+GLIBC_2.28 pthread_mutex_consistent_np F
+GLIBC_2.28 pthread_mutex_destroy F
+GLIBC_2.28 pthread_mutex_getprioceiling F
+GLIBC_2.28 pthread_mutex_init F
+GLIBC_2.28 pthread_mutex_lock F
+GLIBC_2.28 pthread_mutex_setprioceiling F
+GLIBC_2.28 pthread_mutex_timedlock F
+GLIBC_2.28 pthread_mutex_trylock F
+GLIBC_2.28 pthread_mutex_unlock F
+GLIBC_2.28 pthread_mutexattr_destroy F
+GLIBC_2.28 pthread_mutexattr_getkind_np F
+GLIBC_2.28 pthread_mutexattr_getprioceiling F
+GLIBC_2.28 pthread_mutexattr_getprotocol F
+GLIBC_2.28 pthread_mutexattr_getpshared F
+GLIBC_2.28 pthread_mutexattr_getrobust F
+GLIBC_2.28 pthread_mutexattr_getrobust_np F
+GLIBC_2.28 pthread_mutexattr_gettype F
+GLIBC_2.28 pthread_mutexattr_init F
+GLIBC_2.28 pthread_mutexattr_setkind_np F
+GLIBC_2.28 pthread_mutexattr_setprioceiling F
+GLIBC_2.28 pthread_mutexattr_setprotocol F
+GLIBC_2.28 pthread_mutexattr_setpshared F
+GLIBC_2.28 pthread_mutexattr_setrobust F
+GLIBC_2.28 pthread_mutexattr_setrobust_np F
+GLIBC_2.28 pthread_mutexattr_settype F
+GLIBC_2.28 pthread_once F
+GLIBC_2.28 pthread_rwlock_destroy F
+GLIBC_2.28 pthread_rwlock_init F
+GLIBC_2.28 pthread_rwlock_rdlock F
+GLIBC_2.28 pthread_rwlock_timedrdlock F
+GLIBC_2.28 pthread_rwlock_timedwrlock F
+GLIBC_2.28 pthread_rwlock_tryrdlock F
+GLIBC_2.28 pthread_rwlock_trywrlock F
+GLIBC_2.28 pthread_rwlock_unlock F
+GLIBC_2.28 pthread_rwlock_wrlock F
+GLIBC_2.28 pthread_rwlockattr_destroy F
+GLIBC_2.28 pthread_rwlockattr_getkind_np F
+GLIBC_2.28 pthread_rwlockattr_getpshared F
+GLIBC_2.28 pthread_rwlockattr_init F
+GLIBC_2.28 pthread_rwlockattr_setkind_np F
+GLIBC_2.28 pthread_rwlockattr_setpshared F
+GLIBC_2.28 pthread_setaffinity_np F
+GLIBC_2.28 pthread_setattr_default_np F
+GLIBC_2.28 pthread_setcancelstate F
+GLIBC_2.28 pthread_setcanceltype F
+GLIBC_2.28 pthread_setconcurrency F
+GLIBC_2.28 pthread_setname_np F
+GLIBC_2.28 pthread_setschedparam F
+GLIBC_2.28 pthread_setschedprio F
+GLIBC_2.28 pthread_setspecific F
+GLIBC_2.28 pthread_sigmask F
+GLIBC_2.28 pthread_sigqueue F
+GLIBC_2.28 pthread_spin_destroy F
+GLIBC_2.28 pthread_spin_init F
+GLIBC_2.28 pthread_spin_lock F
+GLIBC_2.28 pthread_spin_trylock F
+GLIBC_2.28 pthread_spin_unlock F
+GLIBC_2.28 pthread_testcancel F
+GLIBC_2.28 pthread_timedjoin_np F
+GLIBC_2.28 pthread_tryjoin_np F
+GLIBC_2.28 pthread_yield F
+GLIBC_2.28 pwrite F
+GLIBC_2.28 pwrite64 F
+GLIBC_2.28 raise F
+GLIBC_2.28 read F
+GLIBC_2.28 recv F
+GLIBC_2.28 recvfrom F
+GLIBC_2.28 recvmsg F
+GLIBC_2.28 sem_close F
+GLIBC_2.28 sem_destroy F
+GLIBC_2.28 sem_getvalue F
+GLIBC_2.28 sem_init F
+GLIBC_2.28 sem_open F
+GLIBC_2.28 sem_post F
+GLIBC_2.28 sem_timedwait F
+GLIBC_2.28 sem_trywait F
+GLIBC_2.28 sem_unlink F
+GLIBC_2.28 sem_wait F
+GLIBC_2.28 send F
+GLIBC_2.28 sendmsg F
+GLIBC_2.28 sendto F
+GLIBC_2.28 sigaction F
+GLIBC_2.28 sigwait F
+GLIBC_2.28 tcdrain F
+GLIBC_2.28 wait F
+GLIBC_2.28 waitpid F
+GLIBC_2.28 write F
diff --git a/sysdeps/unix/sysv/linux/csky/libresolv.abilist b/sysdeps/unix/sysv/linux/csky/libresolv.abilist
new file mode 100644
index 0000000..4c7764b
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/csky/libresolv.abilist
@@ -0,0 +1,79 @@
+GLIBC_2.28 __b64_ntop F
+GLIBC_2.28 __b64_pton F
+GLIBC_2.28 __dn_comp F
+GLIBC_2.28 __dn_count_labels F
+GLIBC_2.28 __dn_expand F
+GLIBC_2.28 __dn_skipname F
+GLIBC_2.28 __fp_nquery F
+GLIBC_2.28 __fp_query F
+GLIBC_2.28 __fp_resstat F
+GLIBC_2.28 __hostalias F
+GLIBC_2.28 __loc_aton F
+GLIBC_2.28 __loc_ntoa F
+GLIBC_2.28 __p_cdname F
+GLIBC_2.28 __p_cdnname F
+GLIBC_2.28 __p_class F
+GLIBC_2.28 __p_class_syms D 0x54
+GLIBC_2.28 __p_fqname F
+GLIBC_2.28 __p_fqnname F
+GLIBC_2.28 __p_option F
+GLIBC_2.28 __p_query F
+GLIBC_2.28 __p_rcode F
+GLIBC_2.28 __p_time F
+GLIBC_2.28 __p_type F
+GLIBC_2.28 __p_type_syms D 0x228
+GLIBC_2.28 __putlong F
+GLIBC_2.28 __putshort F
+GLIBC_2.28 __res_close F
+GLIBC_2.28 __res_dnok F
+GLIBC_2.28 __res_hnok F
+GLIBC_2.28 __res_hostalias F
+GLIBC_2.28 __res_isourserver F
+GLIBC_2.28 __res_mailok F
+GLIBC_2.28 __res_mkquery F
+GLIBC_2.28 __res_nameinquery F
+GLIBC_2.28 __res_nmkquery F
+GLIBC_2.28 __res_nquery F
+GLIBC_2.28 __res_nquerydomain F
+GLIBC_2.28 __res_nsearch F
+GLIBC_2.28 __res_nsend F
+GLIBC_2.28 __res_ownok F
+GLIBC_2.28 __res_queriesmatch F
+GLIBC_2.28 __res_query F
+GLIBC_2.28 __res_querydomain F
+GLIBC_2.28 __res_search F
+GLIBC_2.28 __res_send F
+GLIBC_2.28 __sym_ntop F
+GLIBC_2.28 __sym_ntos F
+GLIBC_2.28 __sym_ston F
+GLIBC_2.28 _getlong F
+GLIBC_2.28 _getshort F
+GLIBC_2.28 inet_net_ntop F
+GLIBC_2.28 inet_net_pton F
+GLIBC_2.28 inet_neta F
+GLIBC_2.28 ns_datetosecs F
+GLIBC_2.28 ns_format_ttl F
+GLIBC_2.28 ns_get16 F
+GLIBC_2.28 ns_get32 F
+GLIBC_2.28 ns_initparse F
+GLIBC_2.28 ns_makecanon F
+GLIBC_2.28 ns_msg_getflag F
+GLIBC_2.28 ns_name_compress F
+GLIBC_2.28 ns_name_ntol F
+GLIBC_2.28 ns_name_ntop F
+GLIBC_2.28 ns_name_pack F
+GLIBC_2.28 ns_name_pton F
+GLIBC_2.28 ns_name_rollback F
+GLIBC_2.28 ns_name_skip F
+GLIBC_2.28 ns_name_uncompress F
+GLIBC_2.28 ns_name_unpack F
+GLIBC_2.28 ns_parse_ttl F
+GLIBC_2.28 ns_parserr F
+GLIBC_2.28 ns_put16 F
+GLIBC_2.28 ns_put32 F
+GLIBC_2.28 ns_samedomain F
+GLIBC_2.28 ns_samename F
+GLIBC_2.28 ns_skiprr F
+GLIBC_2.28 ns_sprintrr F
+GLIBC_2.28 ns_sprintrrf F
+GLIBC_2.28 ns_subdomain F
diff --git a/sysdeps/unix/sysv/linux/csky/librt.abilist b/sysdeps/unix/sysv/linux/csky/librt.abilist
new file mode 100644
index 0000000..076ef34
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/csky/librt.abilist
@@ -0,0 +1,35 @@
+GLIBC_2.28 __mq_open_2 F
+GLIBC_2.28 aio_cancel F
+GLIBC_2.28 aio_cancel64 F
+GLIBC_2.28 aio_error F
+GLIBC_2.28 aio_error64 F
+GLIBC_2.28 aio_fsync F
+GLIBC_2.28 aio_fsync64 F
+GLIBC_2.28 aio_init F
+GLIBC_2.28 aio_read F
+GLIBC_2.28 aio_read64 F
+GLIBC_2.28 aio_return F
+GLIBC_2.28 aio_return64 F
+GLIBC_2.28 aio_suspend F
+GLIBC_2.28 aio_suspend64 F
+GLIBC_2.28 aio_write F
+GLIBC_2.28 aio_write64 F
+GLIBC_2.28 lio_listio F
+GLIBC_2.28 lio_listio64 F
+GLIBC_2.28 mq_close F
+GLIBC_2.28 mq_getattr F
+GLIBC_2.28 mq_notify F
+GLIBC_2.28 mq_open F
+GLIBC_2.28 mq_receive F
+GLIBC_2.28 mq_send F
+GLIBC_2.28 mq_setattr F
+GLIBC_2.28 mq_timedreceive F
+GLIBC_2.28 mq_timedsend F
+GLIBC_2.28 mq_unlink F
+GLIBC_2.28 shm_open F
+GLIBC_2.28 shm_unlink F
+GLIBC_2.28 timer_create F
+GLIBC_2.28 timer_delete F
+GLIBC_2.28 timer_getoverrun F
+GLIBC_2.28 timer_gettime F
+GLIBC_2.28 timer_settime F
diff --git a/sysdeps/unix/sysv/linux/csky/libthread_db.abilist b/sysdeps/unix/sysv/linux/csky/libthread_db.abilist
new file mode 100644
index 0000000..7cf1659
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/csky/libthread_db.abilist
@@ -0,0 +1,40 @@
+GLIBC_2.28 td_init F
+GLIBC_2.28 td_log F
+GLIBC_2.28 td_symbol_list F
+GLIBC_2.28 td_ta_clear_event F
+GLIBC_2.28 td_ta_delete F
+GLIBC_2.28 td_ta_enable_stats F
+GLIBC_2.28 td_ta_event_addr F
+GLIBC_2.28 td_ta_event_getmsg F
+GLIBC_2.28 td_ta_get_nthreads F
+GLIBC_2.28 td_ta_get_ph F
+GLIBC_2.28 td_ta_get_stats F
+GLIBC_2.28 td_ta_map_id2thr F
+GLIBC_2.28 td_ta_map_lwp2thr F
+GLIBC_2.28 td_ta_new F
+GLIBC_2.28 td_ta_reset_stats F
+GLIBC_2.28 td_ta_set_event F
+GLIBC_2.28 td_ta_setconcurrency F
+GLIBC_2.28 td_ta_thr_iter F
+GLIBC_2.28 td_ta_tsd_iter F
+GLIBC_2.28 td_thr_clear_event F
+GLIBC_2.28 td_thr_dbresume F
+GLIBC_2.28 td_thr_dbsuspend F
+GLIBC_2.28 td_thr_event_enable F
+GLIBC_2.28 td_thr_event_getmsg F
+GLIBC_2.28 td_thr_get_info F
+GLIBC_2.28 td_thr_getfpregs F
+GLIBC_2.28 td_thr_getgregs F
+GLIBC_2.28 td_thr_getxregs F
+GLIBC_2.28 td_thr_getxregsize F
+GLIBC_2.28 td_thr_set_event F
+GLIBC_2.28 td_thr_setfpregs F
+GLIBC_2.28 td_thr_setgregs F
+GLIBC_2.28 td_thr_setprio F
+GLIBC_2.28 td_thr_setsigpending F
+GLIBC_2.28 td_thr_setxregs F
+GLIBC_2.28 td_thr_sigsetmask F
+GLIBC_2.28 td_thr_tls_get_addr F
+GLIBC_2.28 td_thr_tlsbase F
+GLIBC_2.28 td_thr_tsd F
+GLIBC_2.28 td_thr_validate F
diff --git a/sysdeps/unix/sysv/linux/csky/libutil.abilist b/sysdeps/unix/sysv/linux/csky/libutil.abilist
new file mode 100644
index 0000000..0502583
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/csky/libutil.abilist
@@ -0,0 +1,6 @@
+GLIBC_2.28 forkpty F
+GLIBC_2.28 login F
+GLIBC_2.28 login_tty F
+GLIBC_2.28 logout F
+GLIBC_2.28 logwtmp F
+GLIBC_2.28 openpty F
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [RFC PATCH v3 09/12] C-SKY: Linux Startup and Dynamic Loading Code
  2018-06-29  7:58 [RFC PATCH v3 00/12] port C-SKY to glibc Mao Han
                   ` (7 preceding siblings ...)
  2018-06-29  7:58 ` [RFC PATCH v3 08/12] C-SKY: ABI Lists Mao Han
@ 2018-06-29  7:58 ` Mao Han
  2018-06-29  7:58 ` [RFC PATCH v3 10/12] C-SKY: Build Infastructure Mao Han
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 22+ messages in thread
From: Mao Han @ 2018-06-29  7:58 UTC (permalink / raw
  To: libc-alpha; +Cc: Mao Han, c-sky_gcc_upstream, gnu-csky

This contains the Linux-specific code for loading programs on C-SKY.

	* elf/elf.h (EM_CSKY, R_CKCORE_NONE, R_CKCORE_ADDR32)
	(R_CKCORE_PCRELIMM8BY4, R_CKCORE_PCRELIMM11BY2, R_CKCORE_PCREL32)
	(R_CKCORE_PCRELJSR_IMM11BY2, R_CKCORE_RELATIVE, R_CKCORE_COPY)
	(R_CKCORE_GLOB_DAT, R_CKCORE_JUMP_SLOT, R_CKCORE_GOTOFF)
	(R_CKCORE_GOTPC, R_CKCORE_GOT32, R_CKCORE_PLT32, R_CKCORE_ADDRGOT)
	(R_CKCORE_ADDRPLT, R_CKCORE_PCREL_IMM26BY2, R_CKCORE_PCREL_IMM16BY2)
	(R_CKCORE_PCREL_IMM16BY4, R_CKCORE_PCREL_IMM10BY2)
	(R_CKCORE_PCREL_IMM10BY4, R_CKCORE_ADDR_HI16, R_CKCORE_ADDR_LO16)
	(R_CKCORE_GOTPC_HI16, R_CKCORE_GOTPC_LO16, R_CKCORE_GOTOFF_HI16)
	(R_CKCORE_GOTOFF_LO16, R_CKCORE_GOT12, R_CKCORE_GOT_HI16)
	(R_CKCORE_GOT_LO16, R_CKCORE_PLT12, R_CKCORE_PLT_HI16)
	(R_CKCORE_PLT_LO16, R_CKCORE_ADDRGOT_HI16, R_CKCORE_ADDRGOT_LO16)
	(R_CKCORE_ADDRPLT_HI16, R_CKCORE_ADDRPLT_LO16)
	(R_CKCORE_PCREL_JSR_IMM26BY2, R_CKCORE_TOFFSET_LO16)
	(R_CKCORE_DOFFSET_LO16, R_CKCORE_PCREL_IMM18BY2)
	(R_CKCORE_DOFFSET_IMM18, R_CKCORE_DOFFSET_IMM18BY2)
	(R_CKCORE_DOFFSET_IMM18BY4, R_CKCORE_GOT_IMM18BY4)
	(R_CKCORE_PLT_IMM18BY4, R_CKCORE_PCREL_IMM7BY4, R_CKCORE_TLS_LE32)
	(R_CKCORE_TLS_IE32, R_CKCORE_TLS_GD32, R_CKCORE_TLS_LDM32)
	(R_CKCORE_TLS_LDO32, R_CKCORE_TLS_DTPMOD32, R_CKCORE_TLS_DTPOFF32)
	(R_CKCORE_TLS_TPOFF32): New Define.
	* sysdeps/csky/dl-machine.h: New file.
	* sysdeps/csky/dl-procinfo.c: Likewise.
	* sysdeps/csky/dl-procinfo.h: Likewise.
	* sysdeps/csky/dl-sysdep.h: Likewise.
	* sysdeps/csky/ldsodefs.h: Likewise.
	* sysdeps/csky/linkmap.h: Likewise.
	* sysdeps/csky/sotruss-lib.c: Likewise.
	* sysdeps/unix/sysv/linux/csky/ldconfig.h: Likewise.
---
 elf/elf.h                               |  67 +++++-
 sysdeps/csky/dl-machine.h               | 364 ++++++++++++++++++++++++++++++++
 sysdeps/csky/dl-procinfo.c              |  62 ++++++
 sysdeps/csky/dl-procinfo.h              |  59 ++++++
 sysdeps/csky/dl-sysdep.h                |  23 ++
 sysdeps/csky/ldsodefs.h                 |  42 ++++
 sysdeps/csky/linkmap.h                  |   4 +
 sysdeps/csky/sotruss-lib.c              |  49 +++++
 sysdeps/unix/sysv/linux/csky/ldconfig.h |  34 +++
 9 files changed, 703 insertions(+), 1 deletion(-)
 create mode 100644 sysdeps/csky/dl-machine.h
 create mode 100644 sysdeps/csky/dl-procinfo.c
 create mode 100644 sysdeps/csky/dl-procinfo.h
 create mode 100644 sysdeps/csky/dl-sysdep.h
 create mode 100644 sysdeps/csky/ldsodefs.h
 create mode 100644 sysdeps/csky/linkmap.h
 create mode 100644 sysdeps/csky/sotruss-lib.c
 create mode 100644 sysdeps/unix/sysv/linux/csky/ldconfig.h

diff --git a/elf/elf.h b/elf/elf.h
index a5b2811..79077a8 100644
--- a/elf/elf.h
+++ b/elf/elf.h
@@ -360,8 +360,9 @@ typedef struct
 #define EM_RISCV	243	/* RISC-V */
 
 #define EM_BPF		247	/* Linux BPF -- in-kernel virtual machine */
+#define EM_CSKY         252     /* C_SKY */
 
-#define EM_NUM		248
+#define EM_NUM		253
 
 /* Old spellings/synonyms.  */
 
@@ -3015,6 +3016,70 @@ enum
 /* Keep this the last entry.  */
 #define R_ARM_NUM		256
 
+/* csky */
+#define R_CKCORE_NONE               0	/* no reloc */
+#define R_CKCORE_ADDR32             1	/* direct 32 bit (S + A) */
+#define R_CKCORE_PCRELIMM8BY4       2	/* disp ((S + A - P) >> 2) & 0xff   */
+#define R_CKCORE_PCRELIMM11BY2      3	/* disp ((S + A - P) >> 1) & 0x7ff  */
+#define R_CKCORE_PCREL32            5	/* 32-bit rel (S + A - P)           */
+#define R_CKCORE_PCRELJSR_IMM11BY2  6	/* disp ((S + A - P) >>1) & 0x7ff   */
+#define R_CKCORE_RELATIVE           9	/* 32 bit adjust program base(B + A)*/
+#define R_CKCORE_COPY               10	/* 32 bit adjust by program base    */
+#define R_CKCORE_GLOB_DAT           11	/* off between got and sym (S)      */
+#define R_CKCORE_JUMP_SLOT          12	/* PLT entry (S) */
+#define R_CKCORE_GOTOFF             13	/* offset to GOT (S + A - GOT)      */
+#define R_CKCORE_GOTPC              14	/* PC offset to GOT (GOT + A - P)   */
+#define R_CKCORE_GOT32              15	/* 32 bit GOT entry (G) */
+#define R_CKCORE_PLT32              16	/* 32 bit PLT entry (G) */
+#define R_CKCORE_ADDRGOT            17	/* GOT entry in GLOB_DAT (GOT + G)  */
+#define R_CKCORE_ADDRPLT            18	/* PLT entry in GLOB_DAT (GOT + G)  */
+#define R_CKCORE_PCREL_IMM26BY2     19	/* ((S + A - P) >> 1) & 0x3ffffff   */
+#define R_CKCORE_PCREL_IMM16BY2     20	/* disp ((S + A - P) >> 1) & 0xffff */
+#define R_CKCORE_PCREL_IMM16BY4     21	/* disp ((S + A - P) >> 2) & 0xffff */
+#define R_CKCORE_PCREL_IMM10BY2     22	/* disp ((S + A - P) >> 1) & 0x3ff  */
+#define R_CKCORE_PCREL_IMM10BY4     23	/* disp ((S + A - P) >> 2) & 0x3ff  */
+#define R_CKCORE_ADDR_HI16          24	/* high & low 16 bit ADDR */
+                                        /* ((S + A) >> 16) & 0xffff */
+#define R_CKCORE_ADDR_LO16          25	/* (S + A) & 0xffff */
+#define R_CKCORE_GOTPC_HI16         26	/* high & low 16 bit GOTPC */
+                                        /* ((GOT + A - P) >> 16) & 0xffff */
+#define R_CKCORE_GOTPC_LO16         27	/* (GOT + A - P) & 0xffff */
+#define R_CKCORE_GOTOFF_HI16        28	/* high & low 16 bit GOTOFF */
+                                        /* ((S + A - GOT) >> 16) & 0xffff */
+#define R_CKCORE_GOTOFF_LO16        29	/* (S + A - GOT) & 0xffff */
+#define R_CKCORE_GOT12              30	/* 12 bit disp GOT entry (G) */
+#define R_CKCORE_GOT_HI16           31	/* high & low 16 bit GOT */
+                                        /* (G >> 16) & 0xffff */
+#define R_CKCORE_GOT_LO16           32	/* (G & 0xffff) */
+#define R_CKCORE_PLT12              33	/* 12 bit disp PLT entry (G) */
+#define R_CKCORE_PLT_HI16           34	/* high & low 16 bit PLT */
+                                        /* (G >> 16) & 0xffff */
+#define R_CKCORE_PLT_LO16           35	/* G & 0xffff */
+#define R_CKCORE_ADDRGOT_HI16       36	/* high & low 16 bit ADDRGOT */
+                                        /* (GOT + G * 4) & 0xffff */
+#define R_CKCORE_ADDRGOT_LO16       37	/* (GOT + G * 4) & 0xffff */
+#define R_CKCORE_ADDRPLT_HI16       38	/* high & low 16 bit ADDRPLT */
+                                        /* ((GOT + G * 4) >> 16) & 0xFFFF */
+#define R_CKCORE_ADDRPLT_LO16       39	/* (GOT+G*4) & 0xffff */
+#define R_CKCORE_PCREL_JSR_IMM26BY2 40	/* disp ((S+A-P) >>1) & x3ffffff */
+#define R_CKCORE_TOFFSET_LO16       41	/* (S+A-BTEXT) & 0xffff */
+#define R_CKCORE_DOFFSET_LO16       42	/* (S+A-BTEXT) & 0xffff */
+#define R_CKCORE_PCREL_IMM18BY2     43	/* disp ((S+A-P) >>1) & 0x3ffff */
+#define R_CKCORE_DOFFSET_IMM18      44	/* disp (S+A-BDATA) & 0x3ffff */
+#define R_CKCORE_DOFFSET_IMM18BY2   45	/* disp ((S+A-BDATA)>>1) & 0x3ffff */
+#define R_CKCORE_DOFFSET_IMM18BY4   46	/* disp ((S+A-BDATA)>>2) & 0x3ffff */
+#define R_CKCORE_GOT_IMM18BY4       48	/* disp (G >> 2) */
+#define R_CKCORE_PLT_IMM18BY4       49	/* disp (G >> 2) */
+#define R_CKCORE_PCREL_IMM7BY4      50	/* disp ((S+A-P) >>2) & 0x7f */
+#define R_CKCORE_TLS_LE32           51  /* 32 bit offset to TLS block */
+#define R_CKCORE_TLS_IE32           52
+#define R_CKCORE_TLS_GD32           53
+#define R_CKCORE_TLS_LDM32          54
+#define R_CKCORE_TLS_LDO32          55
+#define R_CKCORE_TLS_DTPMOD32       56
+#define R_CKCORE_TLS_DTPOFF32       57
+#define R_CKCORE_TLS_TPOFF32        58
+
 /* IA-64 specific declarations.  */
 
 /* Processor specific flags for the Ehdr e_flags field.  */
diff --git a/sysdeps/csky/dl-machine.h b/sysdeps/csky/dl-machine.h
new file mode 100644
index 0000000..97dda01
--- /dev/null
+++ b/sysdeps/csky/dl-machine.h
@@ -0,0 +1,364 @@
+/* Machine-dependent ELF dynamic relocation inline functions.  C-SKY version.
+   Copyright (C) 2018 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
+#define dl_machine_h
+
+#define ELF_MACHINE_NAME "csky"
+
+#include <sys/param.h>
+#include <sysdep.h>
+#include <dl-tls.h>
+
+/* Return nonzero iff ELF header is compatible with the running host.  */
+static inline int
+elf_machine_matches_host (const Elf32_Ehdr *ehdr)
+{
+  return ehdr->e_machine == EM_CSKY;
+}
+
+/* Return the link-time address of _DYNAMIC.
+   This must be inlined in a function which uses global data.  */
+static inline Elf32_Addr
+elf_machine_dynamic (void)
+{
+  register Elf32_Addr *got __asm__ ("gb");
+  return *got;
+}
+
+/* Return the run-time load address ,of the shared object.  */
+static inline Elf32_Addr
+elf_machine_load_address (void)
+{
+  extern Elf32_Addr __dl_start (void *) asm ("_dl_start");
+  Elf32_Addr got_addr = (Elf32_Addr) &__dl_start;
+  Elf32_Addr pcrel_addr;
+
+  asm  ("grs %0,_dl_start\n" : "=r" (pcrel_addr));
+
+  return pcrel_addr - got_addr;
+}
+
+
+/* Set up the loaded object described by L so its unrelocated PLT
+   entries will jump to the on-demand fixup code in dl-runtime.c.  */
+
+static inline int __attribute__ ((always_inline))
+elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
+{
+  Elf32_Addr *got;
+  extern void _dl_runtime_resolve (Elf32_Word);
+  extern void _dl_runtime_profile (Elf32_Word);
+
+  if (l->l_info[DT_JMPREL] && lazy)
+    {
+      /* The GOT entries for functions in the PLT have not yet been
+         filled in.  Their initial contents will arrange when called
+         to push an offset into the .rela.plt section, push
+         _GLOBAL_OFFSET_TABLE_[1], and then jump to
+         _GLOBAL_OFFSET_TABLE_[2].  */
+      got = (Elf32_Addr *) D_PTR (l, l_info[DT_PLTGOT]);
+
+      if (got[1])
+        l->l_mach.plt = got[1] + l->l_addr;
+      got[1] = (Elf32_Addr) l; /* Identify this shared object.  */
+
+      /* The got[2] entry contains the address of a function which gets
+         called to get the address of a so far unresolved function and
+         jump to it.  The profiling extension of the dynamic linker allows
+         to intercept the calls to collect information.  In this case we
+         don't store the address in the GOT so that all future calls also
+         end in this function.  */
+      got[2] = (Elf32_Addr) &_dl_runtime_resolve;
+    }
+  return lazy;
+}
+
+/* Mask identifying addresses reserved for the user program,
+   where the dynamic linker should not map anything.  */
+#define ELF_MACHINE_USER_ADDRESS_MASK 0x80000000UL
+
+/* 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.  */
+# define RTLD_START asm ("\
+.text\n\
+.globl _start\n\
+.type _start, @function\n\
+.globl _dl_start_user\n\
+.type _dl_start_user, @function\n\
+_start:\n\
+	grs	gb, .Lgetpc1\n\
+.Lgetpc1:\n\
+	lrw	t0, .Lgetpc1@GOTPC\n\
+	addu	gb, t0\n\
+	mov	a0, sp\n\
+	lrw	t1, _dl_start@GOTOFF\n\
+	addu	t1, gb\n\
+	jsr	t1\n\
+_dl_start_user:\n\
+	/* get _dl_skip_args */    \n\
+	lrw	r11, _dl_skip_args@GOTOFF\n\
+	addu	r11, gb\n\
+	ldw	r11, (r11, 0)\n\
+	/* store program entry address in r11 */ \n\
+        mov     r10, a0\n\
+        /* Get argc */\n\
+        ldw     a1, (sp, 0)\n\
+        /* Get **argv */\n\
+        mov     a2, sp\n\
+        addi    a2, 4\n\
+        cmpnei  r11, 0\n\
+        bt      .L_fixup_stack\n\
+.L_done_fixup:\n\
+        mov 	a3, a1\n\
+        lsli 	a3, 2\n\
+        add     a3, a2\n\
+        addi 	a3, 4\n\
+        lrw     a0, _rtld_local@GOTOFF\n\
+        addu 	a0, gb\n\
+        ldw     a0, (a0, 0)\n\
+        lrw     t1, _dl_init@PLT\n\
+        addu    t1, gb\n\
+        ldw	t1, (t1)\n\
+        jsr     t1\n\
+        lrw     a0, _dl_fini@GOTOFF\n\
+        addu 	a0, gb\n\
+        jmp 	r10\n\
+.L_fixup_stack:\n\
+        subu    a1, r11\n\
+        lsli    r11, 2\n\
+        addu    sp, r11\n\
+        stw     a1, (sp, 0)\n\
+        mov     a2, sp\n\
+        addi    a2, 4\n\
+        lrw     a3, _dl_argv@GOTOFF\n\
+        addu    a3, gb\n\
+        stw     a2, (a3, 0)\n\
+        br      .L_done_fixup\n\
+");
+
+/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry or
+   TLS variable, so undefined references should not be allowed to
+   define the value.
+   ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one
+   of the main executable's symbols, as for a COPY reloc.  */
+#ifndef RTLD_BOOTSTRAP
+# define elf_machine_type_class(type) \
+  ((((type) == R_CKCORE_JUMP_SLOT || (type) == R_CKCORE_TLS_DTPMOD32          \
+     || (type) == R_CKCORE_TLS_DTPOFF32 || (type) == R_CKCORE_TLS_TPOFF32)    \
+    * ELF_RTYPE_CLASS_PLT)                                                    \
+   | (((type) == R_CKCORE_COPY) * ELF_RTYPE_CLASS_COPY))
+#else
+# define elf_machine_type_class(type) \
+  ((((type) == R_CKCORE_JUMP_SLOT     \
+   | (((type) == R_CKCORE_COPY) * ELF_RTYPE_CLASS_COPY))
+#endif
+
+/* A reloc type used for ld.so cmdline arg lookups to reject PLT entries.  */
+#define ELF_MACHINE_JMP_SLOT R_CKCORE_JUMP_SLOT
+
+/* C-SKY never uses Elf32_Rel relocations.  */
+#define ELF_MACHINE_NO_REL 1
+#define ELF_MACHINE_NO_RELA 0
+
+/* We define an initialization functions.  This is called very early in
+   _dl_sysdep_start.  */
+#define DL_PLATFORM_INIT dl_platform_init ()
+
+static inline void __attribute__ ((unused))
+dl_platform_init (void)
+{
+  if (GLRO(dl_platform) != NULL && *GLRO(dl_platform) == '\0')
+    /* Avoid an empty string which would disturb us.  */
+    GLRO(dl_platform) = NULL;
+}
+
+static inline Elf32_Addr
+elf_machine_fixup_plt (struct link_map *map, lookup_t t,
+                       const ElfW(Sym) *refsym, const ElfW(Sym) *sym,
+                       const Elf32_Rela *reloc,
+                       Elf32_Addr *reloc_addr, Elf32_Addr value)
+{
+  return *reloc_addr = value;
+}
+
+/* Return the final value of a plt relocation.  On the csky the JMP_SLOT
+   relocation ignores the addend.  */
+static inline Elf32_Addr
+elf_machine_plt_value (struct link_map *map, const Elf32_Rela *reloc,
+                       Elf32_Addr value)
+{
+  return value;
+}
+
+/* Names of the architecture-specific auditing callback functions.  */
+#define ARCH_LA_PLTENTER csky_gnu_pltenter
+#define ARCH_LA_PLTEXIT csky_gnu_pltexit
+
+#endif /* !dl_machine_h */
+#ifdef RESOLVE_MAP
+
+/* Perform the relocation specified by RELOC and SYM (which is fully resolved).
+   MAP is the object containing the reloc.  */
+
+auto inline void __attribute__ ((unused, always_inline))
+elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
+                  const Elf32_Sym *sym, const struct r_found_version *version,
+                  void *const reloc_addr_arg, int skip_ifunc)
+{
+  Elf32_Addr *const reloc_addr = reloc_addr_arg;
+  const unsigned int r_type = ELF32_R_TYPE (reloc->r_info);
+  unsigned short __attribute__ ((unused)) *opcode16_addr;
+  Elf32_Addr __attribute__ ((unused)) insn_opcode = 0x0;
+
+  if (__builtin_expect (r_type == R_CKCORE_RELATIVE, 0))
+    *reloc_addr = map->l_addr + reloc->r_addend;
+  else
+    {
+      const Elf32_Sym *const refsym = sym;
+      struct link_map *sym_map = RESOLVE_MAP (&sym, version, r_type);
+      ElfW(Addr) value = SYMBOL_ADDRESS (sym_map, sym, true);
+      opcode16_addr = (unsigned short *)reloc_addr;
+
+      switch (r_type)
+        {
+        case R_CKCORE_COPY:
+          if (sym == NULL)
+            /* This can happen in trace mode if an object could not be
+               found.  */
+            break;
+          if (sym->st_size > refsym->st_size
+              || (sym->st_size < refsym->st_size && GLRO(dl_verbose)))
+            {
+              const char *strtab;
+
+              strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]);
+              _dl_error_printf ("\
+%s: Symbol `%s' has different size in shared object, consider re-linking\n",
+                                rtld_progname ?: "<program name unknown>",
+                                strtab + refsym->st_name);
+            }
+          memcpy (reloc_addr_arg, (void *) value,
+                  MIN (sym->st_size, refsym->st_size));
+          break;
+        case R_CKCORE_GLOB_DAT:
+        case R_CKCORE_JUMP_SLOT:
+          *reloc_addr = value;
+          break;
+        case R_CKCORE_ADDR32:
+          *reloc_addr = value + reloc->r_addend;
+          break;
+        case R_CKCORE_PCREL32:
+          *reloc_addr = value + reloc->r_addend - (Elf32_Addr) reloc_addr;
+          break;
+#if defined(__CK810__) || defined(__CK807__)
+        case R_CKCORE_ADDR_HI16:
+          insn_opcode = (*opcode16_addr << 16) | (*(opcode16_addr + 1));
+          insn_opcode = (insn_opcode & 0xffff0000)
+                            | (((value + reloc->r_addend) >> 16) & 0xffff);
+          *(opcode16_addr++) = (unsigned short)(insn_opcode >> 16);
+          *opcode16_addr = (unsigned short)(insn_opcode & 0xffff);
+          break;
+        case R_CKCORE_ADDR_LO16:
+          insn_opcode = (*opcode16_addr << 16) | (*(opcode16_addr + 1));
+          insn_opcode = (insn_opcode & 0xffff0000)
+                            | ((value + reloc->r_addend) & 0xffff);
+           *(opcode16_addr++) = (unsigned short)(insn_opcode >> 16);
+           *opcode16_addr = (unsigned short)(insn_opcode & 0xffff);
+           break;
+        case R_CKCORE_PCREL_IMM26BY2:
+        {
+          unsigned int offset = ((value + reloc->r_addend -
+                                  (unsigned int)reloc_addr) >> 1);
+          insn_opcode = (*opcode16_addr << 16) | (*(opcode16_addr + 1));
+          if (offset > 0x3ffffff){
+            const char *strtab;
+            strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]);
+
+            _dl_error_printf ("\
+%s:T    he reloc R_CKCORE_PCREL_IMM26BY2 cannot reach the symbol '%s'.\n",
+              rtld_progname ?: "<program name unknown>",
+              strtab + refsym->st_name);
+            break;
+          }
+          insn_opcode = (insn_opcode & ~0x3ffffff) | offset;
+          *(opcode16_addr++) = (unsigned short)(insn_opcode >> 16);
+          *opcode16_addr = (unsigned short)(insn_opcode & 0xffff);
+          break;
+        }
+        case R_CKCORE_PCREL_JSR_IMM26BY2:
+          break;
+#endif
+#ifndef RTLD_BOOTSTRAP
+        case R_CKCORE_TLS_DTPMOD32:
+        /* Get the information from the link map returned by the
+           resolv function.  */
+          if (sym_map != NULL)
+            *reloc_addr = sym_map->l_tls_modid;
+          break;
+        case R_CKCORE_TLS_DTPOFF32:
+          if (sym != NULL)
+            *reloc_addr =(sym == NULL ? 0 : sym->st_value) + reloc->r_addend;
+          break;
+        case R_CKCORE_TLS_TPOFF32:
+          if (sym != NULL)
+            {
+              CHECK_STATIC_TLS (map, sym_map);
+              *reloc_addr = (sym->st_value + sym_map->l_tls_offset
+                             + reloc->r_addend);
+            }
+          break;
+#endif /* !RTLD_BOOTSTRAP */
+        case R_CKCORE_NONE:
+          break;
+        default:
+          break;
+        }
+    }
+}
+
+auto inline void __attribute__ ((unused, always_inline))
+elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc,
+                           void *const reloc_addr_arg)
+{
+  Elf32_Addr *const reloc_addr = reloc_addr_arg;
+  *reloc_addr = l_addr + reloc->r_addend;
+}
+
+auto inline void __attribute__ ((unused, always_inline))
+elf_machine_lazy_rel (struct link_map *map,
+                      Elf32_Addr l_addr, const Elf32_Rela *reloc,
+                      int skip_ifunc)
+{
+  Elf32_Addr *const reloc_addr = (void *) (l_addr + reloc->r_offset);
+  const unsigned int r_type = ELF32_R_TYPE (reloc->r_info);
+  if (ELF32_R_TYPE (reloc->r_info) == R_CKCORE_JUMP_SLOT)
+  {
+  /* Check for unexpected PLT reloc type.  */
+    if (__builtin_expect (r_type == R_CKCORE_JUMP_SLOT, 1))
+      {
+        if (__builtin_expect (map->l_mach.plt, 0) == 0)
+          *reloc_addr = l_addr + reloc->r_addend;
+        else
+          *reloc_addr = map->l_mach.plt;
+      }
+  }
+}
+
+#endif /* RESOLVE_MAP */
diff --git a/sysdeps/csky/dl-procinfo.c b/sysdeps/csky/dl-procinfo.c
new file mode 100644
index 0000000..88f16d4
--- /dev/null
+++ b/sysdeps/csky/dl-procinfo.c
@@ -0,0 +1,62 @@
+/* Data for C-SKY version of processor capability information.
+   Copyright (C) 2018 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 information must be kept in sync with the _DL_PLATFORM_COUNT
+   definitions in procinfo.h.
+
+   If anything should be added here check whether the size of each string
+   is still ok with the given array size.
+
+   All the #ifdefs in the definitions are quite irritating but
+   necessary if we want to avoid duplicating the information.  There
+   are three different modes:
+
+   - PROCINFO_DECL is defined.  This means we are only interested in
+     declarations.
+
+   - PROCINFO_DECL is not defined:
+
+     + if SHARED is defined the file is included in an array
+       initializer.  The .element = { ... } syntax is needed.
+
+     + if SHARED is not defined a normal array initialization is
+       needed.
+  */
+
+#ifndef PROCINFO_CLASS
+# define PROCINFO_CLASS
+#endif
+
+#if !defined PROCINFO_DECL && defined SHARED
+  ._dl_csky_platforms
+#else
+PROCINFO_CLASS const char _dl_csky_platforms[4][6]
+#endif
+#ifndef PROCINFO_DECL
+= {
+    "ck610", "ck807", "ck810", "ck860"
+  }
+#endif
+#if !defined SHARED || defined PROCINFO_DECL
+;
+#else
+,
+#endif
+
+#undef PROCINFO_DECL
+#undef PROCINFO_CLASS
diff --git a/sysdeps/csky/dl-procinfo.h b/sysdeps/csky/dl-procinfo.h
new file mode 100644
index 0000000..4e7abe7
--- /dev/null
+++ b/sysdeps/csky/dl-procinfo.h
@@ -0,0 +1,59 @@
+/* C-SKY version of processor capability information handling macros.
+   Copyright (C) 2018 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_PROCINFO_H
+#define _DL_PROCINFO_H	1
+
+#include <ldsodefs.h>
+
+/* Mask to filter out platforms.  */
+#define _DL_HWCAP_PLATFORM    (-1ULL)
+
+#define _DL_PLATFORMS_COUNT   4
+
+static inline int
+__attribute__ ((unused, always_inline))
+_dl_string_platform (const char *str)
+{
+  int i;
+
+  if (str != NULL)
+    for (i = 0; i < _DL_PLATFORMS_COUNT; ++i)
+      {
+        if (strcmp (str, GLRO(dl_csky_platforms)[i]) == 0)
+          return i;
+      }
+  return -1;
+};
+
+/* We cannot provide a general printing function.  */
+#define _dl_procinfo(word, val) -1
+
+/* There are no hardware capabilities defined.  */
+#define _dl_hwcap_string(idx) ""
+
+/* By default there is no important hardware capability.  */
+#define HWCAP_IMPORTANT (0)
+
+/* We don't have any hardware capabilities.  */
+#define _DL_HWCAP_COUNT	0
+
+#define _dl_string_hwcap(str) (-1)
+
+#endif /* dl-procinfo.h */
diff --git a/sysdeps/csky/dl-sysdep.h b/sysdeps/csky/dl-sysdep.h
new file mode 100644
index 0000000..d5dd294
--- /dev/null
+++ b/sysdeps/csky/dl-sysdep.h
@@ -0,0 +1,23 @@
+/* System-specific settings for dynamic linker code.  C-SKY version.
+   Copyright (C) 2018 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_next <dl-sysdep.h>
+
+/* _dl_argv cannot be attribute_relro, because _dl_start_user
+   might write into it after _dl_start returns.  */
+#define DL_ARGV_NOT_RELRO 1
diff --git a/sysdeps/csky/ldsodefs.h b/sysdeps/csky/ldsodefs.h
new file mode 100644
index 0000000..477ca7d
--- /dev/null
+++ b/sysdeps/csky/ldsodefs.h
@@ -0,0 +1,42 @@
+/* Run-time dynamic linker data structures for loaded ELF shared objects.
+   Copyright (C) 2018 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 _CSKY_LDSODEFS_H
+#define _CSKY_LDSODEFS_H 1
+
+#include <elf.h>
+
+struct La_csky_regs;
+struct La_csky_retval;
+
+#define ARCH_PLTENTER_MEMBERS	\
+    Elf32_Addr (*csky_gnu_pltenter) (Elf32_Sym *, unsigned int,		      \
+					 uintptr_t *, uintptr_t *,	      \
+					 struct La_csky_regs *,		      \
+					 unsigned int *, const char *,	      \
+					 long int *);
+
+#define ARCH_PLTEXIT_MEMBERS	\
+    unsigned int (*csky_gnu_pltexit) (Elf32_Sym *, unsigned int,	       \
+					  uintptr_t *, uintptr_t *,	       \
+					  const struct La_csky_regs *,	       \
+					  struct La_csky_retval *,	       \
+					  const char *);
+
+#include_next <ldsodefs.h>
+#endif
diff --git a/sysdeps/csky/linkmap.h b/sysdeps/csky/linkmap.h
new file mode 100644
index 0000000..648976d
--- /dev/null
+++ b/sysdeps/csky/linkmap.h
@@ -0,0 +1,4 @@
+struct link_map_machine
+  {
+    Elf32_Addr plt; /* Address of .plt */
+  };
diff --git a/sysdeps/csky/sotruss-lib.c b/sysdeps/csky/sotruss-lib.c
new file mode 100644
index 0000000..280c371
--- /dev/null
+++ b/sysdeps/csky/sotruss-lib.c
@@ -0,0 +1,49 @@
+/* Override generic sotruss-lib.c to define actual functions for C-SKY.
+   Copyright (C) 2018 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 HAVE_ARCH_PLTENTER
+#define HAVE_ARCH_PLTEXIT
+
+#include <elf/sotruss-lib.c>
+
+ElfW(Addr)
+la_csky_gnu_pltenter (ElfW(Sym) *sym __attribute__ ((unused)),
+		      unsigned int ndx __attribute__ ((unused)),
+		      uintptr_t *refcook, uintptr_t *defcook,
+		      La_csky_regs *regs, unsigned int *flags,
+		      const char *symname, long int *framesizep)
+{
+  print_enter (refcook, defcook, symname,
+	       regs->lr_reg[0], regs->lr_reg[1], regs->lr_reg[2],
+	       *flags);
+
+  /* No need to copy anything, we will not need the parameters in any case.  */
+  *framesizep = 0;
+
+  return sym->st_value;
+}
+
+unsigned int
+la_csky_gnu_pltexit (ElfW(Sym) *sym, unsigned int ndx, uintptr_t *refcook,
+		     uintptr_t *defcook, const struct La_csky_regs *inregs,
+		     struct La_csky_retval *outregs, const char *symname)
+{
+  print_exit (refcook, defcook, symname, outregs->lrv_v0);
+
+  return 0;
+}
diff --git a/sysdeps/unix/sysv/linux/csky/ldconfig.h b/sysdeps/unix/sysv/linux/csky/ldconfig.h
new file mode 100644
index 0000000..ae8d598
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/csky/ldconfig.h
@@ -0,0 +1,34 @@
+/* ldconfig default paths and libraries.  Linux/C-SKY version.
+   Copyright (C) 2018 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 <sysdeps/generic/ldconfig.h>
+
+#define LD_SO_PREFIX "/lib/ld-linux-"
+#define LD_SO_SUFFIX ".so.1"
+
+#if __CSKY_HARD_FLOAT__ == 0
+# define LD_SO_ABI "cskyv2-sfp-le"
+#else
+# define LD_SO_ABI "cskyv2-hfp-le"
+#endif
+
+#define SYSDEP_KNOWN_INTERPRETER_NAMES	\
+  { LD_SO_PREFIX LD_SO_ABI LD_SO_SUFFIX, FLAG_ELF_LIBC6 },
+#define SYSDEP_KNOWN_LIBRARY_NAMES	\
+  { "libc.so.6", FLAG_ELF_LIBC6 },	\
+  { "libm.so.6", FLAG_ELF_LIBC6 },
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [RFC PATCH v3 10/12] C-SKY: Build Infastructure
  2018-06-29  7:58 [RFC PATCH v3 00/12] port C-SKY to glibc Mao Han
                   ` (8 preceding siblings ...)
  2018-06-29  7:58 ` [RFC PATCH v3 09/12] C-SKY: Linux Startup and Dynamic Loading Code Mao Han
@ 2018-06-29  7:58 ` Mao Han
  2018-06-29 16:45   ` Joseph Myers
  2018-06-29  7:58 ` [RFC PATCH v3 11/12] C-SKY: Add build-many-glibcs.py support Mao Han
  2018-06-29  7:58 ` [RFC PATCH v3 12/12] C-SKY: Skeleton documentation Mao Han
  11 siblings, 1 reply; 22+ messages in thread
From: Mao Han @ 2018-06-29  7:58 UTC (permalink / raw
  To: libc-alpha; +Cc: Mao Han, c-sky_gcc_upstream, gnu-csky

This patch contains all the implile, makefile and configure needed in
C-SKY porting.

	* sysdeps/csky/Implies: New file.
	* sysdeps/csky/Makefile: Likewise.
	* sysdeps/csky/configure: Likewise.
	* sysdeps/csky/configure.ac: Likewise.
	* sysdeps/csky/nofpu/Implies: Likewise.
	* sysdeps/csky/nptl/Makefile: Likewise.
	* sysdeps/csky/preconfigure: Likewise.
	* sysdeps/csky/tst-audit.h: Likewise.
	* sysdeps/unix/sysv/linux/csky/Implies: Likewise.
	* sysdeps/unix/sysv/linux/csky/Makefile: Likewise.
	* sysdeps/unix/sysv/linux/csky/configure: Likewise.
	* sysdeps/unix/sysv/linux/csky/configure.ac: Likewise.
---
 sysdeps/csky/Implies                      |  4 ++++
 sysdeps/csky/Makefile                     | 13 +++++++++++
 sysdeps/csky/configure                    |  4 ++++
 sysdeps/csky/configure.ac                 |  4 ++++
 sysdeps/csky/nofpu/Implies                |  1 +
 sysdeps/csky/nptl/Makefile                | 20 +++++++++++++++++
 sysdeps/csky/preconfigure                 | 37 +++++++++++++++++++++++++++++++
 sysdeps/csky/tst-audit.h                  | 23 +++++++++++++++++++
 sysdeps/unix/sysv/linux/csky/Implies      |  3 +++
 sysdeps/unix/sysv/linux/csky/Makefile     |  8 +++++++
 sysdeps/unix/sysv/linux/csky/configure    |  4 ++++
 sysdeps/unix/sysv/linux/csky/configure.ac |  5 +++++
 12 files changed, 126 insertions(+)
 create mode 100644 sysdeps/csky/Implies
 create mode 100644 sysdeps/csky/Makefile
 create mode 100644 sysdeps/csky/configure
 create mode 100644 sysdeps/csky/configure.ac
 create mode 100644 sysdeps/csky/nofpu/Implies
 create mode 100644 sysdeps/csky/nptl/Makefile
 create mode 100644 sysdeps/csky/preconfigure
 create mode 100644 sysdeps/csky/tst-audit.h
 create mode 100644 sysdeps/unix/sysv/linux/csky/Implies
 create mode 100644 sysdeps/unix/sysv/linux/csky/Makefile
 create mode 100644 sysdeps/unix/sysv/linux/csky/configure
 create mode 100644 sysdeps/unix/sysv/linux/csky/configure.ac

diff --git a/sysdeps/csky/Implies b/sysdeps/csky/Implies
new file mode 100644
index 0000000..f8c3a75
--- /dev/null
+++ b/sysdeps/csky/Implies
@@ -0,0 +1,4 @@
+wordsize-32
+# C-SKY uses IEEE 754 floating point.
+ieee754/flt-32
+ieee754/dbl-64
diff --git a/sysdeps/csky/Makefile b/sysdeps/csky/Makefile
new file mode 100644
index 0000000..4fa84bc
--- /dev/null
+++ b/sysdeps/csky/Makefile
@@ -0,0 +1,13 @@
+ifeq ($(subdir),csu)
+gen-as-const-headers += tcb-offsets.sym
+endif
+
+ifeq ($(subdir),debug)
+CFLAGS-backtrace.c += -funwind-tables
+endif
+
+ASFLAGS-.os += $(pic-ccflag)
+
+ifeq ($(subdir),gmon)
+sysdep_routines += csky-mcount
+endif
diff --git a/sysdeps/csky/configure b/sysdeps/csky/configure
new file mode 100644
index 0000000..19acb08
--- /dev/null
+++ b/sysdeps/csky/configure
@@ -0,0 +1,4 @@
+# This file is generated from configure.ac by Autoconf.  DO NOT EDIT!
+ # Local configure fragment for sysdeps/csky.
+
+$as_echo "#define PI_STATIC_AND_HIDDEN 1" >>confdefs.h
diff --git a/sysdeps/csky/configure.ac b/sysdeps/csky/configure.ac
new file mode 100644
index 0000000..5656b66
--- /dev/null
+++ b/sysdeps/csky/configure.ac
@@ -0,0 +1,4 @@
+GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
+# Local configure fragment for sysdeps/csky.
+
+AC_DEFINE(PI_STATIC_AND_HIDDEN)
diff --git a/sysdeps/csky/nofpu/Implies b/sysdeps/csky/nofpu/Implies
new file mode 100644
index 0000000..abcbadb
--- /dev/null
+++ b/sysdeps/csky/nofpu/Implies
@@ -0,0 +1 @@
+ieee754/soft-fp
diff --git a/sysdeps/csky/nptl/Makefile b/sysdeps/csky/nptl/Makefile
new file mode 100644
index 0000000..a80a979
--- /dev/null
+++ b/sysdeps/csky/nptl/Makefile
@@ -0,0 +1,20 @@
+# Copyright (C) 2018 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/>.
+
+ifeq ($(subdir),csu)
+gen-as-const-headers += tcb-offsets.sym
+endif
diff --git a/sysdeps/csky/preconfigure b/sysdeps/csky/preconfigure
new file mode 100644
index 0000000..99df449
--- /dev/null
+++ b/sysdeps/csky/preconfigure
@@ -0,0 +1,37 @@
+case "$machine" in
+csky*)
+    abi=`$CC $CFLAGS $CPPFLAGS -E -dM -xc /dev/null |
+      sed -n 's/^#define __CSKYABI__ \(.*\)/\1/p'`
+    float_abi=`$CC $CFLAGS $CPPFLAGS -E -dM -xc /dev/null |
+      sed -n 's/^#define __CSKY_HARD_FLOAT__ \(.*\)/\1/p'`
+
+    case "$abi" in
+    1)
+        echo "glibc does not support abiv1 yet" >&2
+        exit 1
+        ;;
+    2)
+        machine=abiv2
+        ;;
+    *)
+        echo "Unknow abi" >&2
+        exit 1
+        ;;
+    esac
+
+    case "$float_abi" in
+    1)
+        with_fp_cond=1
+        ;;
+    *)
+        with_fp_cond=0
+        ;;
+    esac
+
+    base_machine=csky
+    machine=csky/$machine
+
+    $as_echo "#define CSKYABI $abi" >>confdefs.h
+    $as_echo "#define CSKY_HARD_FLOAT $float_abi" >>confdefs.h
+    ;;
+esac
diff --git a/sysdeps/csky/tst-audit.h b/sysdeps/csky/tst-audit.h
new file mode 100644
index 0000000..6c64625
--- /dev/null
+++ b/sysdeps/csky/tst-audit.h
@@ -0,0 +1,23 @@
+/* Definitions for testing PLT entry/exit auditing.  C-SKY version.
+   Copyright (C) 2018 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 pltenter la_csky_gnu_pltenter
+#define pltexit la_csky_gnu_pltexit
+#define La_regs La_csky_regs
+#define La_retval La_csky_retval
+#define int_retval lrv_reg[0]
diff --git a/sysdeps/unix/sysv/linux/csky/Implies b/sysdeps/unix/sysv/linux/csky/Implies
new file mode 100644
index 0000000..f37776c
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/csky/Implies
@@ -0,0 +1,3 @@
+unix/sysv/linux/generic/wordsize-32
+unix/sysv/linux/generic
+csky/nptl
diff --git a/sysdeps/unix/sysv/linux/csky/Makefile b/sysdeps/unix/sysv/linux/csky/Makefile
new file mode 100644
index 0000000..4462bc0
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/csky/Makefile
@@ -0,0 +1,8 @@
+ifeq ($(subdir),misc)
+sysdep_routines += cacheflush
+sysdep_headers += sys/cachectl.h
+endif
+
+ifeq ($(subdir),stdlib)
+gen-as-const-headers += ucontext_i.sym
+endif
diff --git a/sysdeps/unix/sysv/linux/csky/configure b/sysdeps/unix/sysv/linux/csky/configure
new file mode 100644
index 0000000..4daed57
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/csky/configure
@@ -0,0 +1,4 @@
+# This file is generated from configure.ac by Autoconf.  DO NOT EDIT!
+
+arch_minimum_kernel=4.1x.0
+ldd_rewrite_script=sysdeps/unix/sysv/linux/ldd-rewrite.sed
diff --git a/sysdeps/unix/sysv/linux/csky/configure.ac b/sysdeps/unix/sysv/linux/csky/configure.ac
new file mode 100644
index 0000000..ae46544
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/csky/configure.ac
@@ -0,0 +1,5 @@
+GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
+# Local configure fragment for sysdeps/unix/sysv/linux/csky
+
+arch_minimum_kernel=4.1x.0
+ldd_rewrite_script=sysdeps/unix/sysv/linux/ldd-rewrite.sed
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [RFC PATCH v3 11/12] C-SKY: Add build-many-glibcs.py support
  2018-06-29  7:58 [RFC PATCH v3 00/12] port C-SKY to glibc Mao Han
                   ` (9 preceding siblings ...)
  2018-06-29  7:58 ` [RFC PATCH v3 10/12] C-SKY: Build Infastructure Mao Han
@ 2018-06-29  7:58 ` Mao Han
  2018-06-29 16:44   ` Joseph Myers
  2018-06-29  7:58 ` [RFC PATCH v3 12/12] C-SKY: Skeleton documentation Mao Han
  11 siblings, 1 reply; 22+ messages in thread
From: Mao Han @ 2018-06-29  7:58 UTC (permalink / raw
  To: libc-alpha; +Cc: Mao Han, c-sky_gcc_upstream, gnu-csky

	* scripts/build-many-glibcs.py: Add C-SKY targets
---
 scripts/build-many-glibcs.py | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/scripts/build-many-glibcs.py b/scripts/build-many-glibcs.py
index 601718d..3d658b2a 100755
--- a/scripts/build-many-glibcs.py
+++ b/scripts/build-many-glibcs.py
@@ -191,6 +191,12 @@ class Context(object):
                         variant='be8',
                         gcc_cfg=['--with-float=hard', '--with-arch=armv7-a',
                                  '--with-fpu=vfpv3'])
+        self.add_config(arch='csky',
+                        os_name='linux-gnuabiv2',
+                        gcc_cfg=['--disable-multilib'])
+        self.add_config(arch='csky',
+                        os_name='linux-gnuabiv2',
+                        gcc_cfg=['--with-float=hard', '--disable-multilib'])
         self.add_config(arch='hppa',
                         os_name='linux-gnu')
         self.add_config(arch='i686',
@@ -1247,6 +1253,7 @@ class Config(object):
         arch_map = {'aarch64': 'arm64',
                     'alpha': 'alpha',
                     'arm': 'arm',
+                    'csky': 'csky',
                     'hppa': 'parisc',
                     'i486': 'x86',
                     'i586': 'x86',
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [RFC PATCH v3 12/12] C-SKY: Skeleton documentation
  2018-06-29  7:58 [RFC PATCH v3 00/12] port C-SKY to glibc Mao Han
                   ` (10 preceding siblings ...)
  2018-06-29  7:58 ` [RFC PATCH v3 11/12] C-SKY: Add build-many-glibcs.py support Mao Han
@ 2018-06-29  7:58 ` Mao Han
  11 siblings, 0 replies; 22+ messages in thread
From: Mao Han @ 2018-06-29  7:58 UTC (permalink / raw
  To: libc-alpha; +Cc: Mao Han, c-sky_gcc_upstream, gnu-csky

---
 ChangeLog | 144 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 NEWS      |   3 ++
 README    |   1 +
 3 files changed, 148 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index b1d694a..5a7f377 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,147 @@
+2018-06-29 Han Mao <han_mao@c-sky.com>
+
+	* elf/elf.h (EM_CSKY, R_CKCORE_NONE, R_CKCORE_ADDR32)
+	(R_CKCORE_PCRELIMM8BY4, R_CKCORE_PCRELIMM11BY2, R_CKCORE_PCREL32)
+	(R_CKCORE_PCRELJSR_IMM11BY2, R_CKCORE_RELATIVE, R_CKCORE_COPY)
+	(R_CKCORE_GLOB_DAT, R_CKCORE_JUMP_SLOT, R_CKCORE_GOTOFF)
+	(R_CKCORE_GOTPC, R_CKCORE_GOT32, R_CKCORE_PLT32, R_CKCORE_ADDRGOT)
+	(R_CKCORE_ADDRPLT, R_CKCORE_PCREL_IMM26BY2, R_CKCORE_PCREL_IMM16BY2)
+	(R_CKCORE_PCREL_IMM16BY4, R_CKCORE_PCREL_IMM10BY2)
+	(R_CKCORE_PCREL_IMM10BY4, R_CKCORE_ADDR_HI16, R_CKCORE_ADDR_LO16)
+	(R_CKCORE_GOTPC_HI16, R_CKCORE_GOTPC_LO16, R_CKCORE_GOTOFF_HI16)
+	(R_CKCORE_GOTOFF_LO16, R_CKCORE_GOT12, R_CKCORE_GOT_HI16)
+	(R_CKCORE_GOT_LO16, R_CKCORE_PLT12, R_CKCORE_PLT_HI16)
+	(R_CKCORE_PLT_LO16, R_CKCORE_ADDRGOT_HI16, R_CKCORE_ADDRGOT_LO16)
+	(R_CKCORE_ADDRPLT_HI16, R_CKCORE_ADDRPLT_LO16)
+	(R_CKCORE_PCREL_JSR_IMM26BY2, R_CKCORE_TOFFSET_LO16)
+	(R_CKCORE_DOFFSET_LO16, R_CKCORE_PCREL_IMM18BY2)
+	(R_CKCORE_DOFFSET_IMM18, R_CKCORE_DOFFSET_IMM18BY2)
+	(R_CKCORE_DOFFSET_IMM18BY4, R_CKCORE_GOT_IMM18BY4)
+	(R_CKCORE_PLT_IMM18BY4, R_CKCORE_PCREL_IMM7BY4, R_CKCORE_TLS_LE32)
+	(R_CKCORE_TLS_IE32, R_CKCORE_TLS_GD32, R_CKCORE_TLS_LDM32)
+	(R_CKCORE_TLS_LDO32, R_CKCORE_TLS_DTPMOD32, R_CKCORE_TLS_DTPOFF32)
+	(R_CKCORE_TLS_TPOFF32): New Define.
+	* scripts/build-many-glibcs.py: Add C-SKY targets
+	* sysdeps/csky/Implies: New file.
+	* sysdeps/csky/Makefile: Likewise.
+	* sysdeps/csky/abiv2/__longjmp.S: Likewise.
+	* sysdeps/csky/abiv2/csky-mcount.S: Likewise.
+	* sysdeps/csky/abiv2/dl-trampoline.S: Likewise.
+	* sysdeps/csky/abiv2/memcpy.S: Likewise.
+	* sysdeps/csky/abiv2/setjmp.S: Likewise.
+	* sysdeps/csky/abiv2/start.S: Likewise.
+	* sysdeps/csky/abiv2/strcmp.S: Likewise.
+	* sysdeps/csky/abiv2/strcpy.S: Likewise.
+	* sysdeps/csky/abiv2/tls-macros.h: Likewise.
+	* sysdeps/csky/abort-instr.h: Likewise.
+	* sysdeps/csky/atomic-machine.h: Likewise.
+	* sysdeps/csky/bits/endian.h: Likewise.
+	* sysdeps/csky/bits/fenv.h: Likewise.
+	* sysdeps/csky/bits/link.h: Likewise.
+	* sysdeps/csky/bits/setjmp.h: Likewise.
+	* sysdeps/csky/bsd-_setjmp.S: Likewise.
+	* sysdeps/csky/bsd-setjmp.S: Likewise.
+	* sysdeps/csky/configure: Likewise.
+	* sysdeps/csky/configure.ac: Likewise.
+	* sysdeps/csky/crti.S: Likewise.
+	* sysdeps/csky/crtn.S: Likewise.
+	* sysdeps/csky/dl-machine.h: Likewise.
+	* sysdeps/csky/dl-procinfo.c: Likewise.
+	* sysdeps/csky/dl-procinfo.h: Likewise.
+	* sysdeps/csky/dl-sysdep.h: Likewise.
+	* sysdeps/csky/dl-tls.h: Likewise.
+	* sysdeps/csky/fpu/fclrexcpt.c: Likewise.
+	* sysdeps/csky/fpu/fedisblxcpt.c: Likewise.
+	* sysdeps/csky/fpu/feenablxcpt.c: Likewise.
+	* sysdeps/csky/fpu/fegetenv.c: Likewise.
+	* sysdeps/csky/fpu/fegetexcept.c: Likewise.
+	* sysdeps/csky/fpu/fegetmode.c: Likewise.
+	* sysdeps/csky/fpu/fegetround.c: Likewise.
+	* sysdeps/csky/fpu/feholdexcpt.c: Likewise.
+	* sysdeps/csky/fpu/fenv_libc.h: Likewise.
+	* sysdeps/csky/fpu/fenv_private.h: Likewise.
+	* sysdeps/csky/fpu/fesetenv.c: Likewise.
+	* sysdeps/csky/fpu/fesetexcept.c: Likewise.
+	* sysdeps/csky/fpu/fesetmode.c: Likewise.
+	* sysdeps/csky/fpu/fesetround.c: Likewise.
+	* sysdeps/csky/fpu/feupdateenv.c: Likewise.
+	* sysdeps/csky/fpu/fgetexcptflg.c: Likewise.
+	* sysdeps/csky/fpu/fpu_control.h: Likewise.
+	* sysdeps/csky/fpu/fraiseexcpt.c: Likewise.
+	* sysdeps/csky/fpu/fsetexcptflg.c: Likewise.
+	* sysdeps/csky/fpu/ftestexcept.c: Likewise.
+	* sysdeps/csky/fpu/math_private.h: Likewise.
+	* sysdeps/csky/gccframe.h: Likewise.
+	* sysdeps/csky/jmpbuf-unwind.h: Likewise.
+	* sysdeps/csky/ldsodefs.h: Likewise.
+	* sysdeps/csky/libc-tls.c: Likewise.
+	* sysdeps/csky/libm-test-ulps: Likewise.
+	* sysdeps/csky/libm-test-ulps-name: Likewise.
+	* sysdeps/csky/linkmap.h: Likewise.
+	* sysdeps/csky/machine-gmon.h: Likewise.
+	* sysdeps/csky/math-tests.h: Likewise.
+	* sysdeps/csky/memusage.h: Likewise.
+	* sysdeps/csky/nofpu/Implies: Likewise.
+	* sysdeps/csky/nptl/Makefile: Likewise.
+	* sysdeps/csky/nptl/bits/pthreadtypes-arch.h: Likewise.
+	* sysdeps/csky/nptl/bits/semaphore.h: Likewise.
+	* sysdeps/csky/nptl/pthread-offsets.h: Likewise.
+	* sysdeps/csky/nptl/pthreaddef.h: Likewise.
+	* sysdeps/csky/nptl/tcb-offsets.sym: Likewise.
+	* sysdeps/csky/nptl/tls.h: Likewise.
+	* sysdeps/csky/preconfigure: Likewise.
+	* sysdeps/csky/sfp-machine.h: Likewise.
+	* sysdeps/csky/sotruss-lib.c: Likewise.
+	* sysdeps/csky/stackinfo.h: Likewise.
+	* sysdeps/csky/sysdep.h: Likewise.
+	* sysdeps/csky/tst-audit.h: Likewise.
+	* sysdeps/unix/sysv/linux/csky/Implies: Likewise.
+	* sysdeps/unix/sysv/linux/csky/Makefile: Likewise.
+	* sysdeps/unix/sysv/linux/csky/Versions: Likewise.
+	* sysdeps/unix/sysv/linux/csky/abiv2/____longjmp_chk.S: Likewise.
+	* sysdeps/unix/sysv/linux/csky/abiv2/clone.S: Likewise.
+	* sysdeps/unix/sysv/linux/csky/abiv2/getcontext.S: Likewise.
+	* sysdeps/unix/sysv/linux/csky/abiv2/setcontext.S: Likewise.
+	* sysdeps/unix/sysv/linux/csky/abiv2/swapcontext.S: Likewise.
+	* sysdeps/unix/sysv/linux/csky/abiv2/syscall.S: Likewise.
+	* sysdeps/unix/sysv/linux/csky/abiv2/sysdep.S: Likewise.
+	* sysdeps/unix/sysv/linux/csky/abiv2/ucontext_i.sym: Likewise.
+	* sysdeps/unix/sysv/linux/csky/bits/mman.h: Likewise.
+	* sysdeps/unix/sysv/linux/csky/bits/shm.h: Likewise.
+	* sysdeps/unix/sysv/linux/csky/c++-types.data: Likewise.
+	* sysdeps/unix/sysv/linux/csky/configure: Likewise.
+	* sysdeps/unix/sysv/linux/csky/configure.ac: Likewise.
+	* sysdeps/unix/sysv/linux/csky/ipc_priv.h: Likewise.
+	* sysdeps/unix/sysv/linux/csky/jmp_buf-macros.h: Likewise.
+	* sysdeps/unix/sysv/linux/csky/kernel-features.h: Likewise.
+	* sysdeps/unix/sysv/linux/csky/ld.abilist: Likewise.
+	* sysdeps/unix/sysv/linux/csky/ldconfig.h: Likewise.
+	* sysdeps/unix/sysv/linux/csky/libBrokenLocale.abilist: Likewise.
+	* sysdeps/unix/sysv/linux/csky/libanl.abilist: Likewise.
+	* sysdeps/unix/sysv/linux/csky/libc.abilist: Likewise.
+	* sysdeps/unix/sysv/linux/csky/libcrypt.abilist: Likewise.
+	* sysdeps/unix/sysv/linux/csky/libdl.abilist: Likewise.
+	* sysdeps/unix/sysv/linux/csky/libm.abilist: Likewise.
+	* sysdeps/unix/sysv/linux/csky/libnsl.abilist: Likewise.
+	* sysdeps/unix/sysv/linux/csky/libpthread.abilist: Likewise.
+	* sysdeps/unix/sysv/linux/csky/libresolv.abilist: Likewise.
+	* sysdeps/unix/sysv/linux/csky/librt.abilist: Likewise.
+	* sysdeps/unix/sysv/linux/csky/libthread_db.abilist: Likewise.
+	* sysdeps/unix/sysv/linux/csky/libutil.abilist: Likewise.
+	* sysdeps/unix/sysv/linux/csky/localplt.data: Likewise.
+	* sysdeps/unix/sysv/linux/csky/makecontext.c: Likewise.
+	* sysdeps/unix/sysv/linux/csky/profil-counter.h: Likewise.
+	* sysdeps/unix/sysv/linux/csky/pt-vfork.S: Likewise.
+	* sysdeps/unix/sysv/linux/csky/register-dump.h: Likewise.
+	* sysdeps/unix/sysv/linux/csky/shlib-versions: Likewise.
+	* sysdeps/unix/sysv/linux/csky/sigcontextinfo.h: Likewise.
+	* sysdeps/unix/sysv/linux/csky/sys/cachectl.h: Likewise.
+	* sysdeps/unix/sysv/linux/csky/sys/procfs.h: Likewise.
+	* sysdeps/unix/sysv/linux/csky/sys/ucontext.h: Likewise.
+	* sysdeps/unix/sysv/linux/csky/sys/user.h: Likewise.
+	* sysdeps/unix/sysv/linux/csky/syscalls.list: Likewise.
+	* sysdeps/unix/sysv/linux/csky/sysdep.h: Likewise.
+
 2018-06-06  Tulio Magno Quites Machado Filho  <tuliom@linux.ibm.com>
 
 	* sysdeps/powerpc/powerpc64/le/fpu/e_sqrtf128.c
diff --git a/NEWS b/NEWS
index e2a6f45..da1c10a 100644
--- a/NEWS
+++ b/NEWS
@@ -41,6 +41,9 @@ Major new features:
   NI_IDN_ALLOW_UNASSIGNED, NI_IDN_USE_STD3_ASCII_RULES) have been
   deprecated.  They no longer have any effect.
 
+* Support for the C-SKY ABIV2 running on Linux has been added.  This port
+  requires at least binutils-2.3x, gcc-7.x.0, and linux-4.1x.
+
 Deprecated and removed features, and other changes affecting compatibility:
 
 * The nonstandard header files <libio.h> and <_G_config.h> are no longer
diff --git a/README b/README
index 27a9fd4..eb9b0b3 100644
--- a/README
+++ b/README
@@ -25,6 +25,7 @@ The GNU C Library supports these configurations for using Linux kernels:
 	aarch64*-*-linux-gnu
 	alpha*-*-linux-gnu
 	arm-*-linux-gnueabi
+	csky-*-linux-gnuabiv2
 	hppa-*-linux-gnu
 	i[4567]86-*-linux-gnu
 	x86_64-*-linux-gnu	Can build either x86_64 or x32
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* Re: [RFC PATCH v3 05/12] C-SKY: Atomic and Locking Routines
  2018-06-29  7:58 ` [RFC PATCH v3 05/12] C-SKY: Atomic and Locking Routines Mao Han
@ 2018-06-29 16:36   ` Joseph Myers
  2018-07-03  7:56     ` Mao Han
  0 siblings, 1 reply; 22+ messages in thread
From: Joseph Myers @ 2018-06-29 16:36 UTC (permalink / raw
  To: Mao Han; +Cc: libc-alpha, c-sky_gcc_upstream, gnu-csky

On Fri, 29 Jun 2018, Mao Han wrote:

> +#define USE_ATOMIC_COMPILER_BUILTINS 0

Does this mean the compiler expands the atomic built-in function calls to 
out-of-line calls to libgcc or libatomic, but you wish to use inline 
expansions in glibc?  (That's the main case when 
USE_ATOMIC_COMPILER_BUILTINS 0 is appropriate.  If there are suitable 
atomic instructions, typically the compiler would expand the calls inline 
and USE_ATOMIC_COMPILER_BUILTINS 1 is most appropriate rather than using 
inline asm for atomics.)

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [RFC PATCH v3 01/12] C-SKY: ABI related code
  2018-06-29  7:58 ` [RFC PATCH v3 01/12] C-SKY: ABI related code Mao Han
@ 2018-06-29 16:40   ` Joseph Myers
  2018-07-03  8:03     ` Mao Han
  0 siblings, 1 reply; 22+ messages in thread
From: Joseph Myers @ 2018-06-29 16:40 UTC (permalink / raw
  To: Mao Han; +Cc: libc-alpha, c-sky_gcc_upstream, gnu-csky

On Fri, 29 Jun 2018, Mao Han wrote:

> Codes in this patch contains lots of C-SKY ABI related code. They are written
> accroding to the registers assgnments, relocations, assemblly described
> in C-SKY CPU ABI Standards and C-SKY CPU manual.

Could you include direct URLs to PDFs of these manuals in the introduction 
to future versions of the patch series (like you gave URLs for your GCC / 
binutils / Linux git repositories)?

> +#ifndef __CSKYABIV2__
> +#error "No support for C-SKY ABIV1"

Preprocessor indentation, "# error" inside #if.

> +#else
> +# define CSKY_ABIV2
> +#endif

Why do you need this macro rather than just using the predefined 
__CSKYABIV2__ anywhere needing an ABI conditional?  (Right now, of course, 
any such ABI conditionals will just have #error for the ABIv1 case, like 
the one here.)

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [RFC PATCH v3 11/12] C-SKY: Add build-many-glibcs.py support
  2018-06-29  7:58 ` [RFC PATCH v3 11/12] C-SKY: Add build-many-glibcs.py support Mao Han
@ 2018-06-29 16:44   ` Joseph Myers
  0 siblings, 0 replies; 22+ messages in thread
From: Joseph Myers @ 2018-06-29 16:44 UTC (permalink / raw
  To: Mao Han; +Cc: libc-alpha, c-sky_gcc_upstream, gnu-csky

On Fri, 29 Jun 2018, Mao Han wrote:

> 	* scripts/build-many-glibcs.py: Add C-SKY targets
> ---
>  scripts/build-many-glibcs.py | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/scripts/build-many-glibcs.py b/scripts/build-many-glibcs.py
> index 601718d..3d658b2a 100755
> --- a/scripts/build-many-glibcs.py
> +++ b/scripts/build-many-glibcs.py
> @@ -191,6 +191,12 @@ class Context(object):
>                          variant='be8',
>                          gcc_cfg=['--with-float=hard', '--with-arch=armv7-a',
>                                   '--with-fpu=vfpv3'])
> +        self.add_config(arch='csky',
> +                        os_name='linux-gnuabiv2',
> +                        gcc_cfg=['--disable-multilib'])
> +        self.add_config(arch='csky',
> +                        os_name='linux-gnuabiv2',
> +                        gcc_cfg=['--with-float=hard', '--disable-multilib'])

If you have more than one variant with the same arch and os_name, you need 
to have variant='something' to avoid them using the same build directories 
etc.

Also, since you appear to support both big and little endian, you should 
include those variants as well.  Every mutually incompatible ABI variant 
supported by the port should be tested in build-many-glibcs.py (whether 
any non-ABI variants are also tested depends on whether they are different 
enough to be likely to have build issues specific to one such variant).

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [RFC PATCH v3 10/12] C-SKY: Build Infastructure
  2018-06-29  7:58 ` [RFC PATCH v3 10/12] C-SKY: Build Infastructure Mao Han
@ 2018-06-29 16:45   ` Joseph Myers
  0 siblings, 0 replies; 22+ messages in thread
From: Joseph Myers @ 2018-06-29 16:45 UTC (permalink / raw
  To: Mao Han; +Cc: libc-alpha, c-sky_gcc_upstream, gnu-csky

On Fri, 29 Jun 2018, Mao Han wrote:

> +    *)
> +        echo "Unknow abi" >&2
> +        exit 1

Typo, should be"Unknown".

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [RFC PATCH v3 07/12] C-SKY: Linux ABI
  2018-06-29  7:58 ` [RFC PATCH v3 07/12] C-SKY: Linux ABI Mao Han
@ 2018-06-29 16:53   ` Joseph Myers
  2018-07-03  8:00     ` Mao Han
  0 siblings, 1 reply; 22+ messages in thread
From: Joseph Myers @ 2018-06-29 16:53 UTC (permalink / raw
  To: Mao Han; +Cc: libc-alpha, c-sky_gcc_upstream, gnu-csky

On Fri, 29 Jun 2018, Mao Han wrote:

> +/* ipcs ctl commands */
> +# define SHM_STAT 	13
> +# define SHM_INFO 	14

This is out of date (missing SHM_STAT_ANY).  You need to watch out for 
global changes to many or all ports (any such changes since the glibc 
version with which you started your port) and make sure you keep 
architecture-specific headers up to date with such changes.

> diff --git a/sysdeps/unix/sysv/linux/csky/shlib-versions b/sysdeps/unix/sysv/linux/csky/shlib-versions
> new file mode 100644
> index 0000000..15d5d7e
> --- /dev/null
> +++ b/sysdeps/unix/sysv/linux/csky/shlib-versions
> @@ -0,0 +1,9 @@
> +DEFAULT			GLIBC_2.28
> +
> +%if CSKYABI == 2 && CSKY_HARD_FLOAT == 0
> +ld=ld-linux-cskyv2-sfp-le.so.1
> +%elif CSKYABI == 2 && CSKY_HARD_FLOAT == 1
> +ld=ld-linux-cskyv2-hfp-le.so.1
> +%else
> +%error cannot determine ABI
> +%endif

Since you support both BE and LE (conditionals elsewhere providing 
substantive support for both rather than just errors for BE), I'd expect 
BE dynamic linker names as well.

> diff --git a/sysdeps/unix/sysv/linux/csky/sigcontextinfo.h b/sysdeps/unix/sysv/linux/csky/sigcontextinfo.h
> new file mode 100644
> index 0000000..a9f55f6
> --- /dev/null
> +++ b/sysdeps/unix/sysv/linux/csky/sigcontextinfo.h

See my commit a44061398c3b531b37e134a6a97accb2251fa28a.  There are macros 
in this header I'd expect to be removed (again, review many-ports changes 
since you started the port to make sure you are up to date with such 
changes).

> +typedef struct
> +  {
> +    unsigned long __ctx(tls);
> +    unsigned long __ctx(lr);
> +    unsigned long __ctx(pc);
> +    unsigned long __ctx(sr);
> +    unsigned long __ctx(usp);

As a new port I'd like to suggest you name all your ucontext fields with 
leading __ unconditionally, so you don't need __ctx to make the names 
depend on __USE_MISC.

> +struct user_regs {
> +#if defined(__ck807__) || defined(__ck810__) || defined(__ck860__)
> +  unsigned long int uregs[34];	/* CSKY V2 has 32 general rgister */
> +#else
> +  unsigned long int uregs[18];	/* CSKY V1 has 16 general rgister */

"register", missing "." (and second space) at end of comment.  Is V1 
something different from ABIv1 which isn't being supported initially?

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [RFC PATCH v3 05/12] C-SKY: Atomic and Locking Routines
  2018-06-29 16:36   ` Joseph Myers
@ 2018-07-03  7:56     ` Mao Han
  2018-07-17 20:03       ` Joseph Myers
  0 siblings, 1 reply; 22+ messages in thread
From: Mao Han @ 2018-07-03  7:56 UTC (permalink / raw
  To: Joseph Myers; +Cc: c-sky_gcc_upstream, gnu-csky, libc-alpha

On Fri, Jun 29, 2018 at 04:36:19PM +0000, Joseph Myers wrote:
> On Fri, 29 Jun 2018, Mao Han wrote:
> 
> > +#define USE_ATOMIC_COMPILER_BUILTINS 0
> 
> Does this mean the compiler expands the atomic built-in function calls to 
> out-of-line calls to libgcc or libatomic, but you wish to use inline 
> expansions in glibc?  (That's the main case when 
> USE_ATOMIC_COMPILER_BUILTINS 0 is appropriate.  If there are suitable 
> atomic instructions, typically the compiler would expand the calls inline 
> and USE_ATOMIC_COMPILER_BUILTINS 1 is most appropriate rather than using 
> inline asm for atomics.)
> 
> -- 
> Joseph S. Myers
> joseph@codesourcery.com
Thanks a lot for the feedfack.
The macro seems someting to reduce architecture-specific code
needed to support C11-like atomics? If compiler can expands the
atomic built-in to the correct call, either libgcc or libatomic(inline)
, it is suggested to define USE_ATOMIC_COMPILER_BUILTINS to 1?
I don't know what will the difference between out-of-line call and
inline call affect on the linux system. effciency?
I'm also not sure about the macro ATOMIC_EXCHANGE_USES_CAS.
We don't have any exchange instruction.
We've only got CAS loop implement with linux helper on ck807/ck810 in libgcc,
and one implement with load-store Exclusive on ck860.
According to comment in pthread_spin_trylock.c ATOMIC_EXCHANGE_USES_CAS
should define to 1 if exchange is not supported? I did not found any
difference while running testsuits.
Is it better to have the atomic-machine.h like this below?

#define __HAVE_64B_ATOMICS 0
#define USE_ATOMIC_COMPILER_BUILTINS 1
#define ATOMIC_EXCHANGE_USES_CAS 1

#define __arch_compare_and_exchange_bool_8_int(mem, newval, oldval, model) \
  (abort (), 0)

#define __arch_compare_and_exchange_bool_16_int(mem, newval, oldval, model) \
  (abort (), 0)

#define __arch_compare_and_exchange_bool_32_int(mem, newval, oldval, model) \
  ({                                                                    \
    typeof (*mem) __oldval = (oldval);                                  \
    !__atomic_compare_exchange_n (mem, (void *) &__oldval, newval, 0,   \
                                  model, __ATOMIC_RELAXED);             \
  })
#define __arch_compare_and_exchange_bool_64_int(mem, newval, oldval, model) \
  (abort (), 0)

#define __arch_compare_and_exchange_val_8_int(mem, newval, oldval, model) \
  (abort (), (__typeof (*mem)) 0)

#define __arch_compare_and_exchange_val_16_int(mem, newval, oldval, model) \
  (abort (), (__typeof (*mem)) 0)

#define __arch_compare_and_exchange_val_32_int(mem, newval, oldval, model) \
  ({                                                                    \
    typeof (*mem) __oldval = (oldval);                                  \
    __atomic_compare_exchange_n (mem, (void *) &__oldval, newval, 0,    \
                                 model, __ATOMIC_RELAXED);              \
    __oldval;                                                           \
  })

#define __arch_compare_and_exchange_val_64_int(mem, newval, oldval, model) \
  (abort (), (__typeof (*mem)) 0)

#define atomic_compare_and_exchange_bool_acq(mem, new, old)             \
  __atomic_bool_bysize (__arch_compare_and_exchange_bool, int,          \
                        mem, new, old, __ATOMIC_ACQUIRE)

#define atomic_compare_and_exchange_val_acq(mem, new, old)              \
  __atomic_val_bysize (__arch_compare_and_exchange_val, int,            \
                       mem, new, old, __ATOMIC_ACQUIRE)


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [RFC PATCH v3 07/12] C-SKY: Linux ABI
  2018-06-29 16:53   ` Joseph Myers
@ 2018-07-03  8:00     ` Mao Han
  0 siblings, 0 replies; 22+ messages in thread
From: Mao Han @ 2018-07-03  8:00 UTC (permalink / raw
  To: Joseph Myers; +Cc: c-sky_gcc_upstream, gnu-csky, libc-alpha

On Fri, Jun 29, 2018 at 04:53:23PM +0000, Joseph Myers wrote:
> On Fri, 29 Jun 2018, Mao Han wrote:
> 
> > +/* ipcs ctl commands */
> > +# define SHM_STAT 	13
> > +# define SHM_INFO 	14
> 
> This is out of date (missing SHM_STAT_ANY).  You need to watch out for 
> global changes to many or all ports (any such changes since the glibc 
> version with which you started your port) and make sure you keep 
> architecture-specific headers up to date with such changes.
>

OK. I'll watch out for those changes.
 
> > diff --git a/sysdeps/unix/sysv/linux/csky/shlib-versions b/sysdeps/unix/sysv/linux/csky/shlib-versions
> > new file mode 100644
> > index 0000000..15d5d7e
> > --- /dev/null
> > +++ b/sysdeps/unix/sysv/linux/csky/shlib-versions
> > @@ -0,0 +1,9 @@
> > +DEFAULT			GLIBC_2.28
> > +
> > +%if CSKYABI == 2 && CSKY_HARD_FLOAT == 0
> > +ld=ld-linux-cskyv2-sfp-le.so.1
> > +%elif CSKYABI == 2 && CSKY_HARD_FLOAT == 1
> > +ld=ld-linux-cskyv2-hfp-le.so.1
> > +%else
> > +%error cannot determine ABI
> > +%endif
> 
> Since you support both BE and LE (conditionals elsewhere providing 
> substantive support for both rather than just errors for BE), I'd expect 
> BE dynamic linker names as well.

I was intended to support big endian in the patchset, but my colleage
who is responsible for linux do not have this on his short term plan.
I'll remove all the big endian support in the next patch.
> 
> > diff --git a/sysdeps/unix/sysv/linux/csky/sigcontextinfo.h b/sysdeps/unix/sysv/linux/csky/sigcontextinfo.h
> > new file mode 100644
> > index 0000000..a9f55f6
> > --- /dev/null
> > +++ b/sysdeps/unix/sysv/linux/csky/sigcontextinfo.h
> 
> See my commit a44061398c3b531b37e134a6a97accb2251fa28a.  There are macros 
> in this header I'd expect to be removed (again, review many-ports changes 
> since you started the port to make sure you are up to date with such 
> changes).

OK. I'll watch out for those changes.
> 
> > +typedef struct
> > +  {
> > +    unsigned long __ctx(tls);
> > +    unsigned long __ctx(lr);
> > +    unsigned long __ctx(pc);
> > +    unsigned long __ctx(sr);
> > +    unsigned long __ctx(usp);
> 
> As a new port I'd like to suggest you name all your ucontext fields with 
> leading __ unconditionally, so you don't need __ctx to make the names 
> depend on __USE_MISC.

OK
> 
> > +struct user_regs {
> > +#if defined(__ck807__) || defined(__ck810__) || defined(__ck860__)
> > +  unsigned long int uregs[34];	/* CSKY V2 has 32 general rgister */
> > +#else
> > +  unsigned long int uregs[18];	/* CSKY V1 has 16 general rgister */
> 
> "register", missing "." (and second space) at end of comment.  Is V1 
> something different from ABIv1 which isn't being supported initially?

I'll check all the comment to make sure they meet the convention.
Although, some of the cpu under abiv2 got only 16 general registers,
they are not design for linux system. So only this line will be needed.
unsigned long int uregs[34];    /* CSKY V2 has 32 general registers.  */

Best Regards,
Mao Han

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [RFC PATCH v3 01/12] C-SKY: ABI related code
  2018-06-29 16:40   ` Joseph Myers
@ 2018-07-03  8:03     ` Mao Han
  0 siblings, 0 replies; 22+ messages in thread
From: Mao Han @ 2018-07-03  8:03 UTC (permalink / raw
  To: Joseph Myers; +Cc: c-sky_gcc_upstream, gnu-csky, libc-alpha

On Fri, Jun 29, 2018 at 04:40:10PM +0000, Joseph Myers wrote:
> On Fri, 29 Jun 2018, Mao Han wrote:
> 
> > Codes in this patch contains lots of C-SKY ABI related code. They are written
> > accroding to the registers assgnments, relocations, assemblly described
> > in C-SKY CPU ABI Standards and C-SKY CPU manual.
> 
> Could you include direct URLs to PDFs of these manuals in the introduction 
> to future versions of the patch series (like you gave URLs for your GCC / 
> binutils / Linux git repositories)?
>

We currently don't have any technical document put on the internet. I've
asked our toolchain principal to release some. Hopefully they will be
available next time.
 
> Preprocessor indentation, "# error" inside #if.
> 
> > +#else
> > +# define CSKY_ABIV2
> > +#endif
> 
> Why do you need this macro rather than just using the predefined 
> __CSKYABIV2__ anywhere needing an ABI conditional?  (Right now, of course, 
> any such ABI conditionals will just have #error for the ABIv1 case, like 
> the one here.)
It is some legacy code from our first port on 2013. I don't what it is
used for. I think I'll just remove it.

Best Regards,
Mao Han

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [RFC PATCH v3 05/12] C-SKY: Atomic and Locking Routines
  2018-07-03  7:56     ` Mao Han
@ 2018-07-17 20:03       ` Joseph Myers
  0 siblings, 0 replies; 22+ messages in thread
From: Joseph Myers @ 2018-07-17 20:03 UTC (permalink / raw
  To: Mao Han; +Cc: c-sky_gcc_upstream, gnu-csky, libc-alpha

On Tue, 3 Jul 2018, Mao Han wrote:

> The macro seems someting to reduce architecture-specific code
> needed to support C11-like atomics? If compiler can expands the
> atomic built-in to the correct call, either libgcc or libatomic(inline)
> , it is suggested to define USE_ATOMIC_COMPILER_BUILTINS to 1?

If the compiler expands the calls inline, defining 
USE_ATOMIC_COMPILER_BUILTINS to 1 is appropriate unless you have a clear 
reason not to do so (and such a reason would need to have detailed 
comments in glibc explaining it).

If the compiler generates out-of-line libatomic calls for atomic 
operations used in glibc, you need to use inline asm there instead of 
USE_ATOMIC_COMPILER_BUILTINS; glibc is not linked with libatomic.

If the compiler generates out-of-line libgcc calls for atomic operations 
used in glibc, it's possible inline asm will be more efficient.

The main reason for the compiler to generate out-of-line calls is if those 
calls need to use kernel helpers (vDSO / syscalls / etc.).  If the 
processors supported by the port always support suitable atomic 
instructions that can be called directly without needing such kernel 
helpers, the compiler should expand the calls inline, and you should 
define USE_ATOMIC_COMPILER_BUILTINS to 1.

> According to comment in pthread_spin_trylock.c ATOMIC_EXCHANGE_USES_CAS
> should define to 1 if exchange is not supported? I did not found any

Yes.

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2018-07-17 20:03 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-29  7:58 [RFC PATCH v3 00/12] port C-SKY to glibc Mao Han
2018-06-29  7:58 ` [RFC PATCH v3 01/12] C-SKY: ABI related code Mao Han
2018-06-29 16:40   ` Joseph Myers
2018-07-03  8:03     ` Mao Han
2018-06-29  7:58 ` [RFC PATCH v3 02/12] C-SKY: TLS support Mao Han
2018-06-29  7:58 ` [RFC PATCH v3 03/12] C-SKY: Generic math Routines Mao Han
2018-06-29  7:58 ` [RFC PATCH v3 04/12] C-SKY: Hard Float Support Mao Han
2018-06-29  7:58 ` [RFC PATCH v3 05/12] C-SKY: Atomic and Locking Routines Mao Han
2018-06-29 16:36   ` Joseph Myers
2018-07-03  7:56     ` Mao Han
2018-07-17 20:03       ` Joseph Myers
2018-06-29  7:58 ` [RFC PATCH v3 06/12] C-SKY: Linux Syscall Interface Mao Han
2018-06-29  7:58 ` [RFC PATCH v3 07/12] C-SKY: Linux ABI Mao Han
2018-06-29 16:53   ` Joseph Myers
2018-07-03  8:00     ` Mao Han
2018-06-29  7:58 ` [RFC PATCH v3 08/12] C-SKY: ABI Lists Mao Han
2018-06-29  7:58 ` [RFC PATCH v3 09/12] C-SKY: Linux Startup and Dynamic Loading Code Mao Han
2018-06-29  7:58 ` [RFC PATCH v3 10/12] C-SKY: Build Infastructure Mao Han
2018-06-29 16:45   ` Joseph Myers
2018-06-29  7:58 ` [RFC PATCH v3 11/12] C-SKY: Add build-many-glibcs.py support Mao Han
2018-06-29 16:44   ` Joseph Myers
2018-06-29  7:58 ` [RFC PATCH v3 12/12] C-SKY: Skeleton documentation Mao Han

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).