Put the startup code in .text.startup
This commit is contained in:
parent
f163a9dc44
commit
8caf10303e
@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
#include <sys/cdefs.h>
|
#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"
|
#include "namespace.h"
|
||||||
|
|
||||||
@ -51,7 +51,7 @@ static bool _libc_aapcs_initialized;
|
|||||||
|
|
||||||
void _libc_aapcs_init(void) __attribute__((__constructor__, __used__));
|
void _libc_aapcs_init(void) __attribute__((__constructor__, __used__));
|
||||||
|
|
||||||
void
|
void __section(".text.startup")
|
||||||
_libc_aapcs_init(void)
|
_libc_aapcs_init(void)
|
||||||
{
|
{
|
||||||
if (!_libc_aapcs_initialized) {
|
if (!_libc_aapcs_initialized) {
|
||||||
|
@ -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.
|
* Copyright (c) 2007 The NetBSD Foundation, Inc.
|
||||||
@ -30,7 +30,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#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
|
#ifdef _LIBC
|
||||||
#include "namespace.h"
|
#include "namespace.h"
|
||||||
@ -80,7 +80,7 @@ struct ps_strings *__ps_strings;
|
|||||||
* _libc_init is called twice. The first time explicitly by crt0.o
|
* _libc_init is called twice. The first time explicitly by crt0.o
|
||||||
* (for newer versions) and the second time as indirectly via _init().
|
* (for newer versions) and the second time as indirectly via _init().
|
||||||
*/
|
*/
|
||||||
void
|
void __section(".text.startup")
|
||||||
_libc_init(void)
|
_libc_init(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -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 $ */
|
/* $OpenBSD: stack_protector.c,v 1.10 2006/03/31 05:34:44 deraadt Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -28,7 +28,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#include <sys/cdefs.h>
|
#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
|
#ifdef _LIBC
|
||||||
#include "namespace.h"
|
#include "namespace.h"
|
||||||
@ -53,7 +53,7 @@ static void __fail(const char *) __attribute__((__noreturn__));
|
|||||||
__dead void __stack_chk_fail_local(void);
|
__dead void __stack_chk_fail_local(void);
|
||||||
void __guard_setup(void);
|
void __guard_setup(void);
|
||||||
|
|
||||||
void
|
void __section(".text.startup")
|
||||||
__guard_setup(void)
|
__guard_setup(void)
|
||||||
{
|
{
|
||||||
static const int mib[2] = { CTL_KERN, KERN_ARND };
|
static const int mib[2] = { CTL_KERN, KERN_ARND };
|
||||||
|
@ -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.
|
* Copyright (c) 2010 The NetBSD Foundation, Inc.
|
||||||
@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
#if defined(LIBC_SCCS) && !defined(lint)
|
#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 */
|
#endif /* LIBC_SCCS and not lint */
|
||||||
|
|
||||||
#include "namespace.h"
|
#include "namespace.h"
|
||||||
@ -400,7 +400,7 @@ __unlockenv(void)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Initialize environment memory RB tree. */
|
/* Initialize environment memory RB tree. */
|
||||||
void
|
void __section(".text.startup")
|
||||||
__libc_env_init(void)
|
__libc_env_init(void)
|
||||||
{
|
{
|
||||||
rb_tree_init(&env_tree, &env_tree_ops);
|
rb_tree_init(&env_tree, &env_tree_ops);
|
||||||
|
@ -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.
|
* Copyright (c) 2003 The NetBSD Foundation, Inc.
|
||||||
@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
#if defined(LIBC_SCCS) && !defined(lint)
|
#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 */
|
#endif /* LIBC_SCCS and not lint */
|
||||||
|
|
||||||
#include "reentrant.h"
|
#include "reentrant.h"
|
||||||
@ -117,7 +117,7 @@ atexit_handler_alloc(void *dso)
|
|||||||
* Initialize __atexit_mutex with the PTHREAD_MUTEX_RECURSIVE attribute.
|
* Initialize __atexit_mutex with the PTHREAD_MUTEX_RECURSIVE attribute.
|
||||||
* Note that __cxa_finalize may generate calls to __cxa_atexit.
|
* Note that __cxa_finalize may generate calls to __cxa_atexit.
|
||||||
*/
|
*/
|
||||||
void
|
void __section(".text.startup")
|
||||||
__libc_atexit_init(void)
|
__libc_atexit_init(void)
|
||||||
{
|
{
|
||||||
mutexattr_t atexit_mutex_attr;
|
mutexattr_t atexit_mutex_attr;
|
||||||
|
@ -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.
|
* Copyright (c) 2003, 2009 The NetBSD Foundation, Inc.
|
||||||
@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
#if defined(LIBC_SCCS) && !defined(lint)
|
#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 */
|
#endif /* LIBC_SCCS and not lint */
|
||||||
|
|
||||||
#ifdef _REENTRANT
|
#ifdef _REENTRANT
|
||||||
@ -43,7 +43,7 @@ __RCSID("$NetBSD: thread-stub-init.c,v 1.1 2013/04/05 20:15:42 christos Exp $");
|
|||||||
|
|
||||||
__weak_alias(__libc_thr_init,__libc_thr_init_stub)
|
__weak_alias(__libc_thr_init,__libc_thr_init_stub)
|
||||||
|
|
||||||
void
|
void __section(".text.startup")
|
||||||
__libc_thr_init_stub(void)
|
__libc_thr_init_stub(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -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.
|
* Copyright (c) 2011 The NetBSD Foundation, Inc.
|
||||||
@ -30,7 +30,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#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"
|
#include "namespace.h"
|
||||||
|
|
||||||
@ -133,7 +133,7 @@ _rtld_tls_free(struct tls_tcb *tcb)
|
|||||||
|
|
||||||
__weakref_visible int rtld_DYNAMIC __weak_reference(_DYNAMIC);
|
__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)
|
__libc_static_tls_setup_cb(struct dl_phdr_info *data, size_t len, void *cookie)
|
||||||
{
|
{
|
||||||
const Elf_Phdr *phdr = data->dlpi_phdr;
|
const Elf_Phdr *phdr = data->dlpi_phdr;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user