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


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

GNU C Library master sources branch roland/nacl-port/master updated. f0fe0c080ad97eda9167b0f8eb770c476d32b13b


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, roland/nacl-port/master has been updated
       via  f0fe0c080ad97eda9167b0f8eb770c476d32b13b (commit)
       via  00122b31f7d91cdd6b8b7c47c501f95748257afd (commit)
       via  c009f44732ba0e0897e13317c56b161e94374b87 (commit)
       via  47fa0b4d48b0ace3915df588ccaed1dbe2e56821 (commit)
       via  0bf825788a759578139343e4a5728a948950147b (commit)
       via  b345228dee5207a7b81ba43e3aceae42fce3021c (commit)
       via  7d9d54de987d2f5e4a1f646df9eee659c5abc752 (commit)
      from  f8b5f933ff38077aef8e441265c0873bddab1e0f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f0fe0c080ad97eda9167b0f8eb770c476d32b13b

commit f0fe0c080ad97eda9167b0f8eb770c476d32b13b
Author: Roland McGrath <roland@hack.frob.com>
Date:   Tue Aug 6 12:49:04 2013 -0700

    New ABI baseline of 2.19.

diff --git a/sysdeps/nacl/shlib-versions b/sysdeps/nacl/shlib-versions
index 92b4234..2ab1f3c 100644
--- a/sysdeps/nacl/shlib-versions
+++ b/sysdeps/nacl/shlib-versions
@@ -1,6 +1,6 @@
 # Configuration		DEFAULT			Earliest symbol set
 # -------------		---------------		------------------------------
-.*-.*-nacl.*		DEFAULT			GLIBC_2.17
+.*-.*-nacl.*		DEFAULT			GLIBC_2.19
 
 # Configuration		ABI			Identifier for ABI data files
 # -------------		----------		-----------------------------

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=00122b31f7d91cdd6b8b7c47c501f95748257afd

commit 00122b31f7d91cdd6b8b7c47c501f95748257afd
Author: Roland McGrath <roland@hack.frob.com>
Date:   Tue Aug 6 12:44:37 2013 -0700

    Use stub getifaddrs/freeifaddrs.

diff --git a/sysdeps/nacl/ifaddrs.c b/sysdeps/nacl/ifaddrs.c
new file mode 100644
index 0000000..0e64851
--- /dev/null
+++ b/sysdeps/nacl/ifaddrs.c
@@ -0,0 +1,2 @@
+/* Bypass the sysdeps/gnu version to get the plain stub.  */
+#include <inet/ifaddrs.c>

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c009f44732ba0e0897e13317c56b161e94374b87

commit c009f44732ba0e0897e13317c56b161e94374b87
Author: Roland McGrath <roland@hack.frob.com>
Date:   Tue Aug 6 12:42:56 2013 -0700

    Implement brk.

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

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=47fa0b4d48b0ace3915df588ccaed1dbe2e56821

commit 47fa0b4d48b0ace3915df588ccaed1dbe2e56821
Author: Roland McGrath <roland@hack.frob.com>
Date:   Mon Aug 5 09:45:15 2013 -0700

    Unfinished/untested PLT trampoline code.

diff --git a/sysdeps/arm/nacl/dl-trampoline.S b/sysdeps/arm/nacl/dl-trampoline.S
index 052b61a..24d4c08 100644
--- a/sysdeps/arm/nacl/dl-trampoline.S
+++ b/sysdeps/arm/nacl/dl-trampoline.S
@@ -1,11 +1,91 @@
-/* XXX temporary stubs */
+/* PLT trampolines.  ARM/NaCl version.
+   Copyright (C) 2013 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
 
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library.  If not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <sysdep.h>
+
+	.syntax unified
 	.text
+
+@ Change &GOT[n+3] into 8*n.  Note relocs are 8 bytes each.
+.macro compute_reloc_arg pltgot, got2
+	sub r1, \pltgot, \got2	@ r1 = &GOT[n+3] - &GOT[2] = 4*(n-1)
+	sub r1, r1, #4		@ r1 = 4*n
+	add r1, r1, r1		@ r1 *= 2 = 8*n
+.endm
+
+	CFI_SECTIONS
 	.globl _dl_runtime_resolve
-	.type _dl_runtime_resolve, #function
+	.type _dl_runtime_resolve, %function
 	.p2align 4
 _dl_runtime_resolve:
-	sfi_trap
+	cfi_startproc
+	cfi_adjust_cfa_offset (8)
+
+	@ We get called with:
+	@ 	lr contains the return address from this call
+	@	stack[1] contains &GOT[n+3] (pointer to function)
+	@	stack[0] points to &GOT[2]
+
+	ldr ip, [sp]		@ ip gets &GOT[2]
+
+	@ Save the argument registers and the return address.
+	@ r4 doesn't need to be saved, but it makes the total
+	@ adjustment to sp (including the two words pushed by
+	@ the PLT code) an even eight words, so sp stays aligned.
+	push {r0-r4, lr}
+	cfi_adjust_cfa_offset (24)
+	cfi_rel_offset (r0, 0)
+	cfi_rel_offset (r1, 4)
+	cfi_rel_offset (r2, 8)
+	cfi_rel_offset (r3, 12)
+	cfi_rel_offset (r4, 16)
+	cfi_rel_offset (lr, 20)
+
+	ldr r1, [sp, #28]	@ r1 gets &GOT[n+3]
+
+	@ Get the 'struct link_map *' for first argument to _dl_fixup.
+	sfi_breg ip, ldr r0, [\B, #-4]
+
+	@ Get the reloc offset for the second argument to _dl_fixup.
+	compute_reloc_arg r1, ip
+
+	@ This does the real work, and returns the real call target.
+	sfi_bl _dl_fixup
+	mov ip, r0
+
+	@ Restore the saved registers.
+	pop {r0-r4, lr}
+	cfi_adjust_cfa_offset (-24)
+	cfi_restore (r0)
+	cfi_restore (r1)
+	cfi_restore (r2)
+	cfi_restore (r3)
+	cfi_restore (r4)
+	cfi_restore (lr)
+
+	@ Now compensate for the two words pushed by the PLT code.
+	sfi_sp add sp, #8
+	cfi_adjust_cfa_offset (-8)
+
+	@ Finally, jump to the newfound call target.
+	sfi_bx ip
+
+	cfi_endproc
 	.size _dl_runtime_resolve, .-_dl_runtime_resolve
 
 #ifndef PROF
@@ -13,7 +93,11 @@ _dl_runtime_resolve:
 	.type _dl_runtime_profile, #function
 	.p2align 4
 _dl_runtime_profile:
+	cfi_startproc
+	cfi_adjust_cfa_offset (8)
+	@ XXX tbd
 	sfi_trap
+	cfi_endproc
 	.size _dl_runtime_profile, .-_dl_runtime_profile
 #endif
 	.previous

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0bf825788a759578139343e4a5728a948950147b

commit 0bf825788a759578139343e4a5728a948950147b
Author: Roland McGrath <roland@hack.frob.com>
Date:   Mon Aug 5 09:45:02 2013 -0700

    Temp NEON hack for building

diff --git a/sysdeps/arm/nacl/Makefile b/sysdeps/arm/nacl/Makefile
index 3fa689f..afe2733 100644
--- a/sysdeps/arm/nacl/Makefile
+++ b/sysdeps/arm/nacl/Makefile
@@ -1,3 +1,6 @@
+# XXX temporary until the compiler build can be fixed
+sysdep-CPPFLAGS += -D__ARM_NEON__=1
+
 ifeq ($(subdir),csu)
 sysdep_routines += aeabi_read_tp
 endif

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b345228dee5207a7b81ba43e3aceae42fce3021c

commit b345228dee5207a7b81ba43e3aceae42fce3021c
Author: Roland McGrath <roland@hack.frob.com>
Date:   Mon Aug 5 09:44:37 2013 -0700

    Missing deps

diff --git a/sysdeps/nacl/Makefile b/sysdeps/nacl/Makefile
index 55e763d..0dcf824 100644
--- a/sysdeps/nacl/Makefile
+++ b/sysdeps/nacl/Makefile
@@ -50,11 +50,11 @@ endef
 nacl-interface-pattern = $(objpfx)nacl-interface-%.c
 
 $(nacl-mandatory-interfaces:%=$(nacl-interface-pattern)): \
-  $(nacl-interface-pattern): $(nacl)/Makefile
+  $(nacl-interface-pattern): $(nacl)/Makefile $(objpfx)nacl-interfaces.v
 	$(make-target-directory)
 	$(call nacl-interface-table-command,mandatory)
 $(nacl-optional-interfaces:%=$(nacl-interface-pattern)): \
-  $(nacl-interface-pattern): $(nacl)/Makefile
+  $(nacl-interface-pattern): $(nacl)/Makefile $(objpfx)nacl-interfaces.v
 	$(make-target-directory)
 	$(call nacl-interface-table-command,optional)
 
@@ -74,6 +74,7 @@ $(common-objpfx)bits/mman-linux.h: \
 
 # XXX temp test
 others += hello
+others-static += hello
 
 endif
 

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7d9d54de987d2f5e4a1f646df9eee659c5abc752

commit 7d9d54de987d2f5e4a1f646df9eee659c5abc752
Author: Roland McGrath <roland@hack.frob.com>
Date:   Mon Aug 5 09:44:23 2013 -0700

    Updates for NaCl header changes.

diff --git a/sysdeps/nacl/brk.c b/sysdeps/nacl/brk.c
deleted file mode 100644
index 93dda43..0000000
--- a/sysdeps/nacl/brk.c
+++ /dev/null
@@ -1,41 +0,0 @@
-/* brk -- Adjust the "break" at the end of initial data.  NaCl version.
-   Copyright (C) 2013 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <errno.h>
-#include <unistd.h>
-#include "nacl-interfaces.h"
-
-/* sbrk.c expects this.  */
-void *__curbrk;
-
-/* Set the end of the process's data space to ADDR.
-   Return 0 if successful, -1 if not.  */
-int
-__brk (void *addr)
-{
-  int error = __nacl_irt_memory.sysbrk (&addr);
-  if (__glibc_unlikely (error))
-    {
-      __set_errno (error);
-      return -1;
-    }
-
-  __curbrk = addr;
-  return 0;
-}
-weak_alias (__brk, brk)
diff --git a/sysdeps/nacl/nacl-interface-list.h b/sysdeps/nacl/nacl-interface-list.h
index 6b96dfa..649e29b 100644
--- a/sysdeps/nacl/nacl-interface-list.h
+++ b/sysdeps/nacl/nacl-interface-list.h
@@ -1,7 +1,7 @@
 NACL_MANDATORY_INTERFACE (NACL_IRT_BASIC_v0_1, nacl_irt_basic)
 NACL_MANDATORY_INTERFACE (NACL_IRT_FDIO_v0_1, nacl_irt_fdio)
 NACL_MANDATORY_INTERFACE (NACL_IRT_FILENAME_v0_1, nacl_irt_filename)
-NACL_MANDATORY_INTERFACE (NACL_IRT_MEMORY_v0_2, nacl_irt_memory)
+NACL_MANDATORY_INTERFACE (NACL_IRT_MEMORY_v0_3, nacl_irt_memory)
 NACL_MANDATORY_INTERFACE (NACL_IRT_DYNCODE_v0_1, nacl_irt_dyncode)
 NACL_MANDATORY_INTERFACE (NACL_IRT_THREAD_v0_1, nacl_irt_thread)
 NACL_MANDATORY_INTERFACE (NACL_IRT_MUTEX_v0_1, nacl_irt_mutex)
diff --git a/sysdeps/nacl/xstatconv.h b/sysdeps/nacl/xstatconv.h
index 06ab66a..ab7e4ef 100644
--- a/sysdeps/nacl/xstatconv.h
+++ b/sysdeps/nacl/xstatconv.h
@@ -27,9 +27,12 @@ struct stat;
 #define stat    __avoid_nacl_stat
 #undef  fstat
 #define fstat   __avoid_nacl_fstat
+#undef  lstat
+#define lstat   __avoid_nacl_lstat
 #include <native_client/src/trusted/service_runtime/include/sys/stat.h>
 #undef  stat
 #undef  fstat
+#undef  lstat
 
 extern int __xstat_conv (int vers, const struct nacl_abi_stat *, void *)
   internal_function attribute_hidden;

-----------------------------------------------------------------------

Summary of changes:
 sysdeps/arm/nacl/Makefile          |    3 +
 sysdeps/arm/nacl/dl-trampoline.S   |   90 ++++++++++++++++++++++++++++++++++-
 sysdeps/nacl/Makefile              |    5 +-
 sysdeps/nacl/brk.c                 |   62 +++++++++++++++++++++++--
 sysdeps/nacl/ifaddrs.c             |    2 +
 sysdeps/nacl/nacl-interface-list.h |    2 +-
 sysdeps/nacl/shlib-versions        |    2 +-
 sysdeps/nacl/xstatconv.h           |    3 +
 8 files changed, 157 insertions(+), 12 deletions(-)
 create mode 100644 sysdeps/nacl/ifaddrs.c


hooks/post-receive
-- 
GNU C Library master sources


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