aboutsummaryrefslogtreecommitdiff
path: root/elf
diff options
context:
space:
mode:
authorH.J. Lu <hongjiu.lu@intel.com>2010-12-24 20:14:37 -0500
committerH.J. Lu <hjl.tools@gmail.com>2013-01-28 09:09:57 -0800
commitd98bc91f30f657da1489e92983d72ef3a44a292f (patch)
tree323ef8439558fe3dcea3a041045008d25ce1f543 /elf
parent3a33e487eeb65e2f1f633581c56bee2c60d0ca43 (diff)
downloadglibc-hjl/ctor/release/2.12.zip
glibc-hjl/ctor/release/2.12.tar.gz
glibc-hjl/ctor/release/2.12.tar.bz2
Remove `.ctors' and `.dtors' output sectionshjl/ctor/release/2.12
Conflicts: ChangeLog configure
Diffstat (limited to 'elf')
-rw-r--r--elf/sofini.c2
-rw-r--r--elf/soinit.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/elf/sofini.c b/elf/sofini.c
index 5e06f0c..13e74b7 100644
--- a/elf/sofini.c
+++ b/elf/sofini.c
@@ -1,12 +1,14 @@
/* Finalizer module for ELF shared C library. This provides terminating
null pointer words in the `.ctors' and `.dtors' sections. */
+#ifndef NO_CTORS_DTORS_SECTIONS
static void (*const __CTOR_END__[1]) (void)
__attribute__ ((used, section (".ctors")))
= { 0 };
static void (*const __DTOR_END__[1]) (void)
__attribute__ ((used, section (".dtors")))
= { 0 };
+#endif
/* Terminate the frame unwind info section with a 4byte 0 as a sentinel;
this would be the 'length' field in a real FDE. */
diff --git a/elf/soinit.c b/elf/soinit.c
index 6fecbb5..1db676a 100644
--- a/elf/soinit.c
+++ b/elf/soinit.c
@@ -3,6 +3,7 @@
the `.ctors' and `.dtors' sections so the lists are terminated, and
calling those lists of functions. */
+#ifndef NO_CTORS_DTORS_SECTIONS
#include <libc-internal.h>
#include <stdlib.h>
@@ -40,3 +41,4 @@ __libc_fini (void)
void (*_fini_ptr) (void) __attribute__ ((section (".fini_array")))
= &__libc_fini;
+#endif