lkml.org 
[lkml]   [2006]   [Jun]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject.exit.text section in vmlinux
Hi guys,

I understand why ".exit.text" is present in the case of modules, but I
can't get my head around why it is included in the vmlinux file.
Functions like the ones below puzzle me:

kernel/configs.c: static void __exit ikconfig_cleanup(void)
drivers/net/ne2k-pci.c: static void __exit ne2k_pci_cleanup(void)
drivers/net/ne2k-pci.c: static void __devexit ne2k_pci_remove_one
(struct pci_dev *pdev)

I can see how the last "__devexit" function might be called during
some hotplug event, but are the two "__exit" functions ever going to
be called from the kernel? Since my kernel is configured without
CONFIG_HOTPLUG both both "__exit" and "__devexit" end up in the
".exit.text" section.

The linker script arch/i386/kernel/vmlinux.lds.S mentions the following:

/* .exit.text is discard at runtime, not link time, to deal with references
from .altinstructions and .eh_frame */
The text above seems to answer my question, but I cannot say I fully
understand the comment. I'd appreciate if someone could explain a bit
more if possible.

Ok, so the section should be discarded at runtime. Sounds ok. But
where in the code is this section discarded? -ENOSYS?

Thanks,

/ magnus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-06-30 08:57    [W:0.063 / U:0.080 seconds]
©2003-2014 Jasper Spaans. Advertise on this site