Subject: Re: NetBSD/pmax native kernel.
To: None <hpeyerl@novatel.ca>
From: Charles M. Hannum <mycroft@gnu.ai.mit.edu>
List: port-pmax
Date: 12/09/1994 18:08:12
ld -x -N -o netbsd -e start -Ttext 80030000 ${SYSTEM_OBJ} vers.o /usr/src/sys/lib/libkern/obj.pmax/libkern.a
machdep.o(.text+0x34): undefined reference to `_end'
machdep.o(.text+0x38): undefined reference to `_end'
machdep.o(.text+0x44): undefined reference to `_edata'
machdep.o(.text+0x48): undefined reference to `_edata'
trap.o(.text+0x2494): undefined reference to `_edata'
trap.o(.text+0x2498): undefined reference to `_edata'
These are magic symbols created by the linker. The presence of
underscores tends to indicate that your C copmiler (GCC?) is adding
them. I don't know why the symbols would be undefined, then, unless
the linker itself is not adding the underscores to the invented
symbols.
In GCC, you can do something like:
extern char edata[] __asm__("edata"),
end[] __asm__("end");
to give explicit names to the symbols when the assembler code is
generated.