summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Washburn <development@efficientek.com>2022-02-17 13:13:22 -0600
committerMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>2022-02-23 21:41:37 +0000
commit0fbb6f73c18039ec91d67fcfc205ff9ca92e228f (patch)
tree58dc00a19f29785abfe61cba1ac0d6d072369466
parent88eb9291fc0b866f0b5e81e63ef8c83022c3d7b2 (diff)
downloadqemu-openbios-0fbb6f73c18039ec91d67fcfc205ff9ca92e228f.tar.gz
ppc: Do not generate .stabs ELF sections to prevent GDB from choking on them
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>
-rw-r--r--libgcc/crtsavres.S4
1 files changed, 0 insertions, 4 deletions
diff --git a/libgcc/crtsavres.S b/libgcc/crtsavres.S
index 40bd7365..8a77ba16 100644
--- a/libgcc/crtsavres.S
+++ b/libgcc/crtsavres.S
@@ -76,13 +76,9 @@ GLUE(.,name):
#define _GLOBAL(n) \
.text; \
- .stabs __stringify(n:F-1),N_FUN,0,0,n;\
.globl n; \
n:
-/* some stab codes */
-#define N_FUN 36
-
#endif
/* arch/powerpc/lib/crtsavres.S continues */