[syslinux:elflink] ldlinux: Remove __constructor attribute

syslinux-bot for Matt Fleming matt.fleming at linux.intel.com
Fri May 27 17:15:19 PDT 2011

Commit-ID:  487b67a9ce9f6b338a28d4ab71a7ee313ba35762
Gitweb:     http://syslinux.zytor.com/commit/487b67a9ce9f6b338a28d4ab71a7ee313ba35762
Author:     Matt Fleming <matt.fleming at linux.intel.com>
AuthorDate: Wed, 25 May 2011 08:45:37 +0100
Committer:  Matt Fleming <matt.fleming at linux.intel.com>
CommitDate: Wed, 25 May 2011 08:45:37 +0100

ldlinux: Remove __constructor attribute

The __constructor tag only makes sense in the core as the constructor
functions are executed from load_env32(), before any modules have been
loaded. Therefore, applying __constructor to code inside ldlinux is
pointless as unless the functions are called explicitly, they will
never be executed.

Signed-off-by: Matt Fleming <matt.fleming at linux.intel.com>

 com32/elflink/ldlinux/adv.c      |    2 +-
 com32/elflink/ldlinux/ipappend.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/com32/elflink/ldlinux/adv.c b/com32/elflink/ldlinux/adv.c
index b81361f..7869547 100644
--- a/com32/elflink/ldlinux/adv.c
+++ b/com32/elflink/ldlinux/adv.c
@@ -40,7 +40,7 @@ void *__syslinux_adv_ptr;
 size_t __syslinux_adv_size;
 extern void adv_init(void);
-void __constructor __syslinux_init(void)
+void __syslinux_init(void)
     static com32sys_t reg;
diff --git a/com32/elflink/ldlinux/ipappend.c b/com32/elflink/ldlinux/ipappend.c
index bd00092..cbd02b1 100644
--- a/com32/elflink/ldlinux/ipappend.c
+++ b/com32/elflink/ldlinux/ipappend.c
@@ -38,7 +38,7 @@
 struct syslinux_ipappend_strings __syslinux_ipappend_strings;
 static const char *syslinux_ipappend_string_list[32];
-void __constructor __syslinux_get_ipappend_strings(void)
+void __syslinux_get_ipappend_strings(void)
     static com32sys_t reg;
     int i;

More information about the Syslinux-commits mailing list