From 1e1f20e1538eb7664321b34be803335e490b4cf4 Mon Sep 17 00:00:00 2001 From: uebayasi Date: Wed, 26 Aug 2015 06:38:57 +0000 Subject: [PATCH] One more about linker script, another about genassym. --- usr.bin/config/TODO | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/usr.bin/config/TODO b/usr.bin/config/TODO index cc1cd4dc3f94..e270243e6728 100644 --- a/usr.bin/config/TODO +++ b/usr.bin/config/TODO @@ -211,6 +211,16 @@ o Shared kernel objects. bus_space(9) operations, etc.) for users, the official binaries build provided by TNF should be as portable as possible. +o Always use explicit kernel linker script. + + ld(1) has an option -T to use a given linker script. If not + specified, a default, built-in linker script, mainly meant for userland + programs, is used. + + Currently m68k, sh3, and vax don't have kernel linker scripts. These work + because these have no constraints about page boundary; they map and access + kernel .text/.data in the same way. + o Control ELF sections using linker script. Now kernel is linked and built directly from object files (*.o). Each port @@ -379,3 +389,15 @@ o Strictly define DIAGNOSTIC. It is possible to make DIAGNOSTIC kernel and modules binary-compatible with non-DIAGNOSTIC ones. In that case, debug type informations should match theoretically (not confirmed). + +o Define genassym(1) symbols per file. + + Have each file define symbols that have to be generated by genassym(1) so + that more accurate dependency is reflected. + + For example, if foo.S needs some symbols, it defines them in foo.assym, + declaring that foo.S depends on foo.assym.h, and includes foo.assym.h. + foo.assym.h is generated by following the suffix rule of .assym -> .assym.h. + When one header is updated, only related *.assym.h files are regenerated, + instead of rebuilding all MD/*.S files that depend on the global, single + assym.h.