Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/config Revise a plan about link-set.
details: https://anonhg.NetBSD.org/src/rev/15b00324df34
branches: trunk
changeset: 333674:15b00324df34
user: uebayasi <uebayasi%NetBSD.org@localhost>
date: Thu Nov 13 15:25:48 2014 +0000
description:
Revise a plan about link-set.
(I was ignorant 2 weeks ago.)
diffstat:
usr.bin/config/TODO | 22 +++++++++++++---------
1 files changed, 13 insertions(+), 9 deletions(-)
diffs (34 lines):
diff -r c690ada4cc00 -r 15b00324df34 usr.bin/config/TODO
--- a/usr.bin/config/TODO Thu Nov 13 15:03:06 2014 +0000
+++ b/usr.bin/config/TODO Thu Nov 13 15:25:48 2014 +0000
@@ -158,17 +158,21 @@
sequence of various subsystem initializations in init_main.c:main() will be
replaced by an array of .kctors invocations, and #ifdef's there will be gone.
-o Replace linkset.
+o Hide link-set in the final kernel.
+
+ Link-set is used to collect references (pointers) at link time. It relys on
+ the ld(1) behavior that it automatically generates `__start_X' and `__stop_X'
+ symbols for the section `X' to reduce coding.
+
+ Don't allow kernel subsystems create random ELF sections.
- Don't allow kernel subsystems create random ELF sections (with potentially
- long names) in the final kernel. To collect some data in statically linked
- modules, creating intermediate sections (e.g. .data.linkset.sysctl) and
- exporting the start/end symbols (e.g. _data_linkset_sysctl_{start,end})
- using linker script should be fine.
+ Pre-define all the available link-set names and pre-generate a linker script
+ to merge them into .rodata.
- Dynamically loaded modules have to register those entries via constructors
- (functions). This means that dynamically loaded modules are flexible but
- come with overhead.
+ (For modular(9) modules, `link_set_modules' is looked up by kernel loader.
+ Provide only it.)
+
+ Provide a way for 3rd party modules to declare extra link-set.
o Shared kernel objects.
Home |
Main Index |
Thread Index |
Old Index