diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2016-12-22 09:32:05 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2016-12-22 09:32:05 +0000 |
commit | 4bf7b00001243fba75856378e13a1f5bf159ab58 (patch) | |
tree | 6daed8b05f28cea4215d0302b2bda7cb67dfc501 /lib | |
parent | 72d1076694a28bce648894484a1a9c0502ce1239 (diff) |
Don't make __CTOR_LIST__ and __DTOR_LIST__ const. This makes the .ctors and
.dtors sections writable just like they are in crtend.o and code generated
by compilers. This is necessary to make sure that linkers that respect the
ELF spec a bit better (such as lld) correctly concatenate the secttions.
ok deraadt@
Diffstat (limited to 'lib')
-rw-r--r-- | lib/csu/crtbegin.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/csu/crtbegin.c b/lib/csu/crtbegin.c index 37a315d276d..534f4dfb4a1 100644 --- a/lib/csu/crtbegin.c +++ b/lib/csu/crtbegin.c @@ -1,4 +1,4 @@ -/* $OpenBSD: crtbegin.c,v 1.20 2015/11/10 04:14:03 guenther Exp $ */ +/* $OpenBSD: crtbegin.c,v 1.21 2016/12/22 09:32:04 kettenis Exp $ */ /* $NetBSD: crtbegin.c,v 1.1 1996/09/12 16:59:03 cgd Exp $ */ /* @@ -84,9 +84,9 @@ __asm(".hidden __dso_handle"); long __guard_local __dso_hidden __attribute__((section(".openbsd.randomdata"))); -static const init_f __CTOR_LIST__[1] +static init_f __CTOR_LIST__[1] __attribute__((section(".ctors"))) = { (void *)-1 }; /* XXX */ -static const init_f __DTOR_LIST__[1] +static init_f __DTOR_LIST__[1] __attribute__((section(".dtors"))) = { (void *)-1 }; /* XXX */ static void __dtors(void) __used; |