summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1998-10-12 09:03:48 +0000
committerpeter <peter@FreeBSD.org>1998-10-12 09:03:48 +0000
commit92850399d480f981fa11016d66ed9f8b641dd848 (patch)
tree99a5bbeb80110b14b5e288e5fe2ee992e0a6004c /sys/kern
parent71fd6ef94b524274430affc055cab1c62cbeb8e6 (diff)
downloadFreeBSD-src-92850399d480f981fa11016d66ed9f8b641dd848.zip
FreeBSD-src-92850399d480f981fa11016d66ed9f8b641dd848.tar.gz
Relocate a few extra addresses that are stored as physical addresses via
the boot loader.
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/subr_module.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/kern/subr_module.c b/sys/kern/subr_module.c
index acff4d1..2d58c8a 100644
--- a/sys/kern/subr_module.c
+++ b/sys/kern/subr_module.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: subr_module.c,v 1.1 1998/10/09 00:31:29 msmith Exp $
+ * $Id: subr_module.c,v 1.2 1998/10/09 23:59:01 peter Exp $
*/
#include <sys/param.h>
@@ -247,10 +247,14 @@ preload_bootstrap_relocate(vm_offset_t offset)
if (hdr[0] == 0 && hdr[1] == 0)
break;
- /* Look for a MODINFO_ADDR field */
- if (hdr[0] == MODINFO_ADDR) {
+ /* Deal with the ones that we know we have to fix */
+ switch (hdr[0]) {
+ case MODINFO_ADDR:
+ case MODINFO_METADATA|MODINFOMD_SSYM:
+ case MODINFO_METADATA|MODINFOMD_ESYM:
ptr = (vm_offset_t *)(curp + (sizeof(u_int32_t) * 2));
*ptr += offset;
+ break;
}
/* The rest is beyond us for now */
OpenPOWER on IntegriCloud