-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Michael Matz wrote:
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/ ?
Yes, but we already had another file anyway, so that's not much of a difference.
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 :-)
Indeed. Well, it was worth a try. I was hoping do as much of the processing during installation rather than during the boot.
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.
I guess this is where the next step leads. You told me so. ;) - -Jeff - -- Jeff Mahoney SUSE Labs -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iEYEARECAAYFAkpU0hYACgkQLPWxlyuTD7Jc6wCfWRvc4bXy39UOS5UL9wEaSdLw OOcAn0uAOtGO2KIZZsBo4en51iS475xc =QR0D -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org