Subject: Re: Adding Multiboot support (or not)
To: None <tech-kern@netbsd.org, port-i386@netbsd.org>
From: Pavel Cahyna <pavel.cahyna@st.mff.cuni.cz>
List: tech-kern
Date: 02/14/2006 20:11:08
On Tue, Feb 14, 2006 at 06:54:42PM +0300, Valeriy E. Ushakov wrote:
> On Tue, Feb 14, 2006 at 15:48:53 +0000, Nick Hudson wrote:
>
> > That's not my understanding of Pavel's roblem...
> >
> > On Saturday 11 February 2006 21:30, Pavel Cahyna wrote:
> > > In my case it won't, unless I add an explicit statement for .rodata:
> > >
> > > .rodata :
> > > AT (LOADADDR(.text) + (ADDR(.rodata) - ADDR(.text)))
> > > {
> > > *(.rodata)
> > > }
> >
> > Are we mandating .rodata?
>
> He said he needs to add .rodata to the the output .text section, so my
> (...)
I never said this... .rodata was in the output .text section in the
original Jason's script and I did not change it. What I said was that I
had to add .rodata separately, see above. (Now when I'm thinking about it,
why didn't they conflict?)
Now I looked if the .rodata is needed at all, so I commented out both places:
(...)
.text (KERNEL_BASE_virt) :
AT (KERNEL_BASE_phys)
{
*(.text)
*(.text.*)
*(.stub)
/* *(.rodata) */
} =0
/* .rodata :
AT (LOADADDR(.text) + (ADDR(.rodata) - ADDR(.text)))
{
*(.rodata)
} */
(...)
Now ld complains:
/home/pavel/scratch/current/sys/arch/i386/conf/kern.ldscript:49 non constant expression for load base
Given that the ldscript has 48 lines, reporting an error on line 49 seems
a bit strange, but well, nobody is perfect.
Pavel