Recent versions of GDB (and probably older ones too, but not checked) crash
with and abort when loading the non-stripped 32-bit PPC QEMU build[1]. This
is due to a bug in GDB on reading stab symbols. The only place in OpenBIOS
where stab symbols are generated is in libgcc/crtsavres.S, which was copied
from the linux kernel[2].
Symbols that were defined in the stabs section are still able to be seen in
GDB after stabs removal. There does not appear to be a loss in debugging
functionality.
[1] https://sourceware.org/bugzilla/show_bug.cgi?id=28900
[2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/powerpc/include/asm/ppc_asm.h?h=v5.17-rc4#n211
Signed-off-by: Glenn Washburn <development@efficientek.com>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
New GCCs (for example 4.6.0) needed a few more functions to
libgcc. Without the functions, there were a lot of linker errors:
LINK openbios-qemu.elf
libqemu.a(ofmem.o): In function `hash_page':
/src/openbios-devel/obj-ppc/../arch/ppc/qemu/ofmem.c:353: undefined reference to `_restgpr_25_x'
libqemu.a(ofmem.o): In function `ea_to_phys':
/src/openbios-devel/obj-ppc/../arch/ppc/qemu/ofmem.c:231: undefined reference to `_restgpr_30_x'
etc.
Copy the needed functions from Linux.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@885 f158a5a8-5612-0410-a976-696ce0be7e32