Re: CVS commit: src/share/mk

2014-11-12 Thread Masao Uebayashi
It'd be better to always generate kldscript and kill *.mk contionals completely.


Re: CVS commit: src/sys/conf

2014-11-12 Thread Christos Zoulas
Not to worry, I fixed it already. And I will improve it further.

christos 


> On Nov 12, 2014, at 6:51 AM, Masao Uebayashi  wrote:
> 
> I will look and try to write a separate mkldscript for kmod (but not today).
> 
>> On Wednesday, November 12, 2014, Izumi Tsutsui  
>> wrote:
>> christos@ wrote:
>> 
>> > Module Name:  src
>> > Committed By: christos
>> > Date: Wed Nov 12 02:15:58 UTC 2014
>> >
>> > Modified Files:
>> >   src/sys/conf: mkldscript.sh
>> >
>> > Log Message:
>> > I don't know what was using this before
>> 
>> Christos, could you please try at least cvs log or grep -R
>> before writing such commit log?
>> 
>> http://mail-index.netbsd.org/source-changes/2007/03/04/0006.html
>> ---
>> Module Name:src
>> Committed By:   tsutsui
>> Date:   Sun Mar  4 02:35:50 UTC 2007
>> 
>> Modified Files:
>> src/sys/arch/cats/conf: Makefile.cats.inc
>> src/sys/arch/shark/conf: Makefile.shark.inc
>> Added Files:
>> src/sys/conf: mkldscript.sh
>> Removed Files:
>> src/sys/arch/arm/conf: mkldscript.sh
>> 
>> Log Message:
>> Move mkldscript.sh, which is used to create ldscript dynamically to
>> merge link_set_* sections into the text section for a.out kernels,
>> from sys/arch/arm/conf/ to sys/conf/ since there is no ARM specific
>> stuff in it and other ports would share it.
>> ---
>> 
>> % grep -R mkldscript.sh src/sys
>> sys/arch/cats/conf/Makefile.cats.inc: OBJDUMP=${OBJDUMP} ${HOST_SH} 
>> $S/conf/mkldscript.sh \
>> sys/arch/luna68k/conf/Makefile.luna68k:   OBJDUMP=${OBJDUMP} ${HOST_SH} 
>> $S/conf/mkldscript.sh \
>> sys/arch/shark/conf/Makefile.shark.inc:   OBJDUMP=${OBJDUMP} ${HOST_SH} 
>> $S/conf/mkldscript.sh \
>> %
>> 
>> ---
>> 
>> > (but it did not work since it
>> > did not produce valid LDSCRIPT code) and now it does.
>> 
>> It have worked more than ten years for these traditional arm ports
>> (luna68k no longer needs it since it got a native bootloader though).
>> 
>> I wonder if you need a different script (or proper wrapper)
>> for modules..
>> 
>> ---
>> Izumi Tsutsui
> 


Re: CVS commit: src/sys/conf

2014-11-12 Thread Masao Uebayashi
I will look and try to write a separate mkldscript for kmod (but not today).

On Wednesday, November 12, 2014, Izumi Tsutsui 
wrote:

> christos@ wrote:
>
> > Module Name:  src
> > Committed By: christos
> > Date: Wed Nov 12 02:15:58 UTC 2014
> >
> > Modified Files:
> >   src/sys/conf: mkldscript.sh
> >
> > Log Message:
> > I don't know what was using this before
>
> Christos, could you please try at least cvs log or grep -R
> before writing such commit log?
>
> http://mail-index.netbsd.org/source-changes/2007/03/04/0006.html
> ---
> Module Name:src
> Committed By:   tsutsui
> Date:   Sun Mar  4 02:35:50 UTC 2007
>
> Modified Files:
> src/sys/arch/cats/conf: Makefile.cats.inc
> src/sys/arch/shark/conf: Makefile.shark.inc
> Added Files:
> src/sys/conf: mkldscript.sh
> Removed Files:
> src/sys/arch/arm/conf: mkldscript.sh
>
> Log Message:
> Move mkldscript.sh, which is used to create ldscript dynamically to
> merge link_set_* sections into the text section for a.out kernels,
> from sys/arch/arm/conf/ to sys/conf/ since there is no ARM specific
> stuff in it and other ports would share it.
> ---
>
> % grep -R mkldscript.sh src/sys
> sys/arch/cats/conf/Makefile.cats.inc: OBJDUMP=${OBJDUMP} ${HOST_SH}
> $S/conf/mkldscript.sh \
> sys/arch/luna68k/conf/Makefile.luna68k:   OBJDUMP=${OBJDUMP} ${HOST_SH}
> $S/conf/mkldscript.sh \
> sys/arch/shark/conf/Makefile.shark.inc:   OBJDUMP=${OBJDUMP} ${HOST_SH}
> $S/conf/mkldscript.sh \
> %
>
> ---
>
> > (but it did not work since it
> > did not produce valid LDSCRIPT code) and now it does.
>
> It have worked more than ten years for these traditional arm ports
> (luna68k no longer needs it since it got a native bootloader though).
>
> I wonder if you need a different script (or proper wrapper)
> for modules..
>
> ---
> Izumi Tsutsui
>


Re: CVS commit: src/sys/conf

2014-11-12 Thread Izumi Tsutsui
christos@ wrote:

> I grepped -R and used nxr but found nothing.

Hmm.
http://nxr.netbsd.org/search?q=mkldscript.sh&project=src
shows all files..

> >I wonder if you need a different script (or proper wrapper)
> >for modules..
> 
> Well, it did not have a valid syntax also when I tried it for some
> reason (ld complained). It needed:
> 
>   link_set_foo : { *(link_set_foo) }
> 
> instead of:
> 
>   *(link_set_foo)

The initial commit message says:
http://mail-index.netbsd.org/source-changes/2004/09/13/msg152610.html
---
Modified Files:
src/sys/arch/cats/conf: Makefile.cats.inc
src/sys/arch/shark/conf: Makefile.shark.inc
src/sys/conf: Makefile.kern.inc
Added Files:
src/sys/arch/arm/conf: kern.ldscript.head kern.ldscript.tail
mkldscript.sh

Log Message:
work around a binutils bug where converting ELF kernels to a.out with objcopy
produces corrupted binaries when the link_set_* sections extend into another
page after the end of the .text section by using a generated an ldscript that
puts all the link_set_* data into the .text section in the first place.
---

You can see how they can be valid in the Makefiles and
kern.ldscript.{head,tail} files.

Anyway, it looks required for a.out only but no one will fix
a.out features..

---
Izumi Tsutsui


Re: CVS commit: src/sys/conf

2014-11-12 Thread Christos Zoulas
In article <141112200516.m0117...@mirage.ceres.dti.ne.jp>,
Izumi Tsutsui   wrote:
>christos@ wrote:
>
>> Module Name: src
>> Committed By:christos
>> Date:Wed Nov 12 02:15:58 UTC 2014
>> 
>> Modified Files:
>>  src/sys/conf: mkldscript.sh
>> 
>> Log Message:
>> I don't know what was using this before
>
>Christos, could you please try at least cvs log or grep -R
>before writing such commit log?

I grepped -R and used nxr but found nothing. I did not think
of using cvs log.

>It have worked more than ten years for these traditional arm ports
>(luna68k no longer needs it since it got a native bootloader though).
>
>I wonder if you need a different script (or proper wrapper)
>for modules..

Well, it did not have a valid syntax also when I tried it for some
reason (ld complained). It needed:

link_set_foo : { *(link_set_foo) }

instead of:

*(link_set_foo)

Anyway, it should be trivial to amend to work again for shark, and I'll
do it.

christos



Re: CVS commit: src/sys/conf

2014-11-12 Thread Izumi Tsutsui
christos@ wrote:

> Module Name:  src
> Committed By: christos
> Date: Wed Nov 12 02:15:58 UTC 2014
> 
> Modified Files:
>   src/sys/conf: mkldscript.sh
> 
> Log Message:
> I don't know what was using this before

Christos, could you please try at least cvs log or grep -R
before writing such commit log?

http://mail-index.netbsd.org/source-changes/2007/03/04/0006.html
---
Module Name:src
Committed By:   tsutsui
Date:   Sun Mar  4 02:35:50 UTC 2007

Modified Files:
src/sys/arch/cats/conf: Makefile.cats.inc
src/sys/arch/shark/conf: Makefile.shark.inc
Added Files:
src/sys/conf: mkldscript.sh
Removed Files:
src/sys/arch/arm/conf: mkldscript.sh

Log Message:
Move mkldscript.sh, which is used to create ldscript dynamically to
merge link_set_* sections into the text section for a.out kernels,
from sys/arch/arm/conf/ to sys/conf/ since there is no ARM specific
stuff in it and other ports would share it.
---

% grep -R mkldscript.sh src/sys
sys/arch/cats/conf/Makefile.cats.inc: OBJDUMP=${OBJDUMP} ${HOST_SH} 
$S/conf/mkldscript.sh \
sys/arch/luna68k/conf/Makefile.luna68k:   OBJDUMP=${OBJDUMP} ${HOST_SH} 
$S/conf/mkldscript.sh \
sys/arch/shark/conf/Makefile.shark.inc:   OBJDUMP=${OBJDUMP} ${HOST_SH} 
$S/conf/mkldscript.sh \
% 

---

> (but it did not work since it
> did not produce valid LDSCRIPT code) and now it does.

It have worked more than ten years for these traditional arm ports
(luna68k no longer needs it since it got a native bootloader though).

I wonder if you need a different script (or proper wrapper)
for modules..

---
Izumi Tsutsui