NetBSD Problem Report #6149

Received: (qmail 6492 invoked from network); 13 Sep 1998 14:33:12 -0000
Message-Id: <xof7lz8dqvw.fsf@blubb.pdc.kth.se>
Date: 13 Sep 1998 16:33:07 +0200
From: joda@pdc.kth.se (Johan Danielsson)
Sender: joda@pdc.kth.se
To: gnats-bugs@gnats.netbsd.org
Subject: bsd.kmod.mk doesn't include -mno-fp-regs in alpha

>Number:         6149
>Category:       port-alpha
>Synopsis:       bsd.kmod.mk doesn't include -mno-fp-regs in alpha
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    mrg
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Sep 13 07:35:01 +0000 1998
>Closed-Date:    Sun Jun 13 12:47:35 +0000 1999
>Last-Modified:  Sun Jun 13 12:56:22 +0000 1999
>Originator:     Johan Danielsson
>Release:        early summer
>Organization:
>Environment:
System: NetBSD chowder.pdc.kth.se 1.3H NetBSD 1.3H (CHOWDER) #2: Fri Sep 11 21:52:26 CEST 1998 root@chowder.pdc.kth.se:/usr/src/sys/arch/alpha/compile/CHOWDER alpha


>Description:

The <bsd.kmod.mk> file doesn't include -mno-fp-regs in CFLAGS, which
is required to build a loadable module on alpha.

>How-To-Repeat:

* cd to /usr/share/lkm/syscall/module
* hack the Makefile so it actually uses bsd.kmod.mk
* make

>Fix:
--- bsd.kmod.mk 1998/09/13 14:29:47     1.1
+++ bsd.kmod.mk 1998/09/13 14:30:28
@@ -18,6 +18,9 @@
 KERN=          $S/kern

 CFLAGS+=       ${COPTS} -D_KERNEL -D_LKM -I. -I${.CURDIR} -I$S -I$S/arch
+.if    (${MACHINE} == "alpha")
+CFLAGS+=       -mno-fp-regs
+.endif

 DPSRCS+=       ${SRCS:M*.l:.l=.c} ${SRCS:M*.y:.y=.c}
 CLEANFILES+=   ${DPSRCS}
>Release-Note:
>Audit-Trail:

From: Ross Harvey <ross@teraflop.com>
To: joda@pdc.kth.se
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: port-alpha/6149
Date: Sun, 15 Nov 1998 23:54:17 -0800 (PST)

 I saw your PR regarding -mno-fp-regs, thanks. But did you actually
 try to load an (ELF!) LKM on NetBSD/alpha? (!)

From: joda@pdc.kth.se (Johan Danielsson)
To: Ross Harvey <ross@teraflop.com>
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: port-alpha/6149
Date: 16 Nov 1998 15:23:14 +0100

 Ross Harvey <ross@teraflop.com> writes:

 > I saw your PR regarding -mno-fp-regs, thanks. But did you actually
 > try to load an (ELF!) LKM on NetBSD/alpha? (!)

 Sure, works like a charm (with my patched modload).

 /Johan

From: Ross Harvey <ross@teraflop.com>
To: joda@pdc.kth.se
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: port-alpha/6149
Date: Mon, 16 Nov 1998 15:05:30 -0800 (PST)

 > From joda@pdc.kth.se Mon Nov 16 06:24:04 1998
 > To: Ross Harvey <ross@teraflop.com>
 > Cc: gnats-bugs@gnats.netbsd.org
 > Subject: Re: port-alpha/6149
 > X-Emacs: 19.34
 > From: joda@pdc.kth.se (Johan Danielsson)
 > Date: 16 Nov 1998 15:23:14 +0100
 >
 > Ross Harvey <ross@teraflop.com> writes:
 >
 > > I saw your PR regarding -mno-fp-regs, thanks. But did you actually
 > > try to load an (ELF!) LKM on NetBSD/alpha? (!)
 >
 > Sure, works like a charm (with my patched modload).
 >
 > /Johan
 >

 Zounds!  But just putting in the compiler option patch doesn't really
 help by itself...can you send in the rest of the diffs, please?

 Thanks! 

From: joda@pdc.kth.se (Johan Danielsson)
To: Ross Harvey <ross@teraflop.com>
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: port-alpha/6149
Date: 17 Nov 1998 02:11:01 +0100

 Ross Harvey <ross@teraflop.com> writes:

 > But just putting in the compiler option patch doesn't really help by
 > itself...can you send in the rest of the diffs, please?

 ftp://ftp.pdc.kth.se/home/joda/elf-modload.tar.gz

 /Johan

From: Ross Harvey <ross@teraflop.com>
To: joda@pdc.kth.se
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: port-alpha/6149
Date: Tue, 17 Nov 1998 19:49:16 -0800 (PST)

 Thanks for sending your modload, it looks quite nicely done.

 We did have code that basically did the same thing in our secondary boot
 blocks and the the ELF dynamic loader. (I've done a lot of work in both of
 those programs.)

 However, you were the first to get modload working, so I think we should
 use your version with your name on it. But to do that I need some kind of
 distribution terms for the new elf.c file...I can't just commit it with a
 copyright and no form of license.

 As you probably know, your options are:

 	1. Public domain it

 	2. Traditional BSD license
 	   2A: with advertising clause
 	   2B: without advertising clause

 	3. Assign copyright to The NetBSD Foundation
 	   (this is similar in effect to option 2B)

 	4. GPL it. (But then I can't use it in src/sbin)

 I usually do 2B for things I write. Our fearless leaders would prefer that
 you do 3, it amounts to about the same thing anyway. I will probably do that
 (3) for future work.

 Did you use an existing code section as a basis for this work?

 Anyway, thanks again...

From: joda@pdc.kth.se (Johan Danielsson)
To: Ross Harvey <ross@teraflop.com>
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: port-alpha/6149
Date: 18 Nov 1998 13:40:32 +0100

 Ross Harvey <ross@teraflop.com> writes:

 > But to do that I need some kind of distribution terms for the new
 > elf.c file...I can't just commit it with a copyright and no form of
 > license.

 A BSD license is fine with me. You want me to do this?

 > Did you use an existing code section as a basis for this work?

 Nope.

 /Johan

From: Ross Harvey <ross@teraflop.com>
To: joda@pdc.kth.se
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: port-alpha/6149
Date: Wed, 18 Nov 1998 11:51:20 -0800 (PST)

 > From: joda@pdc.kth.se (Johan Danielsson)
 >
 > Ross Harvey <ross@teraflop.com> writes:
 >
 > > But to do that I need some kind of distribution terms for the new
 > > elf.c file...I can't just commit it with a copyright and no form of
 > > license.
 >
 > A BSD license is fine with me. You want me to do this?

 OK, thanks a lot! I will take care of it.

 > > Did you use an existing code section as a basis for this work?
 >
 > Nope.
 >
 > /Johan
 >
Responsible-Changed-From-To: gnats-admin->port-alpha-maintainer 
Responsible-Changed-By: fair 
Responsible-Changed-When: Mon Dec 28 09:32:37 PST 1998 
Responsible-Changed-Why:  
This PR is the responsibility of the portmaster, 
not the GNATS database administrator. 

From: matthew green <mrg@eterna.com.au>
To: joda@pdc.kth.se (Johan Danielsson)
Cc: Paul Kranenburg <pk@cs.few.eur.nl>, port-sparc@netbsd.org,
	"Charles M. Hannum" <root@ihack.net>, gnats-bugs@gnats.netbsd.org
Subject: Re: port-alpha/6149 (was: Re: => ELF (heads up))
Date: Mon, 07 Jun 1999 10:32:53 +1000


    > As things stand now, this will severely screw those of us who rely
    > on LKMs.

    port-alpha/6149, no support for loading symbol tables, though.



 FWIW, i took at look at this ELF modload code.  i updated it to -current,
 even, which included splitting the a.out symtab loading code... but the
 ELF code is a bit nasty, and kinda does the wrong thing.  it seems to
 work OK, though....  anyway, ross harvey also spent some time a while ago
 looking at this and in his opinion, the ELF file loading code should be
 made common (and correct) and shared among all the users of such code,
 and that the code not be commited until such time.


 i have commited the modstat.c change to allow printing of 64bit pointers.


 i have placed a copy of the updated code (with a license attached to elf.c
 as johan indicated he would prefer in the mail attached to PR#6149) at:

 	ftp.netbsd.org:/pub/incoming/mrg/modload.tar.gz


 tested only on the SPARC.  a.out _seems_ to still work but i can't be
 100% sure due to other lossage.



 enjoy.

From: joda@pdc.kth.se (Johan Danielsson)
To: matthew green <mrg@eterna.com.au>
Cc: Paul Kranenburg <pk@cs.few.eur.nl>,  port-sparc@netbsd.org,
	  "Charles M. Hannum" <root@ihack.net>,  gnats-bugs@gnats.netbsd.org
Subject: Re: port-alpha/6149 (was: Re: => ELF (heads up))
Date: 07 Jun 1999 10:46:37 -0400

 matthew green <mrg@eterna.com.au> writes:

 > but the ELF code is a bit nasty, and kinda does the wrong thing.

 What does it do wrong? I basically took the ELF spec, an emacs buffer,
 along with some amount of guesing.

 I'm all for sharing code, but I'd rather have something than something
 non-existant but nice.

 /Johan
Responsible-Changed-From-To: port-alpha-maintainer->mrg 
Responsible-Changed-By: ross 
Responsible-Changed-When: Thu Jun 10 13:09:46 PDT 1999 
Responsible-Changed-Why:  
Matt is going to check in Joda's version. 
State-Changed-From-To: open->closed 
State-Changed-By: mrg 
State-Changed-When: Sun Jun 13 05:47:35 PDT 1999 
State-Changed-Why:  
ELF modload support happened just now.  woooh! thanks. 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.49 2026/05/14 01:52:41 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.