aboutsummaryrefslogtreecommitdiffstats
path: root/com32/elflink/ldlinux/adv.c
diff options
context:
space:
mode:
authorMatt Fleming <matt.fleming@intel.com>2012-04-02 12:53:59 +0100
committerMatt Fleming <matt.fleming@intel.com>2012-04-17 10:58:33 +0100
commit0132132022e73d5720121695a9b96fe2eb264d80 (patch)
tree73331b8a1b4dbca4869dbeaf409bade4e6d90bd3 /com32/elflink/ldlinux/adv.c
parent85598d328b2cc544338c49dc2776ff0bb27a8bd4 (diff)
downloadsyslinux-0132132022e73d5720121695a9b96fe2eb264d80.tar.gz
syslinux-0132132022e73d5720121695a9b96fe2eb264d80.tar.xz
syslinux-0132132022e73d5720121695a9b96fe2eb264d80.zip
ldlinux: Tag __syslinux_init() as __constructor
We don't need to have control over exactly when __syslinux_init() is executed, it just needs to be before we call syslinux_get_adv(). Let's apply the __constructor tag to __syslinux_init() so that it is executed before we enter ldlinux.c32's main(). This partially reverts commit 487b67a9ce ("ldlinux: Remove __constructor attribute") because we can now have __constructor functions in ldlinux. By not calling __syslinux_init() directly we also avoid the following build warning, ldlinux.c: In function ‘main’: ldlinux.c:131:2: warning: implicit declaration of function ‘__syslinux_init’ Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Diffstat (limited to 'com32/elflink/ldlinux/adv.c')
-rw-r--r--com32/elflink/ldlinux/adv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/com32/elflink/ldlinux/adv.c b/com32/elflink/ldlinux/adv.c
index 78695471..b81361f2 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 __syslinux_init(void)
+void __constructor __syslinux_init(void)
{
static com32sys_t reg;