$global$ undefined?
I'm getting "undefined reference to `$global$'" error when linking. Is this a tools or source tree problem?
I'm inclined to think the former but don't know.
thanks,
grant
ps - this is now on an HP-UX 11.00 system.
grundler <438>type ld
ld is /linux/parisc-linux/bin/ld
grundler <439>ld --version
GNU ld 2.9.1
Copyright 1997 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of the GNU General Public License. This program has absolutely no warranty.
Supported emulations:
hppaelf
grundler <440>type gcc
gcc is /linux/parisc-linux/bin/gcc
grundler <441>gcc --version
egcs-2.91.60
grundler <442>type as
as is /linux/parisc-linux/bin/as
grundler <443>as --version
GNU assembler 2.9.1
Copyright 1997 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of the GNU General Public License. This program has absolutely no warranty. This assembler was configured for a target of `parisc-linux'.
grundler <444>make vmlinux
gcc -D__KERNEL__ -I/linux/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -mdisable-fpregs -fwritable-strings -pipe -fno-strength-reduce -DUTS_MACHINE='"parisc"' -c -o init/version.o init/version.c .
.
.
ld -R 0xc0010000 -N -e stext arch/parisc/kernel/head.o arch/parisc/kernel/init_task.o init/main.o init/version.o ramdisk.o\ arch/parisc/kernel/kernel.o arch/parisc/mm/mm.o kernel/kernel.o mm/mm.o fs/fs.o ipc/ipc.o \ fs/filesystems.a \ net/network.a \ drivers/block/block.a drivers/char/char.a drivers/gecko/gecko.a drivers/net/net.a drivers/pci/pci.a \ /linux/linux/arch/parisc/lib/lib.a /linux/linux/lib/lib.a /linux/linux/arch/parisc/lib/lib.a \ -o vmlinux
arch/parisc/kernel/kernel.o: In function `pdc_add_valid':
arch/parisc/kernel/kernel.o($CODE$+0x26f8): undefined reference to `$global$'
make: *** [vmlinux] Error 1
grundler <445>
Quoted 4 lines
grundler <438>type ld
ld is /linux/parisc-linux/bin/ld
grundler <439>ld --version
GNU ld 2.9.1
Use the HP/UX ld.
Quoted 6 lines · Philipp Rumpf
Quoted 4 lines
grundler <438>type ld
ld is /linux/parisc-linux/bin/ld
grundler <439>ld --version
GNU ld 2.9.1Use the HP/UX ld.
Sorry - I forgot about that in my Nth attempt at setting up the GNU cross-env tools.
Different problem now.
grundler <402>mv /linux/parisc-linux/bin/ld /linux/parisc-linux/bin/ld.orig grundler <403>type ld
ld is /bin/ld
...
grundler <406>make vmlinux
...
ld -R 0xc0010000 -N -e stext arch/parisc/kernel/head.o arch/parisc/kernel/init_task.o init/main.o init/version.o ramdisk.o\
arch/parisc/kernel/kernel.o arch/parisc/mm/mm.o kernel/kernel.o mm/mm.o fs/fs.o ipc/ipc.o \
fs/filesystems.a \
net/network.a \
drivers/block/block.a drivers/char/char.a drivers/gecko/gecko.a drivers/net/net.a drivers/pci/pci.a \
/linux/linux/arch/parisc/lib/lib.a /linux/linux/lib/lib.a /linux/linux/arch/parisc/lib/lib.a \
-o vmlinuxld: (Warning) Option "-N" ignored. Non-shared text is not supported.
ld: Bad arch rev: 0
Fatal error.
make: *** [vmlinux] Error 1
Grant Grundler
Communications Infrastructure Computer Operations
+1.408.447.7253
Quoted 1 line
Different problem now.
please file the object files to see whether they are ELF or SOM (they should be all SOM).
Quoted 4 lines · Philipp Rumpf
Quoted 1 line
Different problem now.
please file the object files to see whether they are ELF or SOM (they should be all SOM).
grundler <407>file arch/parisc/kernel/head.oarch/parisc/kernel/head.o: ELF-32 relocatable object file - PA-RISC
Sigh...I thought the object files were supposed to be SOM until I saw the following in the binutils/gas/configure:
parisc-*-linux*) fmt=elf em=linux ;;
Should I change this to "som"?
thanks again philipp,
grant
Grant Grundler
Communications Infrastructure Computer Operations
+1.408.447.7253