Matthias Mueller <[EMAIL PROTECTED]> writes:

> Jake Page wrote:
> 
> > I get this error when trying to build linuxbios:
> >
> > gcc -nostdlib -nostartfiles -static -o linuxbios -T ldscript.ld
> > linuxbios.o
> > ldscript.ld:133: undefined symbol `root=/dev/hda1 single' referenced in
> > expression
> >
> > The undefined symbol is whatever I set "commandline" to in the config
> > file (I'm using a config almost identical to the provided matsonic.config)
> > Line 133 in ldscript.ld is the end of the file...
> >
> > Happens with gcc 2.96 (Red Hat 7.1) with binutils 2.10.91 or gcc 3.0 with
> > binutils 2.11.
> >
> > Any ideas?
> 
> AFAIK the linker does not need any information about the commandline for the
> kernel. Because the kernel willget the commandline information in a memory
> buffer (the file "params.c" is responsible for that).
> I had that error before and modified the python file in a way that no
> parameter with quotes (") will be passed to the linker file. I attached the
> file to the mail. Some kind of dirty hack but works.

Thanks.  This is the right direction of the fix.  Next time please
use a unified context diff. ``diff -u oldfile newfile''  it is much easier
to spot the changes.

Basically since the linker can only cope with variables that have a numeric
value I have taken your idea and modified it to filter for a proper numeric
looking string.

The idea with placing variables in the linker script is so that the linker
script has access to all of the same information as everything else does so that
we don't need multiple config options, to accomplish one task.  And so
that other parts of the code have access to all of the information the
linker script does. 

Eric


Reply via email to