Hi, On Wed, 8 Jul 2009, Jeff Mahoney wrote:
I've abandoned the idea of linking against the static vmlinux. Michael is right, the information we need just isn't there. The good news is that on x86, I think we can keep vmlinux relocatable and then just link it statically to boot it as vmlinuz.
I guess this means an additional file in /boot/ ? Or perhaps in /lib/modules/$VERSION/ ?
I need to do some research on what would be involved to regenerate the debuginfo as well.
Hmm. Debuginfo refers to entities by address/offset. So if addresses change due to relinking (e.g. by enlarging .text with the code from modules) the debuginfo becomes incorrect. We have no way to correct this anymore, except if vmlinux.reloc would contain unrelocated debuginfo (a hypothetical DWARF rewriter handling this doesn't exist and would be very complicated to create). It's not easy to separate unrelocated debug info from unrelocated .o files, they contain relocations against file sections which depend on those sections being in the same file (e.g. against .text). So there would have to be two vmlinux.reloc, one without debug sections and one with debug-info _and_ the code/data. In relinking you would chose the latter if installed and separate debuginfo afterwards (or not, doesn't matter). This all seems quite unappealing :-)
Michael - Is it possible to pull the debuginfo back in during the link for re-export after the link? Is there a better way to do this?
Right now I can't think of any. The situation would be different if the relinking above would _not_ change the layout of the pre-existing vmlinux sections, but it always will if starting from unrelocated files. Of course, with just a little bit of code in the kernel (I believe :) ) it would be possible to load a meta-module tacked somewhere into the vmlinux file, and all the relinking problems vanish. Ciao, Michael. -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org