On Fri, 2003-11-14 at 12:04, Rafael 'Dido' Sevilla wrote:
> On Thu, Nov 13, 2003 at 03:39:10PM +0800, JM Ibanez wrote:
> > Does anyone have links to the kernel developer's discussion on the
> > interaction between GCC versions and the kernel?
>
> I think this has to do with use of the -march and -mcpu flags to gcc.
> If your kernel was built with a -march=<your architecture>, and your
> module was built with gcc2.95 which only has the equivalent of an -mcpu
> flag, it won't work. Try using kernel CFLAGS that include only -mcpu
> flags.
I checked the info docs, and gcc 2.95 does support both -mcpu and
-march. I also confirmed by checking the kernel Makefiles--
arch/i386/Makefile puts the necessary flags into CFLAGS there (-march=k6
for the AMD K6, after checking that the GCC does support k6, otherwise
-march=i586).
Also, from the info docs:
`-march=CPU TYPE'
Generate instructions for the machine type CPU TYPE. The choices
for CPU TYPE are the same as for `-mcpu'. Moreover, specifying
`-march=CPU TYPE' implies `-mcpu=CPU TYPE'.
(Sayang... I already trashed my GCC 3-compiled modules (which I
shouldn't have done), and I can't do a hex-based or objdump(1)-based
comparison to an identical GCC 2-compiled one. Hmm... I still have free
partitions... maybe I could install a GCC 3 setup on one of 'em. If
anyone's willing to try it also, please drop me a note so we could
compare notes. :) )
I have, OTOH, casually compared an objdump(1) of a GCC 3-compiled and a
GCC 2-compiled module (under different kernel .configs, though). Looking
through the objdump(1) of soundcore.o (both 2.4.22, the GCC 3 one being
from the Slackware vanilla kernel, while the GCC 2 module being from a
ck2-patched kernel), I see no major differences in structure except the
use of an .rodata.str1 section in the GCC 3 version instead of .rodata
for some data sections (in particular, the string table).
Anyhoo, Google might have turned up something, and so I'm off to hunt
those docs.
JM Ibanez
[EMAIL PROTECTED]
http://www.livejournal.com/~cyberlizard/
---
Q: Why shouldn't I simply delete the stuff I never use, it's just taking up
space?
A: This question is in the category of Famous Last Words..
-- From the Frequently Unasked Questions
---
--
Philippine Linux Users' Group (PLUG) Mailing List
[EMAIL PROTECTED] (#PLUG @ irc.free.net.ph)
Official Website: http://plug.linux.org.ph
Searchable Archives: http://marc.free.net.ph
.
To leave, go to http://lists.q-linux.com/mailman/listinfo/plug
.
Are you a Linux newbie? To join the newbie list, go to
http://lists.q-linux.com/mailman/listinfo/ph-linux-newbie