NetBSD Problem Report #32423

From www@netbsd.org  Sat Dec 31 11:02:52 2005
Return-Path: <www@netbsd.org>
Received: by narn.netbsd.org (Postfix, from userid 31301)
	id 2511E63B869; Sat, 31 Dec 2005 11:02:52 +0000 (UTC)
Message-Id: <20051231110252.2511E63B869@narn.netbsd.org>
Date: Sat, 31 Dec 2005 11:02:52 +0000 (UTC)
From: cherry@mahiti.org
Reply-To: cherry@mahiti.org
To: gnats-bugs@netbsd.org
Subject: Boot loader hook for loading processor specified kernel segments
X-Send-Pr-Version: www-1.0

>Number:         32423
>Category:       kern
>Synopsis:       Boot loader hook for loading processor specified kernel segments
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sat Dec 31 11:05:00 +0000 2005
>Originator:     Cherry G. Mathew
>Release:        -current
>Organization:
Mahiti
>Environment:
>Description:
See Thread on tech-kern:

http://mail-index.netbsd.org/tech-kern/2005/12/30/0007.html


>How-To-Repeat:

>Fix:
*** loadfile_elf32.c	11 Dec 2005 17:54:46 +0530	1.12
--- loadfile_elf32.c	31 Dec 2005 16:25:55 +0530	
***************
*** 296,301 ****
--- 296,308 ----

  	for (first = 1, i = 0; i < elf->e_phnum; i++) {
  		internalize_phdr(elf->e_ident[EI_DATA], &phdr[i]);
+ 
+ #ifdef MD_LOADSEG /* Allow processor ABI specific segment loads */
+ 		if ( (phdr[i].p_type & PT_LOPROC) &&
+ 		     MD_LOADSEG(phdr[i]))
+ 				goto loadseg;
+ #endif /*MD_LOADSEG*/
+ 
  		if (phdr[i].p_type != PT_LOAD ||
  		    (phdr[i].p_flags & (PF_W|PF_X)) == 0)
  			continue;
***************
*** 309,314 ****
--- 316,322 ----
  		if ((IS_TEXT(phdr[i]) && (flags & LOAD_TEXT)) ||
  		    (IS_DATA(phdr[i]) && (flags & LOAD_DATA))) {

+ 		loadseg:
  			/* Read in segment. */
  			PROGRESS(("%s%lu", first ? "" : "+",
  			    (u_long)phdr[i].p_filesz));

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.