NetBSD Problem Report #23758

Received: (qmail 25277 invoked by uid 605); 14 Dec 2003 22:26:47 -0000
Message-Id: <20031214222656.6D7C11E0DD3@yeah-baby.shagadelic.org>
Date: Sun, 14 Dec 2003 14:26:56 -0800 (PST)
From: thorpej@shagadelic.org
Sender: gnats-bugs-owner@NetBSD.org
Reply-To: thorpej@shagadelic.org
To: gnats-bugs@gnats.netbsd.org
Subject: >2 PT_LOAD changes to exec_elf32.c break old GCC3 PowerPC bins
X-Send-Pr-Version: 3.95

>Number:         23758
>Category:       kern
>Synopsis:       >2 PT_LOAD changes to exec_elf32.c break old GCC3 PowerPC bins
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    kern-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Dec 14 22:27:00 +0000 2003
>Closed-Date:    Wed Jan 07 16:43:33 +0000 2004
>Last-Modified:  Wed Jan 07 16:43:33 +0000 2004
>Originator:     Jason R Thorpe
>Release:        NetBSD 1.6ZG
>Organization:
        -- Jason R. Thorpe <thorpej@shagadelic.org>
>Environment:


System: NetBSD yeah-baby.shagadelic.org 1.6ZD NetBSD 1.6ZD (YEAH-BABY-XP) #21: Thu Oct 16 15:47:17 PDT 2003 thorpej@yeah-baby.shagadelic.org:/u1/netbsd/src/sys/arch/i386/compile/YEAH-BABY-XP i386
Architecture: i386
Machine: i386
>Description:
	The recent change to support >2 PT_LOAD sections in exec_elf32.c
	has broken older GCC3-compiled binaries on PowerPC.

	Due to a bug in GCC3, the text section was ending up being writable,
	which means that the new Phdr-parsing code in exec_elf32.c will never
	recognize a text segment in binaries compiled with that compiler.

>How-To-Repeat:
	Boot a new kernel on a system with GCC3-built binaries.  The exec
	of init will get ENOMEM.

>Fix:
	The compiler has been fixed, but that does not help people who
	have older binaries on their system.  The code in exec_elf32.c
	should be fixed to handle this situation.  Until then, the change
	in rev 1.96 of exec_elf32.c should be backed out.
>Release-Note:
>Audit-Trail:

From: Jason R Thorpe <thorpej@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:  
Subject: pr/23758 CVS commit: src/sys/kern
Date: Wed,  7 Jan 2004 16:42:53 +0000 (UTC)

 Module Name:	src
 Committed By:	thorpej
 Date:		Wed Jan  7 16:42:53 UTC 2004

 Modified Files:
 	src/sys/kern: exec_elf32.c

 Log Message:
 Back out >2 PT_LOAD changes from rev 1.96.  They cause older GCC3-compiled
 PowerPC binaries to fail.  The compiler has since been fixed, but
 compatibility with older binaries needs to be maintained.

 PR kern/23758.


 To generate a diff of this commit:
 cvs rdiff -r1.96 -r1.97 src/sys/kern/exec_elf32.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->closed 
State-Changed-By: thorpej 
State-Changed-When: Wed Jan 7 16:43:17 UTC 2004 
State-Changed-Why:  
Offending code in exec_elf32.c has been backed out. 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 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.