From d131a704edd0ca61357f628026006e8fafc8aa66 Mon Sep 17 00:00:00 2001
From: Eivind Eklund <eivind@FreeBSD.org>
Date: Wed, 11 Feb 1998 01:46:50 +0000
Subject: [PATCH] De-staticize enough to make all the LKMs work again.  Add
 comments where deemed relevant.

---
 sys/alpha/linux/linux_sysvec.c | 4 ++--
 sys/i386/ibcs2/imgact_coff.c   | 6 +++---
 sys/i386/linux/imgact_linux.c  | 6 +++---
 sys/i386/linux/linux_sysvec.c  | 4 ++--
 4 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/sys/alpha/linux/linux_sysvec.c b/sys/alpha/linux/linux_sysvec.c
index 8c128ee97204..ebbe13332a2d 100644
--- a/sys/alpha/linux/linux_sysvec.c
+++ b/sys/alpha/linux/linux_sysvec.c
@@ -25,7 +25,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
- *  $Id: linux_sysvec.c,v 1.23 1998/02/06 12:13:19 eivind Exp $
+ *  $Id: linux_sysvec.c,v 1.24 1998/02/09 06:09:17 eivind Exp $
  */
 
 /* XXX we use functions that might not exist. */
@@ -401,7 +401,7 @@ struct sysentvec elf_linux_sysvec = {
 /*
  * Installed either via SYSINIT() or via LKM stubs.
  */
-static Elf32_Brandinfo linux_brand = {
+Elf32_Brandinfo linux_brand = {
 					"Linux",
 					"/compat/linux",
 					"/lib/ld-linux.so.1",
diff --git a/sys/i386/ibcs2/imgact_coff.c b/sys/i386/ibcs2/imgact_coff.c
index ad5521dbe7b4..d38c7b651dbe 100644
--- a/sys/i386/ibcs2/imgact_coff.c
+++ b/sys/i386/ibcs2/imgact_coff.c
@@ -26,7 +26,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
- *	$Id: imgact_coff.c,v 1.28 1997/12/27 02:56:18 bde Exp $
+ *	$Id: imgact_coff.c,v 1.29 1998/02/09 06:08:20 eivind Exp $
  */
 
 #include <sys/param.h>
@@ -473,7 +473,7 @@ exec_coff_imgact(imgp)
 /*
  * Tell kern_execve.c about it, with a little help from the linker.
  * Since `const' objects end up in the text segment, TEXT_SET is the
- * correct directive to use.
+ * correct directive to use.  Do not staticize; used by coff LKM.
  */
-static const struct execsw coff_execsw = { exec_coff_imgact, "coff" };
+const struct execsw coff_execsw = { exec_coff_imgact, "coff" };
 TEXT_SET(execsw_set, coff_execsw);
diff --git a/sys/i386/linux/imgact_linux.c b/sys/i386/linux/imgact_linux.c
index 66a104a079ff..eb28e4f8dcce 100644
--- a/sys/i386/linux/imgact_linux.c
+++ b/sys/i386/linux/imgact_linux.c
@@ -28,7 +28,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
- *	$Id: imgact_linux.c,v 1.25 1997/12/05 19:55:37 bde Exp $
+ *	$Id: imgact_linux.c,v 1.26 1998/02/09 06:09:16 eivind Exp $
  */
 
 #include <sys/param.h>
@@ -230,8 +230,8 @@ exec_linux_imgact(imgp)
 /*
  * Tell kern_execve.c about it, with a little help from the linker.
  * Since `const' objects end up in the text segment, TEXT_SET is the
- * correct directive to use.
+ * correct directive to use.  Do not staticize; used by Linux LKM.
  */
-static const struct execsw linux_execsw = { exec_linux_imgact, "linux a.out" };
+const struct execsw linux_execsw = { exec_linux_imgact, "linux a.out" };
 TEXT_SET(execsw_set, linux_execsw);
 
diff --git a/sys/i386/linux/linux_sysvec.c b/sys/i386/linux/linux_sysvec.c
index 8c128ee97204..ebbe13332a2d 100644
--- a/sys/i386/linux/linux_sysvec.c
+++ b/sys/i386/linux/linux_sysvec.c
@@ -25,7 +25,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
- *  $Id: linux_sysvec.c,v 1.23 1998/02/06 12:13:19 eivind Exp $
+ *  $Id: linux_sysvec.c,v 1.24 1998/02/09 06:09:17 eivind Exp $
  */
 
 /* XXX we use functions that might not exist. */
@@ -401,7 +401,7 @@ struct sysentvec elf_linux_sysvec = {
 /*
  * Installed either via SYSINIT() or via LKM stubs.
  */
-static Elf32_Brandinfo linux_brand = {
+Elf32_Brandinfo linux_brand = {
 					"Linux",
 					"/compat/linux",
 					"/lib/ld-linux.so.1",