Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 Aug 2018 20:41:44 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r338025 - head/sys/dev/bge
Message-ID:  <201808182041.w7IKfivO007278@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dim
Date: Sat Aug 18 20:41:43 2018
New Revision: 338025
URL: https://svnweb.freebsd.org/changeset/base/338025

Log:
  Use the size of one bge_devs element for the MODULE_PNP_INFO macro,
  instead of the size of the whole bge_devs array.
  
  This should stop kldxref searching beyond the end of .rodata when it
  processes relocations, and emitting "unhandled relocation type" errors,
  at least on i386.

Modified:
  head/sys/dev/bge/if_bge.c

Modified: head/sys/dev/bge/if_bge.c
==============================================================================
--- head/sys/dev/bge/if_bge.c	Sat Aug 18 20:35:19 2018	(r338024)
+++ head/sys/dev/bge/if_bge.c	Sat Aug 18 20:41:43 2018	(r338025)
@@ -548,7 +548,7 @@ static devclass_t bge_devclass;
 
 DRIVER_MODULE(bge, pci, bge_driver, bge_devclass, 0, 0);
 MODULE_PNP_INFO("U16:vendor;U16:device", pci, bge, bge_devs,
-    sizeof(bge_devs), nitems(bge_devs) - 1);
+    sizeof(bge_devs[0]), nitems(bge_devs) - 1);
 DRIVER_MODULE(miibus, bge, miibus_driver, miibus_devclass, 0, 0);
 
 static int bge_allow_asf = 1;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201808182041.w7IKfivO007278>