Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc Put the startup code in .text.startup



details:   https://anonhg.NetBSD.org/src/rev/5e6111388c20
branches:  trunk
changeset: 789471:5e6111388c20
user:      matt <matt%NetBSD.org@localhost>
date:      Mon Aug 19 22:14:37 2013 +0000

description:
Put the startup code in .text.startup

diffstat:

 lib/libc/arch/arm/misc/arm_initfini.c   |  4 ++--
 lib/libc/misc/initfini.c                |  6 +++---
 lib/libc/misc/stack_protector.c         |  6 +++---
 lib/libc/stdlib/_env.c                  |  6 +++---
 lib/libc/stdlib/atexit.c                |  6 +++---
 lib/libc/thread-stub/thread-stub-init.c |  6 +++---
 lib/libc/tls/tls.c                      |  6 +++---
 7 files changed, 20 insertions(+), 20 deletions(-)

diffs (183 lines):

diff -r 3af917abdcb6 -r 5e6111388c20 lib/libc/arch/arm/misc/arm_initfini.c
--- a/lib/libc/arch/arm/misc/arm_initfini.c     Mon Aug 19 22:13:34 2013 +0000
+++ b/lib/libc/arch/arm/misc/arm_initfini.c     Mon Aug 19 22:14:37 2013 +0000
@@ -29,7 +29,7 @@
 
 #include <sys/cdefs.h>
 
-__RCSID("$NetBSD: arm_initfini.c,v 1.4 2013/08/16 17:09:27 matt Exp $");
+__RCSID("$NetBSD: arm_initfini.c,v 1.5 2013/08/19 22:14:37 matt Exp $");
 
 #include "namespace.h"
 
@@ -51,7 +51,7 @@
 
 void   _libc_aapcs_init(void) __attribute__((__constructor__, __used__));
 
-void
+void __section(".text.startup")
 _libc_aapcs_init(void)
 {
        if (!_libc_aapcs_initialized) {
diff -r 3af917abdcb6 -r 5e6111388c20 lib/libc/misc/initfini.c
--- a/lib/libc/misc/initfini.c  Mon Aug 19 22:13:34 2013 +0000
+++ b/lib/libc/misc/initfini.c  Mon Aug 19 22:14:37 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: initfini.c,v 1.10 2012/02/16 23:00:39 joerg Exp $       */
+/*     $NetBSD: initfini.c,v 1.11 2013/08/19 22:14:37 matt Exp $        */
 
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: initfini.c,v 1.10 2012/02/16 23:00:39 joerg Exp $");
+__RCSID("$NetBSD: initfini.c,v 1.11 2013/08/19 22:14:37 matt Exp $");
 
 #ifdef _LIBC
 #include "namespace.h"
@@ -80,7 +80,7 @@
  * _libc_init is called twice.  The first time explicitly by crt0.o
  * (for newer versions) and the second time as indirectly via _init().
  */
-void
+void __section(".text.startup")
 _libc_init(void)
 {
 
diff -r 3af917abdcb6 -r 5e6111388c20 lib/libc/misc/stack_protector.c
--- a/lib/libc/misc/stack_protector.c   Mon Aug 19 22:13:34 2013 +0000
+++ b/lib/libc/misc/stack_protector.c   Mon Aug 19 22:14:37 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: stack_protector.c,v 1.8 2012/03/13 21:13:39 christos Exp $     */
+/*     $NetBSD: stack_protector.c,v 1.9 2013/08/19 22:14:37 matt Exp $ */
 /*     $OpenBSD: stack_protector.c,v 1.10 2006/03/31 05:34:44 deraadt Exp $    */
 
 /*
@@ -28,7 +28,7 @@
  *
  */
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: stack_protector.c,v 1.8 2012/03/13 21:13:39 christos Exp $");
+__RCSID("$NetBSD: stack_protector.c,v 1.9 2013/08/19 22:14:37 matt Exp $");
 
 #ifdef _LIBC
 #include "namespace.h"
@@ -53,7 +53,7 @@
 __dead void __stack_chk_fail_local(void);
 void __guard_setup(void);
 
-void
+void __section(".text.startup")
 __guard_setup(void)
 {
        static const int mib[2] = { CTL_KERN, KERN_ARND };
diff -r 3af917abdcb6 -r 5e6111388c20 lib/libc/stdlib/_env.c
--- a/lib/libc/stdlib/_env.c    Mon Aug 19 22:13:34 2013 +0000
+++ b/lib/libc/stdlib/_env.c    Mon Aug 19 22:14:37 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: _env.c,v 1.6 2011/10/06 20:31:41 christos Exp $ */
+/*     $NetBSD: _env.c,v 1.7 2013/08/19 22:14:37 matt Exp $ */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: _env.c,v 1.6 2011/10/06 20:31:41 christos Exp $");
+__RCSID("$NetBSD: _env.c,v 1.7 2013/08/19 22:14:37 matt Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include "namespace.h"
@@ -400,7 +400,7 @@
 #endif
 
 /* Initialize environment memory RB tree. */
-void
+void __section(".text.startup")
 __libc_env_init(void)
 {
        rb_tree_init(&env_tree, &env_tree_ops);
diff -r 3af917abdcb6 -r 5e6111388c20 lib/libc/stdlib/atexit.c
--- a/lib/libc/stdlib/atexit.c  Mon Aug 19 22:13:34 2013 +0000
+++ b/lib/libc/stdlib/atexit.c  Mon Aug 19 22:14:37 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: atexit.c,v 1.25 2013/04/26 18:29:55 christos Exp $     */
+/*     $NetBSD: atexit.c,v 1.26 2013/08/19 22:14:37 matt Exp $ */
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: atexit.c,v 1.25 2013/04/26 18:29:55 christos Exp $");
+__RCSID("$NetBSD: atexit.c,v 1.26 2013/08/19 22:14:37 matt Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include "reentrant.h"
@@ -117,7 +117,7 @@
  * Initialize __atexit_mutex with the PTHREAD_MUTEX_RECURSIVE attribute.
  * Note that __cxa_finalize may generate calls to __cxa_atexit.
  */
-void
+void __section(".text.startup")
 __libc_atexit_init(void)
 {
        mutexattr_t atexit_mutex_attr;
diff -r 3af917abdcb6 -r 5e6111388c20 lib/libc/thread-stub/thread-stub-init.c
--- a/lib/libc/thread-stub/thread-stub-init.c   Mon Aug 19 22:13:34 2013 +0000
+++ b/lib/libc/thread-stub/thread-stub-init.c   Mon Aug 19 22:14:37 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: thread-stub-init.c,v 1.1 2013/04/05 20:15:42 christos Exp $    */
+/*     $NetBSD: thread-stub-init.c,v 1.2 2013/08/19 22:14:37 matt Exp $        */
 
 /*-
  * Copyright (c) 2003, 2009 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: thread-stub-init.c,v 1.1 2013/04/05 20:15:42 christos Exp $");
+__RCSID("$NetBSD: thread-stub-init.c,v 1.2 2013/08/19 22:14:37 matt Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #ifdef _REENTRANT
@@ -43,7 +43,7 @@
 
 __weak_alias(__libc_thr_init,__libc_thr_init_stub)
 
-void
+void __section(".text.startup")
 __libc_thr_init_stub(void)
 {
 
diff -r 3af917abdcb6 -r 5e6111388c20 lib/libc/tls/tls.c
--- a/lib/libc/tls/tls.c        Mon Aug 19 22:13:34 2013 +0000
+++ b/lib/libc/tls/tls.c        Mon Aug 19 22:14:37 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tls.c,v 1.6 2011/04/07 02:19:28 matt Exp $     */
+/*     $NetBSD: tls.c,v 1.7 2013/08/19 22:14:37 matt Exp $     */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: tls.c,v 1.6 2011/04/07 02:19:28 matt Exp $");
+__RCSID("$NetBSD: tls.c,v 1.7 2013/08/19 22:14:37 matt Exp $");
 
 #include "namespace.h"
 
@@ -133,7 +133,7 @@
 
 __weakref_visible int rtld_DYNAMIC __weak_reference(_DYNAMIC);
 
-static int
+static int __section(".text.startup")
 __libc_static_tls_setup_cb(struct dl_phdr_info *data, size_t len, void *cookie)
 {
        const Elf_Phdr *phdr = data->dlpi_phdr;



Home | Main Index | Thread Index | Old Index