NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
kern/39495: Common global symbol defined twice: bootinfo
>Number: 39495
>Category: kern
>Synopsis: Common global symbol defined twice: bootinfo
>Confidential: no
>Severity: non-critical
>Priority: high
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Sep 06 20:45:00 +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;
Home |
Main Index |
Thread Index |
Old Index