Le 22/02/2022 à 17:40, Segher Boessenkool a écrit :
On Tue, Feb 22, 2022 at 02:02:36PM +0000, Christophe Leroy wrote:
Le 21/02/2022 à 23:25, Segher Boessenkool a écrit :
The actual code you are removing:
#define _GLOBAL(n) \ .text; \ .stabs __stringify(n:F-1),N_FUN,0,0,n;\ .globl n; \ n:
The STABS means this is an externally visible function called <n>, with return type -1 (which means unspecified afaics), and it has entry point <n> as well.
All of this is already made clear to the debugger by the .globl :-)
So the patch is fine. But once again, this code is not in Linux, if it ever was there! It seems to be a coincidence that PowerPC Linux is removing its STABS remnants at about this same time :-)
Linux kernel's commit 12318163737c ("powerpc/32: Remove remaining .stabs annotations") contains the following hunk:
(That isn't in linux.git yet fwiw).
diff --git a/arch/powerpc/include/asm/ppc_asm.h b/arch/powerpc/include/asm/ppc_asm.h index f21e6bde17a1..c4b074263bf9 100644 --- a/arch/powerpc/include/asm/ppc_asm.h +++ b/arch/powerpc/include/asm/ppc_asm.h @@ -208,7 +208,6 @@ GLUE(.,name): n:
#define _GLOBAL(n) \
- .stabs __stringify(n:F-1),N_FUN,0,0,n;\ .globl n; \ n:
Ah! I was looking for {libgcc/,}crtsavres.S and not finding anything :-) Thanks for the clarification. That commit also removes the N_SO entries, which might be more crucial when trying to debug this code, might need some DWARF replacement (to find the source code to this).
I see that Linux's crtsavres.S (arch/powerpc/lib/crtsavres.S) has the following line:
.file "crtsavres.S"
Does this needs to be added to all .S files ? Is it enough to have the file name, isn't the path (relative to kernel source base ?) needed as well ?
Christophe