NetBSD Problem Report #39495
From www@NetBSD.org Sat Sep 6 20:43:30 2008
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by narn.NetBSD.org (Postfix) with ESMTP id 3241D63B853
for <gnats-bugs@gnats.netbsd.org>; Sat, 6 Sep 2008 20:43:30 +0000 (UTC)
Message-Id: <20080906204329.C7B9963B11D@narn.NetBSD.org>
Date: Sat, 6 Sep 2008 20:43:29 +0000 (UTC)
From: xtraeme@gmail.com
Reply-To: xtraeme@gmail.com
To: gnats-bugs@NetBSD.org
Subject: Common global symbol defined twice: bootinfo
X-Send-Pr-Version: www-1.0
>Number: 39495
>Category: kern
>Synopsis: Common global symbol defined twice: bootinfo
>Confidential: no
>Severity: non-critical
>Priority: high
>Responsible: tron
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Sep 06 20:45:00 +0000 2008
>Closed-Date: Tue Sep 09 12:11:17 +0000 2008
>Last-Modified: Tue Sep 09 12:11:17 +0000 2008
>Originator: Juan RP
>Release: Latest
>Organization:
>Environment:
NetBSD vmware-netbsd 4.99.72 NetBSD 4.99.72 (MASTER) #13: Sat Sep 6 19:20:40 CEST 2008 juan@vmware-netbsd:/home/juan/build/obj/sys/arch/i386/compile/MASTER i386
>Description:
When linking the kernel with --warn-common, a warning of a common global symbol of the same size was found for 'bootinfo'.
bootinfo is defined as global in sys/arch/x86/x86_machdep.c.
bootinfo is defined as global in sys/arch/i386/i386/machdep.c.
Therefore only a definition is needed...
>How-To-Repeat:
Code inspection.
>Fix:
Index: x86/include/bootinfo.h
===================================================================
RCS file: /cvsroot/src/sys/arch/x86/include/bootinfo.h,v
retrieving revision 1.13
diff -b -u -p -r1.13 bootinfo.h
--- x86/include/bootinfo.h 2 May 2008 15:26:39 -0000 1.13
+++ x86/include/bootinfo.h 6 Sep 2008 20:36:22 -0000
@@ -201,6 +201,8 @@ struct bootinfo {
uint8_t bi_data[BOOTINFO_MAXSIZE - sizeof(uint32_t)];
};
+extern struct bootinfo bootinfo;
+
void *lookup_bootinfo(int);
#endif /* _LOCORE */
Index: i386/i386/machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/i386/i386/machdep.c,v
retrieving revision 1.640
diff -b -u -p -r1.640 machdep.c
--- i386/i386/machdep.c 26 Aug 2008 08:43:00 -0000 1.640
+++ i386/i386/machdep.c 6 Sep 2008 20:36:26 -0000
@@ -298,7 +298,6 @@ void add_mem_cluster(uint64_t, uint64_t,
extern int time_adjusted;
-struct bootinfo bootinfo;
int *esym;
int *eblob;
extern int boothowto;
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: kern-bug-people->tron
Responsible-Changed-By: tron@NetBSD.org
Responsible-Changed-When: Tue, 09 Sep 2008 11:54:46 +0000
Responsible-Changed-Why:
I'll handle this PR.
From: Matthias Scheler <tron@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/39495 CVS commit: src/sys/arch
Date: Tue, 9 Sep 2008 12:09:32 +0000 (UTC)
Module Name: src
Committed By: tron
Date: Tue Sep 9 12:09:32 UTC 2008
Modified Files:
src/sys/arch/i386/i386: machdep.c
src/sys/arch/x86/include: bootinfo.h
Log Message:
Remove duplicate definition of "bootinfo" structure.
Patch provided by Juan RP in PR kern/39495.
To generate a diff of this commit:
cvs rdiff -r1.640 -r1.641 src/sys/arch/i386/i386/machdep.c
cvs rdiff -r1.13 -r1.14 src/sys/arch/x86/include/bootinfo.h
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: tron@NetBSD.org
State-Changed-When: Tue, 09 Sep 2008 12:11:17 +0000
State-Changed-Why:
I've committed your patch. Thanks a lot for the bug report.
>Unformatted:
(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.