[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commits] r16096 - in /fsf/trunk/ports: ./ data/ sysdeps/tile/ sysdeps/tile/bits/ sysdeps/tile/elf/ sysdeps/tile/nptl/ sysdeps/tile/ti...
- To: commits@xxxxxxxxxx
- Subject: [Commits] r16096 - in /fsf/trunk/ports: ./ data/ sysdeps/tile/ sysdeps/tile/bits/ sysdeps/tile/elf/ sysdeps/tile/nptl/ sysdeps/tile/ti...
- From: eglibc@xxxxxxxxxx
- Date: Mon, 05 Dec 2011 00:03:26 -0000
Author: eglibc
Date: Mon Dec 5 00:03:25 2011
New Revision: 16096
Log:
Import glibc-ports-mainline for 2011-12-05
Added:
fsf/trunk/ports/ChangeLog.linux-generic
fsf/trunk/ports/ChangeLog.tile
fsf/trunk/ports/data/c++-types-tile-linux-gnu.data
fsf/trunk/ports/sysdeps/tile/
fsf/trunk/ports/sysdeps/tile/Implies
fsf/trunk/ports/sysdeps/tile/Makefile
fsf/trunk/ports/sysdeps/tile/Versions
fsf/trunk/ports/sysdeps/tile/__longjmp.S
fsf/trunk/ports/sysdeps/tile/__tls_get_addr.S
fsf/trunk/ports/sysdeps/tile/_mcount.S
fsf/trunk/ports/sysdeps/tile/abort-instr.h
fsf/trunk/ports/sysdeps/tile/backtrace.c
fsf/trunk/ports/sysdeps/tile/bits/
fsf/trunk/ports/sysdeps/tile/bits/atomic.h
fsf/trunk/ports/sysdeps/tile/bits/byteswap.h
fsf/trunk/ports/sysdeps/tile/bits/endian.h
fsf/trunk/ports/sysdeps/tile/bits/fenv.h
fsf/trunk/ports/sysdeps/tile/bits/link.h
fsf/trunk/ports/sysdeps/tile/bits/mathdef.h
fsf/trunk/ports/sysdeps/tile/bits/mathinline.h
fsf/trunk/ports/sysdeps/tile/bits/setjmp.h
fsf/trunk/ports/sysdeps/tile/bsd-_setjmp.S
fsf/trunk/ports/sysdeps/tile/bsd-setjmp.S
fsf/trunk/ports/sysdeps/tile/bzero.S
fsf/trunk/ports/sysdeps/tile/dl-lookupcfg.h
fsf/trunk/ports/sysdeps/tile/dl-machine.h
fsf/trunk/ports/sysdeps/tile/dl-runtime.c
fsf/trunk/ports/sysdeps/tile/dl-start.S
fsf/trunk/ports/sysdeps/tile/dl-tls.c
fsf/trunk/ports/sysdeps/tile/dl-tls.h
fsf/trunk/ports/sysdeps/tile/dl-trampoline.S
fsf/trunk/ports/sysdeps/tile/elf/
fsf/trunk/ports/sysdeps/tile/elf/start.S
fsf/trunk/ports/sysdeps/tile/fegetenv.c
fsf/trunk/ports/sysdeps/tile/fegetround.c
fsf/trunk/ports/sysdeps/tile/feholdexcpt.c
fsf/trunk/ports/sysdeps/tile/fesetenv.c
fsf/trunk/ports/sysdeps/tile/fesetround.c
fsf/trunk/ports/sysdeps/tile/feupdateenv.c
fsf/trunk/ports/sysdeps/tile/ffs.c
fsf/trunk/ports/sysdeps/tile/ffsll.c
fsf/trunk/ports/sysdeps/tile/gccframe.h
fsf/trunk/ports/sysdeps/tile/jmpbuf-offsets.h
fsf/trunk/ports/sysdeps/tile/jmpbuf-unwind.h
fsf/trunk/ports/sysdeps/tile/ldsodefs.h
fsf/trunk/ports/sysdeps/tile/machine-gmon.h
fsf/trunk/ports/sysdeps/tile/nptl/
fsf/trunk/ports/sysdeps/tile/nptl/Makefile
fsf/trunk/ports/sysdeps/tile/nptl/pthread_spin_lock.c
fsf/trunk/ports/sysdeps/tile/nptl/pthread_spin_trylock.c
fsf/trunk/ports/sysdeps/tile/nptl/pthreaddef.h
fsf/trunk/ports/sysdeps/tile/nptl/tcb-offsets.sym
fsf/trunk/ports/sysdeps/tile/nptl/tls.h
fsf/trunk/ports/sysdeps/tile/preconfigure
fsf/trunk/ports/sysdeps/tile/s_fma.c
fsf/trunk/ports/sysdeps/tile/s_fmaf.c
fsf/trunk/ports/sysdeps/tile/setjmp.S
fsf/trunk/ports/sysdeps/tile/shlib-versions
fsf/trunk/ports/sysdeps/tile/stackinfo.h
fsf/trunk/ports/sysdeps/tile/sysdep.h
fsf/trunk/ports/sysdeps/tile/tilegx/
fsf/trunk/ports/sysdeps/tile/tilegx/bits/
fsf/trunk/ports/sysdeps/tile/tilegx/bits/atomic.h
fsf/trunk/ports/sysdeps/tile/tilegx/bits/wordsize.h
fsf/trunk/ports/sysdeps/tile/tilegx/memchr.c
fsf/trunk/ports/sysdeps/tile/tilegx/memcpy.c
fsf/trunk/ports/sysdeps/tile/tilegx/memset.c
fsf/trunk/ports/sysdeps/tile/tilegx/memusage.h
fsf/trunk/ports/sysdeps/tile/tilegx/rawmemchr.c
fsf/trunk/ports/sysdeps/tile/tilegx/strchr.c
fsf/trunk/ports/sysdeps/tile/tilegx/strchrnul.c
fsf/trunk/ports/sysdeps/tile/tilegx/string-endian.h
fsf/trunk/ports/sysdeps/tile/tilegx/strlen.c
fsf/trunk/ports/sysdeps/tile/tilegx/strrchr.c
fsf/trunk/ports/sysdeps/tile/tilegx/tilegx32/
fsf/trunk/ports/sysdeps/tile/tilegx/tilegx32/Implies
fsf/trunk/ports/sysdeps/tile/tilegx/tilegx64/
fsf/trunk/ports/sysdeps/tile/tilegx/tilegx64/Implies
fsf/trunk/ports/sysdeps/tile/tilepro/
fsf/trunk/ports/sysdeps/tile/tilepro/Implies
fsf/trunk/ports/sysdeps/tile/tilepro/bits/
fsf/trunk/ports/sysdeps/tile/tilepro/bits/atomic.h
fsf/trunk/ports/sysdeps/tile/tilepro/bits/wordsize.h
fsf/trunk/ports/sysdeps/tile/tilepro/memchr.c
fsf/trunk/ports/sysdeps/tile/tilepro/memcpy.S
fsf/trunk/ports/sysdeps/tile/tilepro/memset.c
fsf/trunk/ports/sysdeps/tile/tilepro/memusage.h
fsf/trunk/ports/sysdeps/tile/tilepro/rawmemchr.c
fsf/trunk/ports/sysdeps/tile/tilepro/strchr.c
fsf/trunk/ports/sysdeps/tile/tilepro/strchrnul.c
fsf/trunk/ports/sysdeps/tile/tilepro/strlen.c
fsf/trunk/ports/sysdeps/tile/tilepro/strrchr.c
fsf/trunk/ports/sysdeps/tile/tls-macros.h
fsf/trunk/ports/sysdeps/tile/tst-audit.h
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/Makefile
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/____longjmp_chk.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/access.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/bits/
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/bits/fcntl.h
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/bits/sem.h
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/bits/stat.h
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/bits/statfs.h
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/bits/typesizes.h
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/brk.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/chmod.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/chown.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/creat.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/dl-origin.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/dup2.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/epoll_create.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/epoll_wait.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/futimesat.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/getdents.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/getdents64.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/inotify_init.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/kernel_stat.h
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/lchown.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/link.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/lxstat.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/mkdir.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/nptl/
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/nptl/not-cancel.h
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/open.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/open64.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/pause.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/pipe.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/poll.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/readlink.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/readlink_chk.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/recv.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/rename.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/rmdir.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/select.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/send.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/symlink.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/syscalls.list
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/sysctl.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/sysdep.h
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/umount.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/unlink.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/ustat.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/utimes.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/wordsize-32/
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/wordsize-32/Versions
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/wordsize-32/fcntl.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/wordsize-32/fstatfs.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/wordsize-32/ftruncate.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/wordsize-32/ftruncate64.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/wordsize-32/fxstat.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/wordsize-32/fxstatat.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/wordsize-32/getdents.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/wordsize-32/llseek.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/wordsize-32/lseek.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/wordsize-32/lxstat.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/wordsize-32/lxstat64.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/wordsize-32/mmap.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/wordsize-32/overflow.h
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/wordsize-32/posix_fadvise.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/wordsize-32/pread.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/wordsize-32/pread64.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/wordsize-32/preadv.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/wordsize-32/preadv64.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/wordsize-32/pwrite.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/wordsize-32/pwrite64.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/wordsize-32/pwritev.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/wordsize-32/pwritev64.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/wordsize-32/sendfile.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/wordsize-32/statfs.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/wordsize-32/syscalls.list
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/wordsize-32/truncate.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/wordsize-32/truncate64.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/wordsize-32/xstat.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/wordsize-32/xstat64.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/xmknod.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/generic/xstat.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/tile/
fsf/trunk/ports/sysdeps/unix/sysv/linux/tile/Makefile
fsf/trunk/ports/sysdeps/unix/sysv/linux/tile/Versions
fsf/trunk/ports/sysdeps/unix/sysv/linux/tile/bits/
fsf/trunk/ports/sysdeps/unix/sysv/linux/tile/bits/environments.h
fsf/trunk/ports/sysdeps/unix/sysv/linux/tile/bits/local_lim.h
fsf/trunk/ports/sysdeps/unix/sysv/linux/tile/bits/mman.h
fsf/trunk/ports/sysdeps/unix/sysv/linux/tile/bits/sigaction.h
fsf/trunk/ports/sysdeps/unix/sysv/linux/tile/bits/siginfo.h
fsf/trunk/ports/sysdeps/unix/sysv/linux/tile/cacheflush.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/tile/configure
fsf/trunk/ports/sysdeps/unix/sysv/linux/tile/configure.in
fsf/trunk/ports/sysdeps/unix/sysv/linux/tile/getcontext.S
fsf/trunk/ports/sysdeps/unix/sysv/linux/tile/kernel-features.h
fsf/trunk/ports/sysdeps/unix/sysv/linux/tile/makecontext.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/tile/nptl/
fsf/trunk/ports/sysdeps/unix/sysv/linux/tile/nptl/Makefile
fsf/trunk/ports/sysdeps/unix/sysv/linux/tile/nptl/bits/
fsf/trunk/ports/sysdeps/unix/sysv/linux/tile/nptl/bits/pthreadtypes.h
fsf/trunk/ports/sysdeps/unix/sysv/linux/tile/nptl/bits/semaphore.h
fsf/trunk/ports/sysdeps/unix/sysv/linux/tile/nptl/clone.S
fsf/trunk/ports/sysdeps/unix/sysv/linux/tile/nptl/createthread.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/tile/nptl/fork.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/tile/nptl/lowlevellock.h
fsf/trunk/ports/sysdeps/unix/sysv/linux/tile/nptl/pt-vfork.S
fsf/trunk/ports/sysdeps/unix/sysv/linux/tile/nptl/pthread_once.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/tile/nptl/sysdep-cancel.h
fsf/trunk/ports/sysdeps/unix/sysv/linux/tile/nptl/vfork.S
fsf/trunk/ports/sysdeps/unix/sysv/linux/tile/nptl/waitpid.S
fsf/trunk/ports/sysdeps/unix/sysv/linux/tile/profil-counter.h
fsf/trunk/ports/sysdeps/unix/sysv/linux/tile/set_dataplane.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/tile/setcontext.S
fsf/trunk/ports/sysdeps/unix/sysv/linux/tile/sigcontextinfo.h
fsf/trunk/ports/sysdeps/unix/sysv/linux/tile/swapcontext.S
fsf/trunk/ports/sysdeps/unix/sysv/linux/tile/sys/
fsf/trunk/ports/sysdeps/unix/sysv/linux/tile/sys/cachectl.h
fsf/trunk/ports/sysdeps/unix/sysv/linux/tile/sys/dataplane.h
fsf/trunk/ports/sysdeps/unix/sysv/linux/tile/sys/procfs.h
fsf/trunk/ports/sysdeps/unix/sysv/linux/tile/sys/ptrace.h
fsf/trunk/ports/sysdeps/unix/sysv/linux/tile/sys/reg.h
fsf/trunk/ports/sysdeps/unix/sysv/linux/tile/sys/ucontext.h
fsf/trunk/ports/sysdeps/unix/sysv/linux/tile/sys/user.h
fsf/trunk/ports/sysdeps/unix/sysv/linux/tile/syscall.S
fsf/trunk/ports/sysdeps/unix/sysv/linux/tile/sysdep.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/tile/sysdep.h
fsf/trunk/ports/sysdeps/unix/sysv/linux/tile/tilegx/
fsf/trunk/ports/sysdeps/unix/sysv/linux/tile/tilegx/ioctl.S
fsf/trunk/ports/sysdeps/unix/sysv/linux/tile/tilegx/ldconfig.h
fsf/trunk/ports/sysdeps/unix/sysv/linux/tile/tilegx/register-dump.h
fsf/trunk/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/
fsf/trunk/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/Implies
fsf/trunk/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/
fsf/trunk/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/Implies
fsf/trunk/ports/sysdeps/unix/sysv/linux/tile/tilepro/
fsf/trunk/ports/sysdeps/unix/sysv/linux/tile/tilepro/Implies
fsf/trunk/ports/sysdeps/unix/sysv/linux/tile/tilepro/ldconfig.h
fsf/trunk/ports/sysdeps/unix/sysv/linux/tile/tilepro/register-dump.h
fsf/trunk/ports/sysdeps/unix/sysv/linux/tile/ucontext_i.h
Modified:
fsf/trunk/ports/ChangeLog.m68k
fsf/trunk/ports/sysdeps/unix/sysv/linux/m68k/syscall.S
Added: fsf/trunk/ports/ChangeLog.linux-generic
==============================================================================
--- fsf/trunk/ports/ChangeLog.linux-generic (added)
+++ fsf/trunk/ports/ChangeLog.linux-generic Mon Dec 5 00:03:25 2011
@@ -1,0 +1,80 @@
+2011-12-03 Chris Metcalf <cmetcalf@xxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/generic/Makefile: New file.
+ * sysdeps/unix/sysv/linux/generic/____longjmp_chk.c: New file.
+ * sysdeps/unix/sysv/linux/generic/access.c: New file.
+ * sysdeps/unix/sysv/linux/generic/bits/fcntl.h: New file.
+ * sysdeps/unix/sysv/linux/generic/bits/sem.h: New file.
+ * sysdeps/unix/sysv/linux/generic/bits/stat.h: New file.
+ * sysdeps/unix/sysv/linux/generic/bits/statfs.h: New file.
+ * sysdeps/unix/sysv/linux/generic/bits/typesizes.h: New file.
+ * sysdeps/unix/sysv/linux/generic/brk.c: New file.
+ * sysdeps/unix/sysv/linux/generic/chmod.c: New file.
+ * sysdeps/unix/sysv/linux/generic/chown.c: New file.
+ * sysdeps/unix/sysv/linux/generic/creat.c: New file.
+ * sysdeps/unix/sysv/linux/generic/dl-origin.c: New file.
+ * sysdeps/unix/sysv/linux/generic/dup2.c: New file.
+ * sysdeps/unix/sysv/linux/generic/epoll_create.c: New file.
+ * sysdeps/unix/sysv/linux/generic/epoll_wait.c: New file.
+ * sysdeps/unix/sysv/linux/generic/futimesat.c: New file.
+ * sysdeps/unix/sysv/linux/generic/getdents.c: New file.
+ * sysdeps/unix/sysv/linux/generic/getdents64.c: New file.
+ * sysdeps/unix/sysv/linux/generic/inotify_init.c: New file.
+ * sysdeps/unix/sysv/linux/generic/kernel_stat.h: New file.
+ * sysdeps/unix/sysv/linux/generic/lchown.c: New file.
+ * sysdeps/unix/sysv/linux/generic/link.c: New file.
+ * sysdeps/unix/sysv/linux/generic/lxstat.c: New file.
+ * sysdeps/unix/sysv/linux/generic/mkdir.c: New file.
+ * sysdeps/unix/sysv/linux/generic/nptl/not-cancel.h: New file.
+ * sysdeps/unix/sysv/linux/generic/open.c: New file.
+ * sysdeps/unix/sysv/linux/generic/open64.c: New file.
+ * sysdeps/unix/sysv/linux/generic/pause.c: New file.
+ * sysdeps/unix/sysv/linux/generic/pipe.c: New file.
+ * sysdeps/unix/sysv/linux/generic/poll.c: New file.
+ * sysdeps/unix/sysv/linux/generic/readlink.c: New file.
+ * sysdeps/unix/sysv/linux/generic/readlink_chk.c: New file.
+ * sysdeps/unix/sysv/linux/generic/recv.c: New file.
+ * sysdeps/unix/sysv/linux/generic/rename.c: New file.
+ * sysdeps/unix/sysv/linux/generic/rmdir.c: New file.
+ * sysdeps/unix/sysv/linux/generic/select.c: New file.
+ * sysdeps/unix/sysv/linux/generic/send.c: New file.
+ * sysdeps/unix/sysv/linux/generic/symlink.c: New file.
+ * sysdeps/unix/sysv/linux/generic/syscalls.list: New file.
+ * sysdeps/unix/sysv/linux/generic/sysctl.c: New file.
+ * sysdeps/unix/sysv/linux/generic/sysdep.h: New file.
+ * sysdeps/unix/sysv/linux/generic/umount.c: New file.
+ * sysdeps/unix/sysv/linux/generic/unlink.c: New file.
+ * sysdeps/unix/sysv/linux/generic/ustat.c: New file.
+ * sysdeps/unix/sysv/linux/generic/utimes.c: New file.
+ * sysdeps/unix/sysv/linux/generic/wordsize-32/Versions: New file.
+ * sysdeps/unix/sysv/linux/generic/wordsize-32/fcntl.c: New file.
+ * sysdeps/unix/sysv/linux/generic/wordsize-32/fstatfs.c: New file.
+ * sysdeps/unix/sysv/linux/generic/wordsize-32/ftruncate.c: New file.
+ * sysdeps/unix/sysv/linux/generic/wordsize-32/ftruncate64.c: New file.
+ * sysdeps/unix/sysv/linux/generic/wordsize-32/fxstat.c: New file.
+ * sysdeps/unix/sysv/linux/generic/wordsize-32/fxstatat.c: New file.
+ * sysdeps/unix/sysv/linux/generic/wordsize-32/getdents.c: New file.
+ * sysdeps/unix/sysv/linux/generic/wordsize-32/llseek.c: New file.
+ * sysdeps/unix/sysv/linux/generic/wordsize-32/lseek.c: New file.
+ * sysdeps/unix/sysv/linux/generic/wordsize-32/lxstat.c: New file.
+ * sysdeps/unix/sysv/linux/generic/wordsize-32/lxstat64.c: New file.
+ * sysdeps/unix/sysv/linux/generic/wordsize-32/mmap.c: New file.
+ * sysdeps/unix/sysv/linux/generic/wordsize-32/overflow.h: New file.
+ * sysdeps/unix/sysv/linux/generic/wordsize-32/posix_fadvise.c: New file.
+ * sysdeps/unix/sysv/linux/generic/wordsize-32/pread.c: New file.
+ * sysdeps/unix/sysv/linux/generic/wordsize-32/pread64.c: New file.
+ * sysdeps/unix/sysv/linux/generic/wordsize-32/preadv.c: New file.
+ * sysdeps/unix/sysv/linux/generic/wordsize-32/preadv64.c: New file.
+ * sysdeps/unix/sysv/linux/generic/wordsize-32/pwrite.c: New file.
+ * sysdeps/unix/sysv/linux/generic/wordsize-32/pwrite64.c: New file.
+ * sysdeps/unix/sysv/linux/generic/wordsize-32/pwritev.c: New file.
+ * sysdeps/unix/sysv/linux/generic/wordsize-32/pwritev64.c: New file.
+ * sysdeps/unix/sysv/linux/generic/wordsize-32/sendfile.c: New file.
+ * sysdeps/unix/sysv/linux/generic/wordsize-32/statfs.c: New file.
+ * sysdeps/unix/sysv/linux/generic/wordsize-32/syscalls.list: New file.
+ * sysdeps/unix/sysv/linux/generic/wordsize-32/truncate.c: New file.
+ * sysdeps/unix/sysv/linux/generic/wordsize-32/truncate64.c: New file.
+ * sysdeps/unix/sysv/linux/generic/wordsize-32/xstat.c: New file.
+ * sysdeps/unix/sysv/linux/generic/wordsize-32/xstat64.c: New file.
+ * sysdeps/unix/sysv/linux/generic/xmknod.c: New file.
+ * sysdeps/unix/sysv/linux/generic/xstat.c: New file.
Modified: fsf/trunk/ports/ChangeLog.m68k
==============================================================================
--- fsf/trunk/ports/ChangeLog.m68k (original)
+++ fsf/trunk/ports/ChangeLog.m68k Mon Dec 5 00:03:25 2011
@@ -1,3 +1,7 @@
+2011-12-04 Thorsten Glaser <tg@xxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/m68k/syscall.S: Allow six arguments.
+
2011-11-01 Andreas Schwab <schwab@xxxxxxxxxxxxxx>
* sysdeps/m68k/stackinfo.h (stackinfo_get_sp, stackinfo_sub_sp):
Added: fsf/trunk/ports/ChangeLog.tile
==============================================================================
--- fsf/trunk/ports/ChangeLog.tile (added)
+++ fsf/trunk/ports/ChangeLog.tile Mon Dec 5 00:03:25 2011
@@ -1,0 +1,134 @@
+2011-12-03 Chris Metcalf <cmetcalf@xxxxxxxxxx>
+
+ * data/c++-types-tile-linux-gnu.data: New file.
+ * sysdeps/tile/Implies: New file.
+ * sysdeps/tile/Makefile: New file.
+ * sysdeps/tile/Versions: New file.
+ * sysdeps/tile/__longjmp.S: New file.
+ * sysdeps/tile/__tls_get_addr.S: New file.
+ * sysdeps/tile/_mcount.S: New file.
+ * sysdeps/tile/abort-instr.h: New file.
+ * sysdeps/tile/backtrace.c: New file.
+ * sysdeps/tile/bits/atomic.h: New file.
+ * sysdeps/tile/bits/byteswap.h: New file.
+ * sysdeps/tile/bits/endian.h: New file.
+ * sysdeps/tile/bits/fenv.h: New file.
+ * sysdeps/tile/bits/link.h: New file.
+ * sysdeps/tile/bits/mathdef.h: New file.
+ * sysdeps/tile/bits/mathinline.h: New file.
+ * sysdeps/tile/bits/setjmp.h: New file.
+ * sysdeps/tile/bsd-_setjmp.S: New file.
+ * sysdeps/tile/bsd-setjmp.S: New file.
+ * sysdeps/tile/bzero.S: New file.
+ * sysdeps/tile/dl-lookupcfg.h: New file.
+ * sysdeps/tile/dl-machine.h: New file.
+ * sysdeps/tile/dl-runtime.c: New file.
+ * sysdeps/tile/dl-start.S: New file.
+ * sysdeps/tile/dl-tls.c: New file.
+ * sysdeps/tile/dl-tls.h: New file.
+ * sysdeps/tile/dl-trampoline.S: New file.
+ * sysdeps/tile/elf/start.S: New file.
+ * sysdeps/tile/fegetenv.c: New file.
+ * sysdeps/tile/fegetround.c: New file.
+ * sysdeps/tile/feholdexcpt.c: New file.
+ * sysdeps/tile/fesetenv.c: New file.
+ * sysdeps/tile/fesetround.c: New file.
+ * sysdeps/tile/feupdateenv.c: New file.
+ * sysdeps/tile/ffs.c: New file.
+ * sysdeps/tile/ffsll.c: New file.
+ * sysdeps/tile/gccframe.h: New file.
+ * sysdeps/tile/jmpbuf-offsets.h: New file.
+ * sysdeps/tile/jmpbuf-unwind.h: New file.
+ * sysdeps/tile/ldsodefs.h: New file.
+ * sysdeps/tile/machine-gmon.h: New file.
+ * sysdeps/tile/nptl/Makefile: New file.
+ * sysdeps/tile/nptl/pthread_spin_lock.c: New file.
+ * sysdeps/tile/nptl/pthread_spin_trylock.c: New file.
+ * sysdeps/tile/nptl/pthreaddef.h: New file.
+ * sysdeps/tile/nptl/tcb-offsets.sym: New file.
+ * sysdeps/tile/nptl/tls.h: New file.
+ * sysdeps/tile/preconfigure: New file.
+ * sysdeps/tile/s_fma.c: New file.
+ * sysdeps/tile/s_fmaf.c: New file.
+ * sysdeps/tile/setjmp.S: New file.
+ * sysdeps/tile/shlib-versions: New file.
+ * sysdeps/tile/stackinfo.h: New file.
+ * sysdeps/tile/sysdep.h: New file.
+ * sysdeps/tile/tilegx/bits/atomic.h: New file.
+ * sysdeps/tile/tilegx/bits/wordsize.h: New file.
+ * sysdeps/tile/tilegx/memchr.c: New file.
+ * sysdeps/tile/tilegx/memcpy.c: New file.
+ * sysdeps/tile/tilegx/memset.c: New file.
+ * sysdeps/tile/tilegx/memusage.h: New file.
+ * sysdeps/tile/tilegx/rawmemchr.c: New file.
+ * sysdeps/tile/tilegx/strchr.c: New file.
+ * sysdeps/tile/tilegx/strchrnul.c: New file.
+ * sysdeps/tile/tilegx/string-endian.h: New file.
+ * sysdeps/tile/tilegx/strlen.c: New file.
+ * sysdeps/tile/tilegx/strrchr.c: New file.
+ * sysdeps/tile/tilegx/tilegx32/Implies: New file.
+ * sysdeps/tile/tilegx/tilegx64/Implies: New file.
+ * sysdeps/tile/tilepro/Implies: New file.
+ * sysdeps/tile/tilepro/bits/atomic.h: New file.
+ * sysdeps/tile/tilepro/bits/wordsize.h: New file.
+ * sysdeps/tile/tilepro/memchr.c: New file.
+ * sysdeps/tile/tilepro/memcpy.S: New file.
+ * sysdeps/tile/tilepro/memset.c: New file.
+ * sysdeps/tile/tilepro/memusage.h: New file.
+ * sysdeps/tile/tilepro/rawmemchr.c: New file.
+ * sysdeps/tile/tilepro/strchr.c: New file.
+ * sysdeps/tile/tilepro/strchrnul.c: New file.
+ * sysdeps/tile/tilepro/strlen.c: New file.
+ * sysdeps/tile/tilepro/strrchr.c: New file.
+ * sysdeps/tile/tls-macros.h: New file.
+ * sysdeps/tile/tst-audit.h: New file.
+ * sysdeps/unix/sysv/linux/tile/Makefile: New file.
+ * sysdeps/unix/sysv/linux/tile/Versions: New file.
+ * sysdeps/unix/sysv/linux/tile/bits/environments.h: New file.
+ * sysdeps/unix/sysv/linux/tile/bits/local_lim.h: New file.
+ * sysdeps/unix/sysv/linux/tile/bits/mman.h: New file.
+ * sysdeps/unix/sysv/linux/tile/bits/mman.h~: New file.
+ * sysdeps/unix/sysv/linux/tile/bits/sigaction.h: New file.
+ * sysdeps/unix/sysv/linux/tile/bits/siginfo.h: New file.
+ * sysdeps/unix/sysv/linux/tile/cacheflush.c: New file.
+ * sysdeps/unix/sysv/linux/tile/configure: New file.
+ * sysdeps/unix/sysv/linux/tile/configure.in: New file.
+ * sysdeps/unix/sysv/linux/tile/getcontext.S: New file.
+ * sysdeps/unix/sysv/linux/tile/kernel-features.h: New file.
+ * sysdeps/unix/sysv/linux/tile/makecontext.c: New file.
+ * sysdeps/unix/sysv/linux/tile/nptl/Makefile: New file.
+ * sysdeps/unix/sysv/linux/tile/nptl/bits/pthreadtypes.h: New file.
+ * sysdeps/unix/sysv/linux/tile/nptl/bits/semaphore.h: New file.
+ * sysdeps/unix/sysv/linux/tile/nptl/clone.S: New file.
+ * sysdeps/unix/sysv/linux/tile/nptl/createthread.c: New file.
+ * sysdeps/unix/sysv/linux/tile/nptl/fork.c: New file.
+ * sysdeps/unix/sysv/linux/tile/nptl/lowlevellock.h: New file.
+ * sysdeps/unix/sysv/linux/tile/nptl/pt-vfork.S: New file.
+ * sysdeps/unix/sysv/linux/tile/nptl/pthread_once.c: New file.
+ * sysdeps/unix/sysv/linux/tile/nptl/sysdep-cancel.h: New file.
+ * sysdeps/unix/sysv/linux/tile/nptl/vfork.S: New file.
+ * sysdeps/unix/sysv/linux/tile/nptl/waitpid.S: New file.
+ * sysdeps/unix/sysv/linux/tile/profil-counter.h: New file.
+ * sysdeps/unix/sysv/linux/tile/set_dataplane.c: New file.
+ * sysdeps/unix/sysv/linux/tile/setcontext.S: New file.
+ * sysdeps/unix/sysv/linux/tile/sigcontextinfo.h: New file.
+ * sysdeps/unix/sysv/linux/tile/swapcontext.S: New file.
+ * sysdeps/unix/sysv/linux/tile/sys/cachectl.h: New file.
+ * sysdeps/unix/sysv/linux/tile/sys/dataplane.h: New file.
+ * sysdeps/unix/sysv/linux/tile/sys/procfs.h: New file.
+ * sysdeps/unix/sysv/linux/tile/sys/ptrace.h: New file.
+ * sysdeps/unix/sysv/linux/tile/sys/reg.h: New file.
+ * sysdeps/unix/sysv/linux/tile/sys/ucontext.h: New file.
+ * sysdeps/unix/sysv/linux/tile/sys/user.h: New file.
+ * sysdeps/unix/sysv/linux/tile/syscall.S: New file.
+ * sysdeps/unix/sysv/linux/tile/sysdep.c: New file.
+ * sysdeps/unix/sysv/linux/tile/sysdep.h: New file.
+ * sysdeps/unix/sysv/linux/tile/tilegx/ioctl.S: New file.
+ * sysdeps/unix/sysv/linux/tile/tilegx/ldconfig.h: New file.
+ * sysdeps/unix/sysv/linux/tile/tilegx/register-dump.h: New file.
+ * sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/Implies: New file.
+ * sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/Implies: New file.
+ * sysdeps/unix/sysv/linux/tile/tilepro/Implies: New file.
+ * sysdeps/unix/sysv/linux/tile/tilepro/ldconfig.h: New file.
+ * sysdeps/unix/sysv/linux/tile/tilepro/register-dump.h: New file.
+ * sysdeps/unix/sysv/linux/tile/ucontext_i.h: New file.
Added: fsf/trunk/ports/data/c++-types-tile-linux-gnu.data
==============================================================================
--- fsf/trunk/ports/data/c++-types-tile-linux-gnu.data (added)
+++ fsf/trunk/ports/data/c++-types-tile-linux-gnu.data Mon Dec 5 00:03:25 2011
@@ -1,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
Added: fsf/trunk/ports/sysdeps/tile/Implies
==============================================================================
--- fsf/trunk/ports/sysdeps/tile/Implies (added)
+++ fsf/trunk/ports/sysdeps/tile/Implies Mon Dec 5 00:03:25 2011
@@ -1,0 +1,2 @@
+ieee754/dbl-64
+ieee754/flt-32
Added: fsf/trunk/ports/sysdeps/tile/Makefile
==============================================================================
--- fsf/trunk/ports/sysdeps/tile/Makefile (added)
+++ fsf/trunk/ports/sysdeps/tile/Makefile Mon Dec 5 00:03:25 2011
@@ -1,0 +1,18 @@
+# We don't support long doubles as a distinct type. We don't need to set
+# this variable; it's here mostly for documentational purposes.
+
+long-double-fcts = no
+
+ifeq ($(subdir),gmon)
+sysdep_routines += _mcount
+endif
+
+ifeq ($(subdir),elf)
+# Extra shared linker files to link only into dl-allobjs.so.
+sysdep-rtld-routines += dl-start __tls_get_addr
+endif
+
+ifeq ($(subdir),csu)
+# Avoid .cfi_startproc/endproc markers when creating init and fini pieces.
+CFLAGS-initfini.s += -fno-asynchronous-unwind-tables
+endif
Added: fsf/trunk/ports/sysdeps/tile/Versions
==============================================================================
--- fsf/trunk/ports/sysdeps/tile/Versions (added)
+++ fsf/trunk/ports/sysdeps/tile/Versions Mon Dec 5 00:03:25 2011
@@ -1,0 +1,6 @@
+libc {
+ GLIBC_2.12 {
+ # name requested by gcc community.
+ __mcount;
+ }
+}
Added: fsf/trunk/ports/sysdeps/tile/__longjmp.S
==============================================================================
--- fsf/trunk/ports/sysdeps/tile/__longjmp.S (added)
+++ fsf/trunk/ports/sysdeps/tile/__longjmp.S Mon Dec 5 00:03:25 2011
@@ -1,0 +1,58 @@
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Chris Metcalf <cmetcalf@xxxxxxxxxx>, 2011.
+
+ 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, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sysdep.h>
+#include <jmpbuf-offsets.h>
+#include <asm-syntax.h>
+#include <arch/spr_def.h>
+
+/* PL to return to via iret in longjmp */
+#define RETURN_PL 0
+
+ .text
+ENTRY (__longjmp)
+ FEEDBACK_ENTER(__longjmp)
+
+#define RESTORE(r) { LD r, r0 ; ADDI_PTR r0, r0, REGSIZE }
+ FOR_EACH_CALLEE_SAVED_REG(RESTORE)
+
+ /* Make longjmp(buf, 0) return "1" instead.
+ At the same time, construct our iret context; we set ICS so
+ we can validly load EX_CONTEXT for iret without being
+ interrupted halfway through. */
+ {
+ LD r2, r0 /* retrieve ICS bit from jmp_buf */
+ movei r3, 1
+ CMPEQI r0, r1, 0
+ }
+ {
+ mtspr INTERRUPT_CRITICAL_SECTION, r3
+ shli r2, r2, SPR_EX_CONTEXT_0_1__ICS_SHIFT
+ }
+ {
+ mtspr EX_CONTEXT_0_0, lr
+ ori r2, r2, RETURN_PL
+ }
+ {
+ or r0, r1, r0
+ mtspr EX_CONTEXT_0_1, r2
+ }
+ iret
+ jrp lr /* Keep the backtracer happy. */
+END (__longjmp)
Added: fsf/trunk/ports/sysdeps/tile/__tls_get_addr.S
==============================================================================
--- fsf/trunk/ports/sysdeps/tile/__tls_get_addr.S (added)
+++ fsf/trunk/ports/sysdeps/tile/__tls_get_addr.S Mon Dec 5 00:03:25 2011
@@ -1,0 +1,150 @@
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Chris Metcalf <cmetcalf@xxxxxxxxxx>, 2011.
+
+ 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, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sysdep.h>
+#include <tls.h>
+
+#ifdef _LP64
+#define LOG_SIZEOF_DTV_T 4
+#else
+#define LOG_SIZEOF_DTV_T 3
+#endif
+
+/* On entry, r0 points to two words, the module and the offset.
+ On return, r0 holds the pointer to the relevant TLS memory.
+ Only registers r25..r29 are clobbered by the call. */
+
+ .text
+ENTRY (__tls_get_addr)
+ {
+ lnk r25
+ ADDI_PTR r27, tp, DTV_OFFSET
+ }
+.Llnk:
+#ifdef __tilegx__
+ {
+ LD_PTR r27, r27 /* r27 = THREAD_DTV() */
+ moveli r26, hw1_last(_rtld_local + TLS_GENERATION_OFFSET - .Llnk)
+ }
+ shl16insli r26, r26, hw0(_rtld_local + TLS_GENERATION_OFFSET - .Llnk)
+ {
+ ADD_PTR r25, r25, r26
+ LD_PTR r26, r0 /* r26 = ti_module */
+ }
+#else
+ {
+ LD_PTR r27, r27 /* r27 = THREAD_DTV() */
+ addli r25, r25, lo16(_rtld_local + TLS_GENERATION_OFFSET - .Llnk)
+ }
+ {
+ auli r25, r25, ha16(_rtld_local + TLS_GENERATION_OFFSET - .Llnk)
+ LD_PTR r26, r0 /* r26 = ti_module */
+ }
+#endif
+ LD_PTR r25, r25 /* r25 = DL(dl_tls_generation) */
+ {
+ LD_PTR r28, r27 /* r28 = THREAD_DTV()->counter */
+ ADDI_PTR r29, r0, __SIZEOF_POINTER__
+ }
+ {
+ LD_PTR r29, r29 /* r29 = ti_offset */
+ CMPEQ r25, r28, r25 /* r25 nonzero if generation OK */
+ shli r28, r26, LOG_SIZEOF_DTV_T /* byte index into dtv array */
+ }
+ {
+ BEQZ r25, .Lslowpath
+ CMPEQI r25, r26, -1 /* r25 nonzero if ti_module invalid */
+ }
+ {
+ BNEZ r25, .Lslowpath
+ ADD_PTR r28, r28, r27 /* pointer into module array */
+ }
+ LD_PTR r26, r28 /* r26 = module TLS pointer */
+ {
+ ADD_PTR r0, r26, r29
+ jrp lr
+ }
+
+.Lslowpath:
+ {
+ ST sp, lr
+ ADDLI_PTR r29, sp, - (25 * REGSIZE)
+ }
+ cfi_offset (lr, 0)
+ {
+ ST r29, sp
+ ADDLI_PTR sp, sp, - (26 * REGSIZE)
+ }
+ cfi_def_cfa_offset (26 * REGSIZE)
+ ADDI_PTR r29, sp, (2 * REGSIZE)
+ { ST r29, r1; ADDI_PTR r29, r29, REGSIZE }
+ { ST r29, r2; ADDI_PTR r29, r29, REGSIZE }
+ { ST r29, r3; ADDI_PTR r29, r29, REGSIZE }
+ { ST r29, r4; ADDI_PTR r29, r29, REGSIZE }
+ { ST r29, r5; ADDI_PTR r29, r29, REGSIZE }
+ { ST r29, r6; ADDI_PTR r29, r29, REGSIZE }
+ { ST r29, r7; ADDI_PTR r29, r29, REGSIZE }
+ { ST r29, r8; ADDI_PTR r29, r29, REGSIZE }
+ { ST r29, r9; ADDI_PTR r29, r29, REGSIZE }
+ { ST r29, r10; ADDI_PTR r29, r29, REGSIZE }
+ { ST r29, r11; ADDI_PTR r29, r29, REGSIZE }
+ { ST r29, r12; ADDI_PTR r29, r29, REGSIZE }
+ { ST r29, r13; ADDI_PTR r29, r29, REGSIZE }
+ { ST r29, r14; ADDI_PTR r29, r29, REGSIZE }
+ { ST r29, r15; ADDI_PTR r29, r29, REGSIZE }
+ { ST r29, r16; ADDI_PTR r29, r29, REGSIZE }
+ { ST r29, r17; ADDI_PTR r29, r29, REGSIZE }
+ { ST r29, r18; ADDI_PTR r29, r29, REGSIZE }
+ { ST r29, r19; ADDI_PTR r29, r29, REGSIZE }
+ { ST r29, r20; ADDI_PTR r29, r29, REGSIZE }
+ { ST r29, r21; ADDI_PTR r29, r29, REGSIZE }
+ { ST r29, r22; ADDI_PTR r29, r29, REGSIZE }
+ { ST r29, r23; ADDI_PTR r29, r29, REGSIZE }
+ { ST r29, r24; ADDI_PTR r29, r29, REGSIZE }
+ .hidden __tls_get_addr_slow
+ jal __tls_get_addr_slow
+ ADDI_PTR r29, sp, (2 * REGSIZE)
+ { LD r1, r29; ADDI_PTR r29, r29, REGSIZE }
+ { LD r2, r29; ADDI_PTR r29, r29, REGSIZE }
+ { LD r3, r29; ADDI_PTR r29, r29, REGSIZE }
+ { LD r4, r29; ADDI_PTR r29, r29, REGSIZE }
+ { LD r5, r29; ADDI_PTR r29, r29, REGSIZE }
+ { LD r6, r29; ADDI_PTR r29, r29, REGSIZE }
+ { LD r7, r29; ADDI_PTR r29, r29, REGSIZE }
+ { LD r8, r29; ADDI_PTR r29, r29, REGSIZE }
+ { LD r9, r29; ADDI_PTR r29, r29, REGSIZE }
+ { LD r10, r29; ADDI_PTR r29, r29, REGSIZE }
+ { LD r11, r29; ADDI_PTR r29, r29, REGSIZE }
+ { LD r12, r29; ADDI_PTR r29, r29, REGSIZE }
+ { LD r13, r29; ADDI_PTR r29, r29, REGSIZE }
+ { LD r14, r29; ADDI_PTR r29, r29, REGSIZE }
+ { LD r15, r29; ADDI_PTR r29, r29, REGSIZE }
+ { LD r16, r29; ADDI_PTR r29, r29, REGSIZE }
+ { LD r17, r29; ADDI_PTR r29, r29, REGSIZE }
+ { LD r18, r29; ADDI_PTR r29, r29, REGSIZE }
+ { LD r19, r29; ADDI_PTR r29, r29, REGSIZE }
+ { LD r20, r29; ADDI_PTR r29, r29, REGSIZE }
+ { LD r21, r29; ADDI_PTR r29, r29, REGSIZE }
+ { LD r22, r29; ADDI_PTR r29, r29, REGSIZE }
+ { LD r23, r29; ADDI_PTR r29, r29, REGSIZE }
+ { LD r24, r29; ADDLI_PTR sp, sp, (26 * REGSIZE) }
+ cfi_def_cfa_offset (0)
+ LD lr, sp
+ jrp lr
+END (__tls_get_addr)
Added: fsf/trunk/ports/sysdeps/tile/_mcount.S
==============================================================================
--- fsf/trunk/ports/sysdeps/tile/_mcount.S (added)
+++ fsf/trunk/ports/sysdeps/tile/_mcount.S Mon Dec 5 00:03:25 2011
@@ -1,0 +1,88 @@
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Chris Metcalf <cmetcalf@xxxxxxxxxx>, 2011.
+ Based on work contributed by David Mosberger (davidm@xxxxxxxxxxxxxx).
+
+ 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, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+/* Assembly stub to invoke __mcount_internal(). Compiler-generated
+ code calls mcount after executing a function's prologue, placing
+ the "lr" register in "r10" for the call. As a result "lr" is the
+ function that invoked mcount, and "r10" is mcount's caller's
+ caller. However, we have to save all the parameter registers here
+ before invoking _mcount_internal. Callee-save and temporary
+ registers need no special attention. We save r10 and restore it to
+ lr on the way out, to properly handle the case of ENTRY() in
+ assembly code, before lr is saved. We use the name __mcount since
+ the gcc community prefers using the reserved namespace. */
+
+#include <sysdep.h>
+
+ .text
+ENTRY(__mcount)
+ {
+ ST sp, lr
+ ADDI_PTR r29, sp, - (12 * REGSIZE)
+ }
+ cfi_offset (lr, 0)
+ {
+ ADDI_PTR sp, sp, - (13 * REGSIZE)
+ ST r29, sp
+ ADDI_PTR r29, r29, REGSIZE
+ }
+ cfi_def_cfa_offset (13 * REGSIZE)
+ { ST r29, r0; ADDI_PTR r29, r29, REGSIZE }
+ { ST r29, r1; ADDI_PTR r29, r29, REGSIZE }
+ { ST r29, r2; ADDI_PTR r29, r29, REGSIZE }
+ { ST r29, r3; ADDI_PTR r29, r29, REGSIZE }
+ { ST r29, r4; ADDI_PTR r29, r29, REGSIZE }
+ { ST r29, r5; ADDI_PTR r29, r29, REGSIZE }
+ { ST r29, r6; ADDI_PTR r29, r29, REGSIZE }
+ { ST r29, r7; ADDI_PTR r29, r29, REGSIZE }
+ { ST r29, r8; ADDI_PTR r29, r29, REGSIZE }
+ { ST r29, r9; ADDI_PTR r29, r29, REGSIZE }
+ { ST r29, r10; ADDI_PTR r29, r29, REGSIZE; move r0, r10 }
+ {
+ move r1, lr
+ jal __mcount_internal
+ }
+ {
+ ADDI_PTR r29, sp, (2 * REGSIZE)
+ }
+ { LD r0, r29; ADDI_PTR r29, r29, REGSIZE }
+ { LD r1, r29; ADDI_PTR r29, r29, REGSIZE }
+ { LD r2, r29; ADDI_PTR r29, r29, REGSIZE }
+ { LD r3, r29; ADDI_PTR r29, r29, REGSIZE }
+ { LD r4, r29; ADDI_PTR r29, r29, REGSIZE }
+ { LD r5, r29; ADDI_PTR r29, r29, REGSIZE }
+ { LD r6, r29; ADDI_PTR r29, r29, REGSIZE }
+ { LD r7, r29; ADDI_PTR r29, r29, REGSIZE }
+ { LD r8, r29; ADDI_PTR r29, r29, REGSIZE }
+ { LD r9, r29; ADDI_PTR r29, r29, REGSIZE }
+ { LD r10, r29; ADDI_PTR sp, sp, (13 * REGSIZE) }
+ cfi_def_cfa_offset (0)
+ {
+ LD lr, sp
+ }
+ {
+ move lr, r10
+ jrp lr
+ }
+END(__mcount)
+
+#undef mcount
+weak_alias (__mcount, _mcount) /* exported in gmon/Versions */
+weak_alias (__mcount, mcount) /* exported in stdlib/Versions */
Added: fsf/trunk/ports/sysdeps/tile/abort-instr.h
==============================================================================
--- fsf/trunk/ports/sysdeps/tile/abort-instr.h (added)
+++ fsf/trunk/ports/sysdeps/tile/abort-instr.h Mon Dec 5 00:03:25 2011
@@ -1,0 +1,2 @@
+/* An instruction which should crash any program is `hlt'. */
+#define ABORT_INSTRUCTION asm ("ill")
Added: fsf/trunk/ports/sysdeps/tile/backtrace.c
==============================================================================
--- fsf/trunk/ports/sysdeps/tile/backtrace.c (added)
+++ fsf/trunk/ports/sysdeps/tile/backtrace.c Mon Dec 5 00:03:25 2011
@@ -1,0 +1,1 @@
+#include <sysdeps/ia64/backtrace.c>
Added: fsf/trunk/ports/sysdeps/tile/bits/atomic.h
==============================================================================
--- fsf/trunk/ports/sysdeps/tile/bits/atomic.h (added)
+++ fsf/trunk/ports/sysdeps/tile/bits/atomic.h Mon Dec 5 00:03:25 2011
@@ -1,0 +1,87 @@
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Chris Metcalf <cmetcalf@xxxxxxxxxx>, 2011.
+
+ 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, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+/* The sub-architecture headers provide definitions for these macros
+ that work for "int" and "long" size values only:
+
+ atomic_compare_and_exchange_val_acq()
+ atomic_exchange_acq()
+ atomic_exchange_and_add()
+ atomic_and_val()
+ atomic_or_val()
+ atomic_decrement_if_positive() [tilegx only]
+
+ Here we provide generic definitions true for all Tilera chips. */
+
+#include <stdint.h>
+#include <features.h>
+
+typedef int32_t atomic32_t;
+typedef uint32_t uatomic32_t;
+typedef int_fast32_t atomic_fast32_t;
+typedef uint_fast32_t uatomic_fast32_t;
+
+typedef int64_t atomic64_t;
+typedef uint64_t uatomic64_t;
+typedef int_fast64_t atomic_fast64_t;
+typedef uint_fast64_t uatomic_fast64_t;
+
+typedef intptr_t atomicptr_t;
+typedef uintptr_t uatomicptr_t;
+typedef intmax_t atomic_max_t;
+typedef uintmax_t uatomic_max_t;
+
+/* Barrier macro. */
+#define atomic_full_barrier() __sync_synchronize()
+
+/* APIs with "release" semantics. */
+#define atomic_compare_and_exchange_val_rel(mem, n, o) \
+ ({ \
+ atomic_full_barrier (); \
+ atomic_compare_and_exchange_val_acq ((mem), (n), (o)); \
+ })
+#define atomic_compare_and_exchange_bool_rel(mem, n, o) \
+ ({ \
+ atomic_full_barrier (); \
+ atomic_compare_and_exchange_bool_acq ((mem), (n), (o)); \
+ })
+#define atomic_exchange_rel(mem, n) \
+ ({ \
+ atomic_full_barrier (); \
+ atomic_exchange_acq ((mem), (n)); \
+ })
+
+/* Various macros that should just be synonyms. */
+#define catomic_exchange_and_add atomic_exchange_and_add
+#define atomic_and(mem, mask) ((void) atomic_and_val ((mem), (mask)))
+#define catomic_and atomic_and
+#define atomic_or(mem, mask) ((void) atomic_or_val ((mem), (mask)))
+#define catomic_or atomic_or
+
+/* atomic_bit_test_set in terms of atomic_or_val. */
+#define atomic_bit_test_set(mem, bit) \
+ ({ __typeof (*(mem)) __att0_mask = ((__typeof (*(mem))) 1 << (bit)); \
+ atomic_or_val ((mem), __att0_mask) & __att0_mask; })
+
+/*
+ * This non-existent symbol is called for unsupporrted sizes,
+ * indicating a bug in the caller.
+ */
+extern int __atomic_error_bad_argument_size(void)
+ __attribute__ ((warning ("bad sizeof atomic argument")));
Added: fsf/trunk/ports/sysdeps/tile/bits/byteswap.h
==============================================================================
--- fsf/trunk/ports/sysdeps/tile/bits/byteswap.h (added)
+++ fsf/trunk/ports/sysdeps/tile/bits/byteswap.h Mon Dec 5 00:03:25 2011
@@ -1,0 +1,36 @@
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Chris Metcalf <cmetcalf@xxxxxxxxxx>, 2011.
+
+ 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, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#if !defined _BYTESWAP_H && !defined _NETINET_IN_H && !defined _ENDIAN_H
+# error "Never use <bits/byteswap.h> directly; include <byteswap.h> instead."
+#endif
+
+#ifndef _BITS_BYTESWAP_H
+#define _BITS_BYTESWAP_H 1
+
+/* gcc __builtin_bswap64() can constant-fold, etc, so always use it. */
+#define __bswap_16(x) ((unsigned short)(__builtin_bswap32(x) >> 16))
+#define __bswap_32(x) ((unsigned int)__builtin_bswap32(x))
+#define __bswap_64(x) ((unsigned long long)__builtin_bswap64(x))
+
+#define __bswap_constant_16(x) __bswap_16(x)
+#define __bswap_constant_32(x) __bswap_32(x)
+#define __bswap_constant_64(x) __bswap_64(x)
+
+#endif /* _BITS_BYTESWAP_H */
Added: fsf/trunk/ports/sysdeps/tile/bits/endian.h
==============================================================================
--- fsf/trunk/ports/sysdeps/tile/bits/endian.h (added)
+++ fsf/trunk/ports/sysdeps/tile/bits/endian.h Mon Dec 5 00:03:25 2011
@@ -1,0 +1,13 @@
+/* Set endianness for tile. */
+
+#ifndef _ENDIAN_H
+# error "Never use <bits/endian.h> directly; include <endian.h> instead."
+#endif
+
+#if defined __BIG_ENDIAN__
+# define __BYTE_ORDER __BIG_ENDIAN
+#elif defined __LITTLE_ENDIAN__
+# define __BYTE_ORDER __LITTLE_ENDIAN
+#else
+# error "Endianness not declared!!"
+#endif
Added: fsf/trunk/ports/sysdeps/tile/bits/fenv.h
==============================================================================
--- fsf/trunk/ports/sysdeps/tile/bits/fenv.h (added)
+++ fsf/trunk/ports/sysdeps/tile/bits/fenv.h Mon Dec 5 00:03:25 2011
@@ -1,0 +1,43 @@
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Chris Metcalf <cmetcalf@xxxxxxxxxx>, 2011.
+
+ 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, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _FENV_H
+# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
+#endif
+
+/* The TILE-Gx hardware does not provide floating-point exception
+ handling, and TILEPro does not support any floating-point operations. */
+#define FE_ALL_EXCEPT 0
+
+/* TILE-Gx supports only round-to-nearest. The software
+ floating-point support also acts this way. */
+enum
+ {
+ FE_TONEAREST = 1,
+#define FE_TONEAREST FE_TONEAREST
+ };
+
+/* Type representing exception flags (if there were any). */
+typedef unsigned int fexcept_t;
+
+/* Type representing floating-point environment. */
+typedef unsigned int fenv_t;
+
+/* If the default argument is used we use this value. */
+#define FE_DFL_ENV ((__const fenv_t *) -1l)
Added: fsf/trunk/ports/sysdeps/tile/bits/link.h
==============================================================================
--- fsf/trunk/ports/sysdeps/tile/bits/link.h (added)
+++ fsf/trunk/ports/sysdeps/tile/bits/link.h Mon Dec 5 00:03:25 2011
@@ -1,0 +1,58 @@
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Chris Metcalf <cmetcalf@xxxxxxxxxx>, 2011.
+
+ 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, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _LINK_H
+# error "Never include <bits/link.h> directly; use <link.h> instead."
+#endif
+
+#define __need_int_reg_t
+#include <arch/abi.h>
+
+
+/* Registers for entry into PLT. */
+typedef struct La_tile_regs
+{
+ __uint_reg_t lr_reg[10];
+} La_tile_regs;
+
+/* Return values for calls from PLT. */
+typedef struct La_tile_retval
+{
+ /* Up to ten registers can be used for a return value (e.g. small struct). */
+ __uint_reg_t lrv_reg[10];
+} La_tile_retval;
+
+
+__BEGIN_DECLS
+
+extern ElfW(Addr) la_tile_gnu_pltenter (ElfW(Sym) *__sym, unsigned int __ndx,
+ uintptr_t *__refcook,
+ uintptr_t *__defcook,
+ La_tile_regs *__regs,
+ unsigned int *__flags,
+ const char *__symname,
+ long int *__framesizep);
+extern unsigned int la_tile_gnu_pltexit (ElfW(Sym) *__sym, unsigned int __ndx,
+ uintptr_t *__refcook,
+ uintptr_t *__defcook,
+ const La_tile_regs *__inregs,
+ La_tile_retval *__outregs,
+ const char *__symname);
+
+__END_DECLS
Added: fsf/trunk/ports/sysdeps/tile/bits/mathdef.h
==============================================================================
--- fsf/trunk/ports/sysdeps/tile/bits/mathdef.h (added)
+++ fsf/trunk/ports/sysdeps/tile/bits/mathdef.h Mon Dec 5 00:03:25 2011
@@ -1,0 +1,49 @@
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Chris Metcalf <cmetcalf@xxxxxxxxxx>, 2011.
+
+ 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, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#if !defined _MATH_H && !defined _COMPLEX_H
+# error "Never use <bits/mathdef.h> directly; include <math.h> instead"
+#endif
+
+#if defined __USE_ISOC99 && defined _MATH_H && !defined _MATH_H_MATHDEF
+# define _MATH_H_MATHDEF 1
+
+/* "float" and "double" expressions evaluated as "float" and "double". */
+typedef float float_t;
+typedef double double_t;
+
+/* The values returned by `ilogb' for 0 and NaN respectively. */
+# define FP_ILOGB0 (-2147483647)
+# define FP_ILOGBNAN (2147483647)
+
+/* The GCC 4.6 compiler will define __FP_FAST_FMA{,F,L} if the fma{,f,l}
+ builtins are supported. */
+# if __FP_FAST_FMA
+# define FP_FAST_FMA 1
+# endif
+
+# if __FP_FAST_FMAF
+# define FP_FAST_FMAF 1
+# endif
+
+# if __FP_FAST_FMAL
+# define FP_FAST_FMAL 1
+# endif
+
+#endif /* ISO C99 */
Added: fsf/trunk/ports/sysdeps/tile/bits/mathinline.h
==============================================================================
--- fsf/trunk/ports/sysdeps/tile/bits/mathinline.h (added)
+++ fsf/trunk/ports/sysdeps/tile/bits/mathinline.h Mon Dec 5 00:03:25 2011
@@ -1,0 +1,45 @@
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Chris Metcalf <cmetcalf@xxxxxxxxxx>, 2011.
+
+ 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, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _MATH_H
+# error "Never use <bits/mathinline.h> directly; include <math.h> instead."
+#endif
+
+#ifndef __extern_always_inline
+# define __MATH_INLINE __inline
+#else
+# define __MATH_INLINE __extern_always_inline
+#endif
+
+
+#if defined __USE_ISOC99 && defined __GNUC__
+
+/* Test for negative number. Used in the signbit() macro. */
+__MATH_INLINE int
+__NTH (__signbitf (float __x))
+{
+ return __builtin_signbitf (__x);
+}
+__MATH_INLINE int
+__NTH (__signbit (double __x))
+{
+ return __builtin_signbit (__x);
+}
+
+#endif
Added: fsf/trunk/ports/sysdeps/tile/bits/setjmp.h
==============================================================================
--- fsf/trunk/ports/sysdeps/tile/bits/setjmp.h (added)
+++ fsf/trunk/ports/sysdeps/tile/bits/setjmp.h Mon Dec 5 00:03:25 2011
@@ -1,0 +1,37 @@
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Chris Metcalf <cmetcalf@xxxxxxxxxx>, 2011.
+
+ 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, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+/* Define the machine-dependent type `jmp_buf'. TILE version. */
+#ifndef _BITS_SETJMP_H
+#define _BITS_SETJMP_H 1
+
+#if !defined _SETJMP_H && !defined _PTHREAD_H
+# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
+#endif
+
+#ifndef _ASM
+
+#define __need_int_reg_t
+#include <arch/abi.h>
+
+typedef __uint_reg_t __jmp_buf[32];
+
+#endif
+
+#endif /* bits/setjmp.h */
Added: fsf/trunk/ports/sysdeps/tile/bsd-_setjmp.S
==============================================================================
--- fsf/trunk/ports/sysdeps/tile/bsd-_setjmp.S (added)
+++ fsf/trunk/ports/sysdeps/tile/bsd-_setjmp.S Mon Dec 5 00:03:25 2011
@@ -1,0 +1,1 @@
+/* _setjmp is in setjmp.S */
Added: fsf/trunk/ports/sysdeps/tile/bsd-setjmp.S
==============================================================================
--- fsf/trunk/ports/sysdeps/tile/bsd-setjmp.S (added)
+++ fsf/trunk/ports/sysdeps/tile/bsd-setjmp.S Mon Dec 5 00:03:25 2011
@@ -1,0 +1,1 @@
+/* setjmp is in setjmp.S */
Added: fsf/trunk/ports/sysdeps/tile/bzero.S
==============================================================================
--- fsf/trunk/ports/sysdeps/tile/bzero.S (added)
+++ fsf/trunk/ports/sysdeps/tile/bzero.S Mon Dec 5 00:03:25 2011
@@ -1,0 +1,31 @@
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Chris Metcalf <cmetcalf@xxxxxxxxxx>, 2011.
+
+ 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, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sysdep.h>
+
+ .text
+ENTRY(__bzero)
+ FEEDBACK_ENTER(__bzero)
+ {
+ move r2, r1
+ move r1, zero
+ }
+ j __memset
+END(__bzero)
+weak_alias (__bzero, bzero)
Added: fsf/trunk/ports/sysdeps/tile/dl-lookupcfg.h
==============================================================================
--- fsf/trunk/ports/sysdeps/tile/dl-lookupcfg.h (added)
+++ fsf/trunk/ports/sysdeps/tile/dl-lookupcfg.h Mon Dec 5 00:03:25 2011
@@ -1,0 +1,28 @@
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Chris Metcalf <cmetcalf@xxxxxxxxxx>, 2011.
+
+ 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, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#define DL_UNMAP_IS_SPECIAL
+
+#include_next <dl-lookupcfg.h>
+
+struct link_map;
+
+void internal_function _dl_unmap (struct link_map *map);
+
+#define DL_UNMAP(map) _dl_unmap (map)
Added: fsf/trunk/ports/sysdeps/tile/dl-machine.h
==============================================================================
--- fsf/trunk/ports/sysdeps/tile/dl-machine.h (added)
+++ fsf/trunk/ports/sysdeps/tile/dl-machine.h Mon Dec 5 00:03:25 2011
@@ -1,0 +1,918 @@
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Chris Metcalf <cmetcalf@xxxxxxxxxx>, 2011.
+ Based on work contributed by by Carl Pederson & Martin Schwidefsky.
+
+ 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, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef dl_machine_h
+#define dl_machine_h
+
+#ifdef __tilegx__
+#define ELF_MACHINE_NAME "tilegx"
+#else
+#define ELF_MACHINE_NAME "tilepro"
+#endif
+
+#include <sys/param.h>
+#include <string.h>
+#include <link.h>
+#include <bits/wordsize.h>
+#include <arch/icache.h>
+#include <arch/opcode.h>
+
+/* Return nonzero iff ELF header is compatible with the running host. */
+static inline int
+elf_machine_matches_host (const ElfW(Ehdr) *ehdr)
+{
+#if defined __tilegx__
+ if (ehdr->e_machine != EM_TILEGX)
+ return 0;
+# if __WORDSIZE == 32
+ return (ehdr->e_ident[EI_CLASS] == ELFCLASS32);
+# else
+ return (ehdr->e_ident[EI_CLASS] == ELFCLASS64);
+# endif
+#elif defined __tilepro__
+ return ehdr->e_machine == EM_TILEPRO;
+#else
+# error "Unknown tile architecture."
+#endif
+}
+
+
+/* Return the link-time address of _DYNAMIC. Conveniently, this is the
+ first element of the GOT. This must be inlined in a function which
+ uses global data. */
+
+static inline ElfW(Addr)
+elf_machine_dynamic (void)
+{
+ ElfW(Addr) *got;
+
+#ifdef __tilegx__
+ ElfW(Addr) tmp;
+ asm( " { lnk %0; moveli %1, hw2_last(_GLOBAL_OFFSET_TABLE_ - 1f) }\n"
+ "1: shl16insli %1, %1, hw1(_GLOBAL_OFFSET_TABLE_ - 1b)\n"
+ " shl16insli %1, %1, hw0(_GLOBAL_OFFSET_TABLE_ - 1b)\n"
+ " add %0, %0, %1"
+ : "=r" (got), "=r" (tmp));
+#else
+ asm( " lnk %0\n"
+ "1: addli %0, %0, lo16(_GLOBAL_OFFSET_TABLE_ - 1b)\n"
+ " auli %0, %0, ha16(_GLOBAL_OFFSET_TABLE_ - 1b)"
+ : "=r" (got));
+#endif
+
+ return *got;
+}
+
+
+/* Return the run-time load address of the shared object. */
+static inline ElfW(Addr)
+elf_machine_load_address (void)
+{
+ ElfW(Addr) *got;
+ ElfW(Addr) dynamic;
+
+#ifdef __tilegx__
+ ElfW(Addr) tmp;
+ asm( " lnk %2\n"
+ "1: {\n"
+ " moveli %0, hw2_last(_GLOBAL_OFFSET_TABLE_ - 1b)\n"
+ " moveli %1, hw2_last(_DYNAMIC - 1b)\n"
+ " }\n"
+ " {\n"
+ " shl16insli %0, %0, hw1(_GLOBAL_OFFSET_TABLE_ - 1b)\n"
+ " shl16insli %1, %1, hw1(_DYNAMIC - 1b)\n"
+ " }\n"
+ " {\n"
+ " shl16insli %0, %0, hw0(_GLOBAL_OFFSET_TABLE_ - 1b)\n"
+ " shl16insli %1, %1, hw0(_DYNAMIC - 1b)\n"
+ " }\n"
+ " {\n"
+ " add %0, %0, %2\n"
+ " add %1, %1, %2\n"
+ " }"
+ : "=r" (got), "=r" (dynamic), "=r" (tmp));
+#else
+ asm( " lnk %0\n"
+ "1: {\n"
+ " addli %0, %0, lo16(_GLOBAL_OFFSET_TABLE_ - 1b)\n"
+ " addli %1, %0, lo16(_DYNAMIC - 1b)\n"
+ " }\n"
+ " {\n"
+ " auli %0, %0, ha16(_GLOBAL_OFFSET_TABLE_ - 1b)\n"
+ " auli %1, %1, ha16(_DYNAMIC - 1b)\n"
+ " }\n"
+ : "=r" (got), "=r" (dynamic));
+#endif
+
+ return dynamic - *got;
+}
+
+/* Flush some range of the instruction cache. If invoked prior to
+ actually setting dl_pagesize, we conservatively use 4KB, which
+ is the smallest page size we could plausibly be running with. */
+static inline void
+_dl_flush_icache (const void *addr, unsigned long size)
+{
+ invalidate_icache (addr, size, GLRO(dl_pagesize) ? : 4096);
+}
+
+/* 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__ ((unused))
+elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
+{
+ ElfW(Addr) *gotplt;
+ extern void _dl_runtime_resolve (ElfW(Word));
+ extern void _dl_runtime_profile (ElfW(Word));
+
+ if (l->l_info[DT_JMPREL] && lazy)
+ {
+ gotplt = (ElfW(Addr) *) D_PTR (l, l_info[DT_PLTGOT]);
+
+ /* The GOT entries for functions in the PLT have not yet been filled
+ in. Their initial contents will arrange when called to put in
+ registers an offset into the .rel.plt section, and gotplt[0], then
+ jump to gotplt[1]. */
+
+ /* Identify this shared object. */
+ gotplt[0] = (ElfW(Addr)) l;
+
+ /* The gotplt[1] 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 GOTPLT so that all future calls also end
+ in this function. */
+ if (__builtin_expect (profile, 0))
+ {
+ gotplt[1] = (ElfW(Addr)) &_dl_runtime_profile;
+
+ if (GLRO(dl_profile) != NULL
+ && _dl_name_match_p (GLRO(dl_profile), l))
+ /* This is the object we are looking for. Say that we really
+ want profiling and the timers are started. */
+ GL(dl_profile_map) = l;
+ }
+ else
+ /* This function will get called to fix up the GOTPLT entry
+ indicated by the offset on the stack, and then jump to the
+ resolved address. */
+ gotplt[1] = (ElfW(Addr)) &_dl_runtime_resolve;
+ }
+
+ return lazy;
+}
+
+#if __WORDSIZE == 32
+/* Mask identifying addresses reserved for the user program,
+ where the dynamic linker should not map anything. */
+#define ELF_MACHINE_USER_ADDRESS_MASK 0xf8000000UL
+#endif
+
+/* 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 (".globl _dl_start");
+
+#ifndef RTLD_START_SPECIAL_INIT
+#define RTLD_START_SPECIAL_INIT /* nothing */
+#endif
+
+/* Wrap a generic Tilera relocation type. */
+#ifdef __tilegx__
+#define R_TILE(x) R_TILEGX_##x
+#define __R_TILE_TLS(x,c) R_TILEGX_TLS_##x##c
+#define _R_TILE_TLS(x,c) __R_TILE_TLS(x,c)
+#define R_TILE_TLS(x) _R_TILE_TLS(x,__ELF_NATIVE_CLASS)
+#else
+#define R_TILE(x) R_TILEPRO_##x
+#define R_TILE_TLS(x) R_TILEPRO_TLS_##x##32
+#endif
+
+/* 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. */
+#define elf_machine_type_class(type) \
+ ((((type) == R_TILE(JMP_SLOT) || (type) == R_TILE_TLS(DTPMOD) \
+ || (type) == R_TILE_TLS(DTPOFF) || (type) == R_TILE_TLS(TPOFF)) \
+ * ELF_RTYPE_CLASS_PLT) \
+ | (((type) == R_TILE(COPY)) * ELF_RTYPE_CLASS_COPY))
+
+/* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */
+#define ELF_MACHINE_JMP_SLOT R_TILE(JMP_SLOT)
+
+/* TILE never uses Elf32_Rel relocations. */
+#define ELF_MACHINE_NO_REL 1
+
+/* TILE overlaps DT_RELA and DT_PLTREL. */
+#define ELF_MACHINE_PLTREL_OVERLAP 1
+
+/* 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 ElfW(Addr)
+elf_machine_fixup_plt (struct link_map *map, lookup_t t,
+ const ElfW(Rela) *reloc,
+ ElfW(Addr) *reloc_addr, ElfW(Addr) value)
+{
+ return *reloc_addr = value;
+}
+
+/* Return the final value of a plt relocation. */
+static inline ElfW(Addr)
+elf_machine_plt_value (struct link_map *map, const ElfW(Rela) *reloc,
+ ElfW(Addr) value)
+{
+ return value;
+}
+
+/* Support notifying the simulator about new objects. */
+void internal_function _dl_arch_map_object (struct link_map *l);
+#define _dl_arch_map_object _dl_arch_map_object
+
+/* Names of the architecture-specific auditing callback functions. */
+#define ARCH_LA_PLTENTER tile_gnu_pltenter
+#define ARCH_LA_PLTEXIT tile_gnu_pltexit
+
+#endif /* !dl_machine_h */
+
+
+#ifdef RESOLVE_MAP
+
+struct reloc_howto
+{
+ /* Right shift operand by this number of bits. */
+ unsigned char right_shift;
+
+#ifdef __tilegx__
+ /* If nonzero, this is updating a code bundle. */
+ unsigned char is_bundle_update;
+#else
+ /* If nonzero, add 0x8000 to the value. */
+ unsigned char add_0x8000;
+#endif
+
+ /* If nonzero, subtract the containing address from the address. */
+ unsigned char is_pcrel;
+
+ /* Size in bytes, or 0 if this table entry should be ignored. */
+ unsigned char byte_size;
+};
+
+/* Relocation information. Cannot contain create_* function pointers
+ because then the table would not be position-independent. */
+static const struct reloc_howto howto[] =
+{
+#ifdef __tilegx__
+
+# if __WORDSIZE == 32
+ /* The GX -m32 loader only handles 32-bit types, so it will be confused
+ by shifts larger than that. We convert them to just sign-extend;
+ they usually indicate a program bug or missed optimization, but we
+ have to handle them correctly anyway. */
+# define S32 31
+# define S48 31
+# else
+# define S32 32
+# define S48 48
+# endif
+
+ /* R_TILEGX_NONE */ { 0, 0, 0, 0 },
+ /* R_TILEGX_64 */ { 0, 0, 0, 8 },
+ /* R_TILEGX_32 */ { 0, 0, 0, 4 },
+ /* R_TILEGX_16 */ { 0, 0, 0, 2 },
+ /* R_TILEGX_8 */ { 0, 0, 0, 1 },
+ /* R_TILEGX_64_PCREL */ { 0, 0, 1, 8 },
+ /* R_TILEGX_32_PCREL */ { 0, 0, 1, 4 },
+ /* R_TILEGX_16_PCREL */ { 0, 0, 1, 2 },
+ /* R_TILEGX_8_PCREL */ { 0, 0, 1, 1 },
+ /* R_TILEGX_HW0 */ { 0, 0, 0, 0 },
+ /* R_TILEGX_HW1 */ { 16, 0, 0, 0 },
+ /* R_TILEGX_HW2 */ { S32, 0, 0, 0 },
+ /* R_TILEGX_HW3 */ { S48, 0, 0, 0 },
+ /* R_TILEGX_HW0_LAST */ { 0, 0, 0, 0 },
+ /* R_TILEGX_HW1_LAST */ { 16, 0, 0, 0 },
+ /* R_TILEGX_HW2_LAST */ { S32, 0, 0, 0 },
+ /* R_TILEGX_COPY */ { 0, 0, 0, 0 },
+ /* R_TILEGX_GLOB_DAT */ { 0, 0, 0, 8 },
+ /* R_TILEGX_JMP_SLOT */ { 0, 0, 0, 0 },
+ /* R_TILEGX_RELATIVE */ { 0, 0, 0, 0 },
+ /* R_TILEGX_BROFF_X1 */ { 3, 1, 1, 8 },
+ /* R_TILEGX_JUMPOFF_X1 */ { 3, 1, 1, 8 },
+ /* R_TILEGX_JUMPOFF_X1_PLT */ { 3, 1, 1, 8 },
+ /* R_TILEGX_IMM8_X0 */ { 0, 1, 0, 8 },
+ /* R_TILEGX_IMM8_Y0 */ { 0, 1, 0, 8 },
+ /* R_TILEGX_IMM8_X1 */ { 0, 1, 0, 8 },
+ /* R_TILEGX_IMM8_Y1 */ { 0, 1, 0, 8 },
+ /* R_TILEGX_DEST_IMM8_X1 */ { 0, 1, 0, 8 },
+ /* R_TILEGX_MT_IMM14_X1 */ { 0, 1, 0, 8 },
+ /* R_TILEGX_MF_IMM14_X1 */ { 0, 1, 0, 8 },
+ /* R_TILEGX_MMSTART_X0 */ { 0, 1, 0, 8 },
+ /* R_TILEGX_MMEND_X0 */ { 0, 1, 0, 8 },
+ /* R_TILEGX_SHAMT_X0 */ { 0, 1, 0, 8 },
+ /* R_TILEGX_SHAMT_X1 */ { 0, 1, 0, 8 },
+ /* R_TILEGX_SHAMT_Y0 */ { 0, 1, 0, 8 },
+ /* R_TILEGX_SHAMT_Y1 */ { 0, 1, 0, 8 },
+ /* R_TILEGX_IMM16_X0_HW0 */ { 0, 1, 0, 8 },
+ /* R_TILEGX_IMM16_X1_HW0 */ { 0, 1, 0, 8 },
+ /* R_TILEGX_IMM16_X0_HW1 */ { 16, 1, 0, 8 },
+ /* R_TILEGX_IMM16_X1_HW1 */ { 16, 1, 0, 8 },
+ /* R_TILEGX_IMM16_X0_HW2 */ { S32, 1, 0, 8 },
+ /* R_TILEGX_IMM16_X1_HW2 */ { S32, 1, 0, 8 },
+ /* R_TILEGX_IMM16_X0_HW3 */ { S48, 1, 0, 8 },
+ /* R_TILEGX_IMM16_X1_HW3 */ { S48, 1, 0, 8 },
+ /* R_TILEGX_IMM16_X0_HW0_LAST */ { 0, 1, 0, 8 },
+ /* R_TILEGX_IMM16_X1_HW0_LAST */ { 0, 1, 0, 8 },
+ /* R_TILEGX_IMM16_X0_HW1_LAST */ { 16, 1, 0, 8 },
+ /* R_TILEGX_IMM16_X1_HW1_LAST */ { 16, 1, 0, 8 },
+ /* R_TILEGX_IMM16_X0_HW2_LAST */ { S32, 1, 0, 8 },
+ /* R_TILEGX_IMM16_X1_HW2_LAST */ { S32, 1, 0, 8 },
+ /* R_TILEGX_IMM16_X0_HW0_PCREL */ { 0, 1, 1, 8 },
+ /* R_TILEGX_IMM16_X1_HW0_PCREL */ { 0, 1, 1, 8 },
+ /* R_TILEGX_IMM16_X0_HW1_PCREL */ { 16, 1, 1, 8 },
+ /* R_TILEGX_IMM16_X1_HW1_PCREL */ { 16, 1, 1, 8 },
+ /* R_TILEGX_IMM16_X0_HW2_PCREL */ { S32, 1, 1, 8 },
+ /* R_TILEGX_IMM16_X1_HW2_PCREL */ { S32, 1, 1, 8 },
+ /* R_TILEGX_IMM16_X0_HW3_PCREL */ { S48, 1, 1, 8 },
+ /* R_TILEGX_IMM16_X1_HW3_PCREL */ { S48, 1, 1, 8 },
+ /* R_TILEGX_IMM16_X0_HW0_LAST_PCREL */ { 0, 1, 1, 8 },
+ /* R_TILEGX_IMM16_X1_HW0_LAST_PCREL */ { 0, 1, 1, 8 },
+ /* R_TILEGX_IMM16_X0_HW1_LAST_PCREL */ { 16, 1, 1, 8 },
+ /* R_TILEGX_IMM16_X1_HW1_LAST_PCREL */ { 16, 1, 1, 8 },
+ /* R_TILEGX_IMM16_X0_HW2_LAST_PCREL */ { S32, 1, 1, 8 },
+ /* R_TILEGX_IMM16_X1_HW2_LAST_PCREL */ { S32, 1, 1, 8 },
+ /* R_TILEGX_IMM16_X0_HW0_GOT */ { 0, 1, 0, 0 },
+ /* R_TILEGX_IMM16_X1_HW0_GOT */ { 0, 1, 0, 0 },
+ /* R_TILEGX_IMM16_X0_HW1_GOT */ { 16, 1, 0, 0 },
+ /* R_TILEGX_IMM16_X1_HW1_GOT */ { 16, 1, 0, 0 },
+ /* R_TILEGX_IMM16_X0_HW2_GOT */ { S32, 1, 0, 0 },
+ /* R_TILEGX_IMM16_X1_HW2_GOT */ { S32, 1, 0, 0 },
+ /* R_TILEGX_IMM16_X0_HW3_GOT */ { S48, 1, 0, 0 },
+ /* R_TILEGX_IMM16_X1_HW3_GOT */ { S48, 1, 0, 0 },
+ /* R_TILEGX_IMM16_X0_HW0_LAST_GOT */ { 0, 1, 0, 0 },
+ /* R_TILEGX_IMM16_X1_HW0_LAST_GOT */ { 0, 1, 0, 0 },
+ /* R_TILEGX_IMM16_X0_HW1_LAST_GOT */ { 16, 1, 0, 0 },
+ /* R_TILEGX_IMM16_X1_HW1_LAST_GOT */ { 16, 1, 0, 0 },
+ /* R_TILEGX_IMM16_X0_HW2_LAST_GOT */ { S32, 1, 0, 0 },
+ /* R_TILEGX_IMM16_X1_HW2_LAST_GOT */ { S32, 1, 0, 0 },
+ /* R_TILEGX_IMM16_X0_HW0_TLS_GD */ { 0, 1, 0, 8 },
+ /* R_TILEGX_IMM16_X1_HW0_TLS_GD */ { 0, 1, 0, 8 },
+ /* R_TILEGX_IMM16_X0_HW1_TLS_GD */ { 16, 1, 0, 8 },
+ /* R_TILEGX_IMM16_X1_HW1_TLS_GD */ { 16, 1, 0, 8 },
+ /* R_TILEGX_IMM16_X0_HW2_TLS_GD */ { S32, 1, 0, 8 },
+ /* R_TILEGX_IMM16_X1_HW2_TLS_GD */ { S32, 1, 0, 8 },
+ /* R_TILEGX_IMM16_X0_HW3_TLS_GD */ { S48, 1, 0, 8 },
+ /* R_TILEGX_IMM16_X1_HW3_TLS_GD */ { S48, 1, 0, 8 },
+ /* R_TILEGX_IMM16_X0_HW0_LAST_TLS_GD */{ 0, 1, 0, 8 },
+ /* R_TILEGX_IMM16_X1_HW0_LAST_TLS_GD */{ 0, 1, 0, 8 },
+ /* R_TILEGX_IMM16_X0_HW1_LAST_TLS_GD */{ 16, 1, 0, 8 },
+ /* R_TILEGX_IMM16_X1_HW1_LAST_TLS_GD */{ 16, 1, 0, 8 },
+ /* R_TILEGX_IMM16_X0_HW2_LAST_TLS_GD */{ S32, 1, 0, 8 },
+ /* R_TILEGX_IMM16_X1_HW2_LAST_TLS_GD */{ S32, 1, 0, 8 },
+ /* R_TILEGX_IMM16_X0_HW0_TLS_IE */ { 0, 1, 0, 8 },
+ /* R_TILEGX_IMM16_X1_HW0_TLS_IE */ { 0, 1, 0, 8 },
+ /* R_TILEGX_IMM16_X0_HW1_TLS_IE */ { 16, 1, 0, 8 },
+ /* R_TILEGX_IMM16_X1_HW1_TLS_IE */ { 16, 1, 0, 8 },
+ /* R_TILEGX_IMM16_X0_HW2_TLS_IE */ { S32, 1, 0, 8 },
+ /* R_TILEGX_IMM16_X1_HW2_TLS_IE */ { S32, 1, 0, 8 },
+ /* R_TILEGX_IMM16_X0_HW3_TLS_IE */ { S48, 1, 0, 8 },
+ /* R_TILEGX_IMM16_X1_HW3_TLS_IE */ { S48, 1, 0, 8 },
+ /* R_TILEGX_IMM16_X0_HW0_LAST_TLS_IE */{ 0, 1, 0, 8 },
+ /* R_TILEGX_IMM16_X1_HW0_LAST_TLS_IE */{ 0, 1, 0, 8 },
+ /* R_TILEGX_IMM16_X0_HW1_LAST_TLS_IE */{ 16, 1, 0, 8 },
+ /* R_TILEGX_IMM16_X1_HW1_LAST_TLS_IE */{ 16, 1, 0, 8 },
+ /* R_TILEGX_IMM16_X0_HW2_LAST_TLS_IE */{ S32, 1, 0, 8 },
+ /* R_TILEGX_IMM16_X1_HW2_LAST_TLS_IE */{ S32, 1, 0, 8 },
+ /* R_TILEGX_TLS_DTPMOD64 */ { 0, 0, 0, 0 },
+ /* R_TILEGX_TLS_DTPOFF64 */ { 0, 0, 0, 0 },
+ /* R_TILEGX_TLS_TPOFF64 */ { 0, 0, 0, 0 },
+ /* R_TILEGX_TLS_DTPMOD32 */ { 0, 0, 0, 0 },
+ /* R_TILEGX_TLS_DTPOFF32 */ { 0, 0, 0, 0 },
+ /* R_TILEGX_TLS_TPOFF32 */ { 0, 0, 0, 0 }
+#else
+ /* R_TILEPRO_NONE */ { 0, 0, 0, 0 },
+ /* R_TILEPRO_32 */ { 0, 0, 0, 4 },
+ /* R_TILEPRO_16 */ { 0, 0, 0, 2 },
+ /* R_TILEPRO_8 */ { 0, 0, 0, 1 },
+ /* R_TILEPRO_32_PCREL */ { 0, 0, 1, 4 },
+ /* R_TILEPRO_16_PCREL */ { 0, 0, 1, 2 },
+ /* R_TILEPRO_8_PCREL */ { 0, 0, 1, 1 },
+ /* R_TILEPRO_LO16 */ { 0, 0, 0, 2 },
+ /* R_TILEPRO_HI16 */ { 16, 0, 0, 2 },
+ /* R_TILEPRO_HA16 */ { 16, 1, 0, 2 },
+ /* R_TILEPRO_COPY */ { 0, 0, 0, 0 },
+ /* R_TILEPRO_GLOB_DAT */ { 0, 0, 0, 4 },
+ /* R_TILEPRO_JMP_SLOT */ { 0, 0, 0, 0 },
+ /* R_TILEPRO_RELATIVE */ { 0, 0, 0, 0 },
+ /* R_TILEPRO_BROFF_X1 */ { 3, 0, 1, 8 },
+ /* R_TILEPRO_JOFFLONG_X1 */ { 3, 0, 1, 8 },
+ /* R_TILEPRO_JOFFLONG_X1_PLT */ { 3, 0, 1, 8 },
+ /* R_TILEPRO_IMM8_X0 */ { 0, 0, 0, 8 },
+ /* R_TILEPRO_IMM8_Y0 */ { 0, 0, 0, 8 },
+ /* R_TILEPRO_IMM8_X1 */ { 0, 0, 0, 8 },
+ /* R_TILEPRO_IMM8_Y1 */ { 0, 0, 0, 8 },
+ /* R_TILEPRO_MT_IMM15_X1 */ { 0, 0, 0, 8 },
+ /* R_TILEPRO_MF_IMM15_X1 */ { 0, 0, 0, 8 },
+ /* R_TILEPRO_IMM16_X0 */ { 0, 0, 0, 8 },
+ /* R_TILEPRO_IMM16_X1 */ { 0, 0, 0, 8 },
+ /* R_TILEPRO_IMM16_X0_LO */ { 0, 0, 0, 8 },
+ /* R_TILEPRO_IMM16_X1_LO */ { 0, 0, 0, 8 },
+ /* R_TILEPRO_IMM16_X0_HI */ { 16, 0, 0, 8 },
+ /* R_TILEPRO_IMM16_X1_HI */ { 16, 0, 0, 8 },
+ /* R_TILEPRO_IMM16_X0_HA */ { 16, 1, 0, 8 },
+ /* R_TILEPRO_IMM16_X1_HA */ { 16, 1, 0, 8 },
+ /* R_TILEPRO_IMM16_X0_PCREL */ { 0, 0, 1, 8 },
+ /* R_TILEPRO_IMM16_X1_PCREL */ { 0, 0, 1, 8 },
+ /* R_TILEPRO_IMM16_X0_LO_PCREL */ { 0, 0, 1, 8 },
+ /* R_TILEPRO_IMM16_X1_LO_PCREL */ { 0, 0, 1, 8 },
+ /* R_TILEPRO_IMM16_X0_HI_PCREL */ { 16, 0, 1, 8 },
+ /* R_TILEPRO_IMM16_X1_HI_PCREL */ { 16, 0, 1, 8 },
+ /* R_TILEPRO_IMM16_X0_HA_PCREL */ { 16, 1, 1, 8 },
+ /* R_TILEPRO_IMM16_X1_HA_PCREL */ { 16, 1, 1, 8 },
+ /* R_TILEPRO_IMM16_X0_GOT */ { 0, 0, 0, 0 },
+ /* R_TILEPRO_IMM16_X1_GOT */ { 0, 0, 0, 0 },
+ /* R_TILEPRO_IMM16_X0_GOT_LO */ { 0, 0, 0, 0 },
+ /* R_TILEPRO_IMM16_X1_GOT_LO */ { 0, 0, 0, 0 },
+ /* R_TILEPRO_IMM16_X0_GOT_HI */ { 0, 0, 0, 0 },
+ /* R_TILEPRO_IMM16_X1_GOT_HI */ { 0, 0, 0, 0 },
+ /* R_TILEPRO_IMM16_X0_GOT_HA */ { 0, 0, 0, 0 },
+ /* R_TILEPRO_IMM16_X1_GOT_HA */ { 0, 0, 0, 0 },
+ /* R_TILEPRO_MMSTART_X0 */ { 0, 0, 0, 8 },
+ /* R_TILEPRO_MMEND_X0 */ { 0, 0, 0, 8 },
+ /* R_TILEPRO_MMSTART_X1 */ { 0, 0, 0, 8 },
+ /* R_TILEPRO_MMEND_X1 */ { 0, 0, 0, 8 },
+ /* R_TILEPRO_SHAMT_X0 */ { 0, 0, 0, 8 },
+ /* R_TILEPRO_SHAMT_X1 */ { 0, 0, 0, 8 },
+ /* R_TILEPRO_SHAMT_Y0 */ { 0, 0, 0, 8 },
+ /* R_TILEPRO_SHAMT_Y1 */ { 0, 0, 0, 8 },
+ /* R_TILEPRO_SN_BROFF */ { 0, 0, 0, 0 },
+ /* R_TILEPRO_SN_IMM8 */ { 0, 0, 0, 0 },
+ /* R_TILEPRO_SN_UIMM8 */ { 0, 0, 0, 0 },
+ /* R_TILEPRO_SN_BYTE0 */ { 0, 0, 0, 0 },
+ /* R_TILEPRO_SN_BYTE1 */ { 0, 0, 0, 0 },
+ /* R_TILEPRO_SN_BYTE2 */ { 0, 0, 0, 0 },
+ /* R_TILEPRO_SN_BYTE3 */ { 0, 0, 0, 0 },
+ /* R_TILEPRO_SN_SPCREL0 */ { 0, 0, 0, 0 },
+ /* R_TILEPRO_SN_SPCREL1 */ { 0, 0, 0, 0 },
+ /* R_TILEPRO_SN_SPCREL2 */ { 0, 0, 0, 0 },
+ /* R_TILEPRO_SN_SPCREL3 */ { 0, 0, 0, 0 },
+ /* R_TILEPRO_IMM16_X0_TLS_GD */ { 0, 0, 0, 8 },
+ /* R_TILEPRO_IMM16_X1_TLS_GD */ { 0, 0, 0, 8 },
+ /* R_TILEPRO_IMM16_X0_TLS_GD_LO */ { 0, 0, 0, 8 },
+ /* R_TILEPRO_IMM16_X1_TLS_GD_LO */ { 0, 0, 0, 8 },
+ /* R_TILEPRO_IMM16_X0_TLS_GD_HI */ { 16, 0, 0, 8 },
+ /* R_TILEPRO_IMM16_X1_TLS_GD_HI */ { 16, 0, 0, 8 },
+ /* R_TILEPRO_IMM16_X0_TLS_GD_HA */ { 16, 1, 0, 8 },
+ /* R_TILEPRO_IMM16_X1_TLS_GD_HA */ { 16, 1, 0, 8 },
+ /* R_TILEPRO_IMM16_X0_TLS_IE */ { 0, 0, 0, 8 },
+ /* R_TILEPRO_IMM16_X1_TLS_IE */ { 0, 0, 0, 8 },
+ /* R_TILEPRO_IMM16_X0_TLS_IE_LO */ { 0, 0, 0, 8 },
+ /* R_TILEPRO_IMM16_X1_TLS_IE_LO */ { 0, 0, 0, 8 },
+ /* R_TILEPRO_IMM16_X0_TLS_IE_HI */ { 16, 0, 0, 8 },
+ /* R_TILEPRO_IMM16_X1_TLS_IE_HI */ { 16, 0, 0, 8 },
+ /* R_TILEPRO_IMM16_X0_TLS_IE_HA */ { 16, 1, 0, 8 },
+ /* R_TILEPRO_IMM16_X1_TLS_IE_HA */ { 16, 1, 0, 8 },
+ /* R_TILEPRO_TLS_DTPMOD32 */ { 0, 0, 0, 0 },
+ /* R_TILEPRO_TLS_DTPOFF32 */ { 0, 0, 0, 0 },
+ /* R_TILEPRO_TLS_TPOFF32 */ { 0, 0, 0, 0 },
+#endif
+};
+
+#if __ELF_NATIVE_CLASS == 32
+#define ELFW_R_TYPE ELF32_R_TYPE
+#define ELFW_ST_TYPE ELF32_ST_TYPE
+#else
+#define ELFW_R_TYPE ELF64_R_TYPE
+#define ELFW_ST_TYPE ELF64_ST_TYPE
+#endif
+
+/* Perform the relocation specified by RELOC and SYM (which is fully resolved).
+ MAP is the object containing the reloc. */
+
+auto inline void __attribute__ ((always_inline))
+elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc,
+ const ElfW(Sym) *sym, const struct r_found_version *version,
+ void *const reloc_addr_arg, int skip_ifunc)
+{
+ ElfW(Addr) *const reloc_addr = reloc_addr_arg;
+ const unsigned int r_type = ELFW_R_TYPE (reloc->r_info);
+
+#if !defined RTLD_BOOTSTRAP || !defined HAVE_Z_COMBRELOC
+ if (__builtin_expect (r_type == R_TILE(RELATIVE), 0))
+ {
+# if !defined RTLD_BOOTSTRAP && !defined HAVE_Z_COMBRELOC
+ /* This is defined in rtld.c, but nowhere in the static libc.a;
+ make the reference weak so static programs can still link.
+ This declaration cannot be done when compiling rtld.c
+ (i.e. #ifdef RTLD_BOOTSTRAP) because rtld.c contains the
+ common defn for _dl_rtld_map, which is incompatible with a
+ weak decl in the same file. */
+# ifndef SHARED
+ weak_extern (GL(dl_rtld_map));
+# endif
+ if (map != &GL(dl_rtld_map)) /* Already done in rtld itself. */
+# endif
+ *reloc_addr = map->l_addr + reloc->r_addend;
+ return;
+ }
+#endif
+
+ if (__builtin_expect (r_type == R_TILE(NONE), 0))
+ return;
+
+#if !defined RTLD_BOOTSTRAP && !defined RESOLVE_CONFLICT_FIND_MAP
+ const ElfW(Sym) *const refsym = sym;
+#endif
+ struct link_map *sym_map = RESOLVE_MAP (&sym, version, r_type);
+ ElfW(Addr) value;
+
+ if (sym == NULL)
+ value = 0;
+ else if (ELFW_ST_TYPE (sym->st_info) == STT_SECTION)
+ value = map->l_addr; /* like a RELATIVE reloc */
+ else
+ value = sym_map->l_addr + sym->st_value;
+
+ if (sym != NULL
+ && __builtin_expect (ELFW(ST_TYPE) (sym->st_info) == STT_GNU_IFUNC, 0)
+ && __builtin_expect (sym->st_shndx != SHN_UNDEF, 1)
+ && __builtin_expect (!skip_ifunc, 1))
+ value = ((Elf64_Addr (*) (void)) value) ();
+
+ switch (r_type)
+ {
+ case R_TILE(JMP_SLOT):
+ elf_machine_fixup_plt (map, 0, reloc, reloc_addr,
+ value + reloc->r_addend);
+ return;
+
+#ifndef RESOLVE_CONFLICT_FIND_MAP
+ case R_TILE_TLS(DTPMOD):
+# ifdef RTLD_BOOTSTRAP
+ /* During startup the dynamic linker is always the module
+ with index 1.
+ XXX If this relocation is necessary move before RESOLVE
+ call. */
+ *reloc_addr = 1;
+# else
+ /* Get the information from the link map returned by the
+ resolv function. */
+ if (sym_map != NULL)
+ *reloc_addr = sym_map->l_tls_modid;
+# endif
+ return;
+ case R_TILE_TLS(DTPOFF):
+# ifndef RTLD_BOOTSTRAP
+ /* During relocation all TLS symbols are defined and used.
+ Therefore the offset is already correct. */
+ if (sym != NULL)
+ *reloc_addr = sym->st_value + reloc->r_addend;
+# endif
+ return;
+ case R_TILE_TLS(TPOFF):
+# ifdef RTLD_BOOTSTRAP
+ *reloc_addr = sym->st_value + reloc->r_addend + map->l_tls_offset;
+# else
+ if (sym != NULL)
+ {
+ CHECK_STATIC_TLS (map, sym_map);
+ *reloc_addr = (sym->st_value + reloc->r_addend
+ + sym_map->l_tls_offset);
+ }
+#endif
+ return;
+#endif /* use TLS */
+
+#if !defined RTLD_BOOTSTRAP && !defined RESOLVE_CONFLICT_FIND_MAP
+ /* Not needed in dl-conflict.c. */
+ case R_TILE(COPY):
+ if (sym == NULL)
+ /* This can happen in trace mode if an object could not be found. */
+ return;
+ if (__builtin_expect (sym->st_size > refsym->st_size, 0)
+ || (__builtin_expect (sym->st_size < refsym->st_size, 0)
+ && __builtin_expect (GLRO(dl_verbose), 0)))
+ {
+ const char *strtab;
+
+ strtab = (const char *) 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));
+ return;
+#endif
+ }
+
+ /* All remaining relocations must be in the lookup table. */
+ const struct reloc_howto *h = &howto[r_type];
+ if ((unsigned int) r_type >= sizeof howto / sizeof howto[0] ||
+ h->byte_size == 0)
+ {
+#if !defined RTLD_BOOTSTRAP || defined _NDEBUG
+ /* We add these checks in the version to relocate ld.so only
+ if we are still debugging. */
+ _dl_reloc_bad_type (map, r_type, 0);
+#endif
+ return;
+ }
+
+ value += reloc->r_addend;
+
+ /* The lookup table entry knows how to perform this reloc. */
+ if (h->is_pcrel)
+ value -= (ElfW(Addr)) reloc_addr;
+
+#ifndef __tilegx__
+ if (h->add_0x8000)
+ value += 0x8000;
+#endif
+
+ value >>= h->right_shift;
+
+ switch (h->byte_size)
+ {
+ case 1:
+ *(char *) reloc_addr = value;
+ return;
+ case 2:
+ *(short *) reloc_addr = value;
+ return;
+ case 4:
+ *(int *) reloc_addr = value;
+ return;
+#ifdef __tilegx__
+ case 8:
+ if (!h->is_bundle_update)
+ {
+ *(ElfW(Addr) *) reloc_addr = value;
+ return;
+ }
+#endif
+ }
+
+ /* We are updating a bundle, so use the function pointer that
+ swizzles the operand bits into the right location. */
+
+ tile_bundle_bits *p = (tile_bundle_bits *) reloc_addr;
+ tile_bundle_bits bits = *p;
+
+#define MUNGE(func) do { \
+ bits = ((bits & ~create_##func (-1)) | create_##func (value)); \
+ if (get_##func (bits) != value) \
+ _dl_signal_error (0, map->l_name, NULL, \
+ "relocation value too large for " #func); \
+ } while (0)
+
+#define MUNGE_NOCHECK(func) \
+ bits = ((bits & ~create_##func (-1)) | create_##func (value))
+
+ switch (r_type)
+ {
+#ifdef __tilegx__
+ case R_TILEGX_BROFF_X1:
+ MUNGE (BrOff_X1);
+ break;
+ case R_TILEGX_JUMPOFF_X1:
+ case R_TILEGX_JUMPOFF_X1_PLT:
+ MUNGE (JumpOff_X1);
+ break;
+ case R_TILEGX_IMM8_X0:
+ MUNGE (Imm8_X0);
+ break;
+ case R_TILEGX_IMM8_Y0:
+ MUNGE (Imm8_Y0);
+ break;
+ case R_TILEGX_IMM8_X1:
+ MUNGE (Imm8_X1);
+ break;
+ case R_TILEGX_IMM8_Y1:
+ MUNGE (Imm8_Y1);
+ break;
+ case R_TILEGX_MT_IMM14_X1:
+ MUNGE (MT_Imm14_X1);
+ break;
+ case R_TILEGX_MF_IMM14_X1:
+ MUNGE (MF_Imm14_X1);
+ break;
+ case R_TILEGX_IMM16_X0_HW0:
+ case R_TILEGX_IMM16_X0_HW1:
+ case R_TILEGX_IMM16_X0_HW2:
+ case R_TILEGX_IMM16_X0_HW3:
+ case R_TILEGX_IMM16_X0_HW0_PCREL:
+ case R_TILEGX_IMM16_X0_HW1_PCREL:
+ case R_TILEGX_IMM16_X0_HW2_PCREL:
+ case R_TILEGX_IMM16_X0_HW3_PCREL:
+ case R_TILEGX_IMM16_X0_HW0_TLS_GD:
+ case R_TILEGX_IMM16_X0_HW0_TLS_IE:
+ MUNGE_NOCHECK (Imm16_X0);
+ break;
+ case R_TILEGX_IMM16_X0_HW0_LAST:
+ case R_TILEGX_IMM16_X0_HW1_LAST:
+ case R_TILEGX_IMM16_X0_HW2_LAST:
+ case R_TILEGX_IMM16_X0_HW0_LAST_PCREL:
+ case R_TILEGX_IMM16_X0_HW1_LAST_PCREL:
+ case R_TILEGX_IMM16_X0_HW2_LAST_PCREL:
+ case R_TILEGX_IMM16_X0_HW0_LAST_TLS_GD:
+ case R_TILEGX_IMM16_X0_HW1_LAST_TLS_GD:
+ case R_TILEGX_IMM16_X0_HW0_LAST_TLS_IE:
+ case R_TILEGX_IMM16_X0_HW1_LAST_TLS_IE:
+ MUNGE (Imm16_X0);
+ break;
+ case R_TILEGX_IMM16_X1_HW0:
+ case R_TILEGX_IMM16_X1_HW1:
+ case R_TILEGX_IMM16_X1_HW2:
+ case R_TILEGX_IMM16_X1_HW3:
+ case R_TILEGX_IMM16_X1_HW0_PCREL:
+ case R_TILEGX_IMM16_X1_HW1_PCREL:
+ case R_TILEGX_IMM16_X1_HW2_PCREL:
+ case R_TILEGX_IMM16_X1_HW3_PCREL:
+ case R_TILEGX_IMM16_X1_HW0_TLS_GD:
+ case R_TILEGX_IMM16_X1_HW0_TLS_IE:
+ MUNGE_NOCHECK (Imm16_X1);
+ break;
+ case R_TILEGX_IMM16_X1_HW0_LAST:
+ case R_TILEGX_IMM16_X1_HW1_LAST:
+ case R_TILEGX_IMM16_X1_HW2_LAST:
+ case R_TILEGX_IMM16_X1_HW0_LAST_PCREL:
+ case R_TILEGX_IMM16_X1_HW1_LAST_PCREL:
+ case R_TILEGX_IMM16_X1_HW2_LAST_PCREL:
+ case R_TILEGX_IMM16_X1_HW0_LAST_TLS_GD:
+ case R_TILEGX_IMM16_X1_HW1_LAST_TLS_GD:
+ case R_TILEGX_IMM16_X1_HW0_LAST_TLS_IE:
+ case R_TILEGX_IMM16_X1_HW1_LAST_TLS_IE:
+ MUNGE (Imm16_X1);
+ break;
+ case R_TILEGX_MMSTART_X0:
+ MUNGE (BFStart_X0);
+ break;
+ case R_TILEGX_MMEND_X0:
+ MUNGE (BFEnd_X0);
+ break;
+ case R_TILEGX_SHAMT_X0:
+ MUNGE (ShAmt_X0);
+ break;
+ case R_TILEGX_SHAMT_X1:
+ MUNGE (ShAmt_X1);
+ break;
+ case R_TILEGX_SHAMT_Y0:
+ MUNGE (ShAmt_Y0);
+ break;
+ case R_TILEGX_SHAMT_Y1:
+ MUNGE (ShAmt_Y1);
+ break;
+#else
+ case R_TILEPRO_BROFF_X1:
+ MUNGE (BrOff_X1);
+ break;
+ case R_TILEPRO_JOFFLONG_X1:
+ case R_TILEPRO_JOFFLONG_X1_PLT:
+ MUNGE_NOCHECK (JOffLong_X1); /* holds full 32-bit value */
+ break;
+ case R_TILEPRO_IMM8_X0:
+ MUNGE (Imm8_X0);
+ break;
+ case R_TILEPRO_IMM8_Y0:
+ MUNGE (Imm8_Y0);
+ break;
+ case R_TILEPRO_IMM8_X1:
+ MUNGE (Imm8_X1);
+ break;
+ case R_TILEPRO_IMM8_Y1:
+ MUNGE (Imm8_Y1);
+ break;
+ case R_TILEPRO_MT_IMM15_X1:
+ MUNGE (MT_Imm15_X1);
+ break;
+ case R_TILEPRO_MF_IMM15_X1:
+ MUNGE (MF_Imm15_X1);
+ break;
+ case R_TILEPRO_IMM16_X0_LO:
+ case R_TILEPRO_IMM16_X0_HI:
+ case R_TILEPRO_IMM16_X0_HA:
+ case R_TILEPRO_IMM16_X0_LO_PCREL:
+ case R_TILEPRO_IMM16_X0_HI_PCREL:
+ case R_TILEPRO_IMM16_X0_HA_PCREL:
+ case R_TILEPRO_IMM16_X0_TLS_GD_LO:
+ case R_TILEPRO_IMM16_X0_TLS_GD_HI:
+ case R_TILEPRO_IMM16_X0_TLS_GD_HA:
+ case R_TILEPRO_IMM16_X0_TLS_IE_LO:
+ case R_TILEPRO_IMM16_X0_TLS_IE_HI:
+ case R_TILEPRO_IMM16_X0_TLS_IE_HA:
+ MUNGE_NOCHECK (Imm16_X0);
+ break;
+ case R_TILEPRO_IMM16_X0:
+ case R_TILEPRO_IMM16_X0_PCREL:
+ case R_TILEPRO_IMM16_X0_TLS_GD:
+ case R_TILEPRO_IMM16_X0_TLS_IE:
+ MUNGE (Imm16_X0);
+ break;
+ case R_TILEPRO_IMM16_X1_LO:
+ case R_TILEPRO_IMM16_X1_HI:
+ case R_TILEPRO_IMM16_X1_HA:
+ case R_TILEPRO_IMM16_X1_LO_PCREL:
+ case R_TILEPRO_IMM16_X1_HI_PCREL:
+ case R_TILEPRO_IMM16_X1_HA_PCREL:
+ case R_TILEPRO_IMM16_X1_TLS_GD_LO:
+ case R_TILEPRO_IMM16_X1_TLS_GD_HI:
+ case R_TILEPRO_IMM16_X1_TLS_GD_HA:
+ case R_TILEPRO_IMM16_X1_TLS_IE_LO:
+ case R_TILEPRO_IMM16_X1_TLS_IE_HI:
+ case R_TILEPRO_IMM16_X1_TLS_IE_HA:
+ MUNGE_NOCHECK (Imm16_X1);
+ break;
+ case R_TILEPRO_IMM16_X1:
+ case R_TILEPRO_IMM16_X1_PCREL:
+ case R_TILEPRO_IMM16_X1_TLS_GD:
+ case R_TILEPRO_IMM16_X1_TLS_IE:
+ MUNGE (Imm16_X1);
+ break;
+ case R_TILEPRO_MMSTART_X0:
+ MUNGE (MMStart_X0);
+ break;
+ case R_TILEPRO_MMEND_X0:
+ MUNGE (MMEnd_X0);
+ break;
+ case R_TILEPRO_MMSTART_X1:
+ MUNGE (MMStart_X1);
+ break;
+ case R_TILEPRO_MMEND_X1:
+ MUNGE (MMEnd_X1);
+ break;
+ case R_TILEPRO_SHAMT_X0:
+ MUNGE (ShAmt_X0);
+ break;
+ case R_TILEPRO_SHAMT_X1:
+ MUNGE (ShAmt_X1);
+ break;
+ case R_TILEPRO_SHAMT_Y0:
+ MUNGE (ShAmt_Y0);
+ break;
+ case R_TILEPRO_SHAMT_Y1:
+ MUNGE (ShAmt_Y1);
+ break;
+#endif
+ }
+#undef MUNGE
+ *p = bits;
+ _dl_flush_icache (p, sizeof (*p));
+}
+
+auto inline void __attribute__ ((always_inline))
+elf_machine_rela_relative (ElfW(Addr) l_addr, const ElfW(Rela) *reloc,
+ void *const reloc_addr_arg)
+{
+ ElfW(Addr) *const reloc_addr = reloc_addr_arg;
+ *reloc_addr = l_addr + reloc->r_addend;
+}
+
+auto inline void __attribute__ ((always_inline))
+elf_machine_lazy_rel (struct link_map *map,
+ ElfW(Addr) l_addr, const ElfW(Rela) *reloc,
+ int skip_ifunc)
+{
+ const unsigned int r_type = ELF32_R_TYPE (reloc->r_info);
+
+ /* Check for unexpected PLT reloc type. */
+ if (__builtin_expect (r_type == R_TILE(JMP_SLOT), 1))
+ {
+ *(ElfW(Addr) *) (l_addr + reloc->r_offset) += l_addr;
+ }
+ else
+ _dl_reloc_bad_type (map, r_type, 1);
+}
+
+#endif /* RESOLVE_MAP */
Added: fsf/trunk/ports/sysdeps/tile/dl-runtime.c
==============================================================================
--- fsf/trunk/ports/sysdeps/tile/dl-runtime.c (added)
+++ fsf/trunk/ports/sysdeps/tile/dl-runtime.c Mon Dec 5 00:03:25 2011
@@ -1,0 +1,80 @@
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Chris Metcalf <cmetcalf@xxxxxxxxxx>, 2011.
+
+ 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, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+/* Like x86_64, we pass the index of the relocation and not its offset.
+ In _dl_profile_fixup and _dl_call_pltexit we also use the index.
+ Therefore it is wasteful to compute the offset in the trampoline
+ just to reverse the operation immediately afterwards. */
+#define reloc_offset reloc_arg * sizeof (PLTREL)
+#define reloc_index reloc_arg
+
+#include <elf/dl-runtime.c>
+
+#include <sys/mman.h>
+#include <arch/sim.h>
+
+/* Support notifying the simulator about new objects. */
+void internal_function
+_dl_arch_map_object (struct link_map *l)
+{
+ int shift;
+
+#define DLPUTC(c) __insn_mtspr(SPR_SIM_CONTROL, \
+ (SIM_CONTROL_DLOPEN \
+ | ((c) << _SIM_CONTROL_OPERATOR_BITS)))
+
+ /* Write the library address in hex. */
+ DLPUTC ('0');
+ DLPUTC ('x');
+ for (shift = (int) sizeof (unsigned long) * 8 - 4; shift >= 0; shift -= 4)
+ DLPUTC ("0123456789abcdef"[(l->l_map_start >> shift) & 0xF]);
+ DLPUTC (':');
+
+ /* Write the library path, including the terminating '\0'. */
+ for (size_t i = 0;; i++)
+ {
+ DLPUTC (l->l_name[i]);
+ if (l->l_name[i] == '\0')
+ break;
+ }
+#undef DLPUTC
+}
+
+/* Support notifying the simulator about removed objects prior to munmap(). */
+void internal_function
+_dl_unmap (struct link_map *l)
+{
+ int shift;
+
+#define DLPUTC(c) __insn_mtspr(SPR_SIM_CONTROL, \
+ (SIM_CONTROL_DLCLOSE \
+ | ((c) << _SIM_CONTROL_OPERATOR_BITS)))
+
+ /* Write the library address in hex. */
+ DLPUTC ('0');
+ DLPUTC ('x');
+ for (shift = (int) sizeof (unsigned long) * 8 - 4; shift >= 0; shift -= 4)
+ DLPUTC ("0123456789abcdef"[(l->l_map_start >> shift) & 0xF]);
+ DLPUTC ('\0');
+#undef DLPUTC
+
+ __munmap ((void *) l->l_map_start, l->l_map_end - l->l_map_start);
+}
+
+#define DL_UNMAP(map) _dl_unmap (map)
Added: fsf/trunk/ports/sysdeps/tile/dl-start.S
==============================================================================
--- fsf/trunk/ports/sysdeps/tile/dl-start.S (added)
+++ fsf/trunk/ports/sysdeps/tile/dl-start.S Mon Dec 5 00:03:25 2011
@@ -1,0 +1,114 @@
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Chris Metcalf <cmetcalf@xxxxxxxxxx>, 2011.
+
+ 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, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sysdep.h>
+
+ /* Get address of "sym" in "reg" assuming r51 holds ".Llink". */
+ .macro pic_addr reg, sym
+#ifdef __tilegx__
+ moveli \reg, hw1_last(\sym - .Llink)
+ shl16insli \reg, \reg, hw0(\sym - .Llink)
+ ADD_PTR \reg, r51, \reg
+#else
+ ADDLI_PTR \reg, r51, lo16(\sym - .Llink)
+ auli \reg, \reg, ha16(\sym - .Llink)
+#endif
+ .endm
+
+ .text
+ENTRY (_start)
+ /* Linux starts us with sp pointing at the conventional Elf layout,
+ but we need to allow two 'caller' words for our ABI convention. */
+ {
+ move r52, sp
+ andi sp, sp, -8
+ }
+ cfi_def_cfa_register (r52)
+ {
+ /* Point sp at base of ABI area; point r4 to the caller-sp word. */
+ ADDI_PTR sp, sp, -(2 * REGSIZE)
+ ADDI_PTR r4, sp, -REGSIZE
[... 12136 lines stripped ...]
_______________________________________________
Commits mailing list
Commits@xxxxxxxxxx
http://eglibc.org/cgi-bin/mailman/listinfo/commits