From 93de366630a82496c6afeda1b1a68b83264987f6 Mon Sep 17 00:00:00 2001 From: Matt Fleming Date: Tue, 3 Apr 2012 16:07:09 +0100 Subject: [PATCH] elflink: Delete obsolete constructor code MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Since commit 8e0ed96bff75 ("elf: Support __constructor and __destructor") the code for looping over ctors in ldlinux has been unnecessary. Delete since this is all now handled in the core module loading code. This also gets rid of the following build warning, elflink/load_env32.c: At top level: elflink/load_env32.c:28:15: warning: array ‘__ctors_start’ assumed to have one element elflink/load_env32.c:28:32: warning: array ‘__ctors_end’ assumed to have one element Signed-off-by: Matt Fleming --- core/elflink/load_env32.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/core/elflink/load_env32.c b/core/elflink/load_env32.c index 28bc70c..51929c8 100644 --- a/core/elflink/load_env32.c +++ b/core/elflink/load_env32.c @@ -24,9 +24,6 @@ #define LDLINUX "ldlinux.c32" -typedef void (*constructor_t) (void); -constructor_t __ctors_start[], __ctors_end[]; - extern char __dynstr_start[]; extern char __dynstr_len[], __dynsym_len[]; extern char __dynsym_start[]; @@ -62,15 +59,6 @@ void init_module_subsystem(struct elf_module *module) list_add(&module->list, &modules_head); } -/* call_constr: initializes sme things related */ -static void call_constr(void) -{ - constructor_t *p; - - for (p = __ctors_start; p < __ctors_end; p++) - (*p) (); -} - int start_ldlinux(char **argv) { int rv; @@ -138,7 +126,6 @@ void load_env32(com32sys_t * regs) }; dprintf("Starting 32 bit elf module subsystem...\n"); - call_constr(); PATH = malloc(strlen(PATH_DEFAULT) + 1); if (!PATH) { -- 2.7.4