-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Jeff Mahoney wrote:
Michael Matz wrote:
Hi,
On Thu, 25 Jun 2009, Jeff Mahoney wrote: The above option is the only way.
Hrm. Well using vmlinux.o means shipping another large file and needing the full linker script.
Yes. I see my approach still as static image. In any case if you get your approach working, all the better.
Ok, your solution seems doable. I'll probably end up taking that route if I can't get mine working properly.
Seems to be an internal linker error. What's output of 'readelf -rsW vmlinux | grep boot_gdt_descr' (i.e. what type of reloc and symbol is this)? c020000c 00a7fb01 R_386_32 c082e116 boot_gdt_descr 1317: c0572676 0 NOTYPE LOCAL DEFAULT 8 boot_gdt_descr 43003: c082e116 0 NOTYPE GLOBAL DEFAULT 38 boot_gdt_descr That's the problem. Two definitions of the same symbol, once local once global and one relocation which then can't decide anymore which one to choose. Do this:
% sed -ie 's/boot_gdt_descr/myown_boot_gdt_descr/g' \ arch/x86/kernel/trampoline_32.S
That renames the local version, which can't be referenced from other places anyway.
Unfortunately it didn't fix the problem for me.
Now I get: readelf -rsW vmlinux|grep boot_gdt_desc c020000c 00a7fb01 R_386_32 c082e116 boot_gdt_descr 1317: c0572676 0 NOTYPE LOCAL DEFAULT 8 t_boot_gdt_descr 43003: c082e116 0 NOTYPE GLOBAL DEFAULT 38 boot_gdt_descr
.. but still get the
ld: vmlinux(.text.head+0xc020000c): reloc against `boot_gdt_descr': error 2
[Sorry for the double post to CC-list members, I originally sent from @suse.de] 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've altered the build process to leave a vmlinux.reloc around before doing the final link. That's enough to leave the information we need to link the modules later. One thing we haven't discussed yet is the supportability of this. If we start relinking the kernel on installed systems, -debuginfo kernel packages are useless. - -Jeff - -- Jeff Mahoney SUSE Labs -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iEYEARECAAYFAkpUrJMACgkQLPWxlyuTD7LQ/ACdF64ATl5GCuIlucjs0YFDCpUg dw4An0XzBnZNfHgYqavGVQZqndhc99x2 =Jozu -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org