gdb fix elfv1 Powerpc gdb.dwarf2/frame-inlined-in-outer-frame.exp
authorCarl Love <cel@us.ibm.com>
Wed, 8 Dec 2021 18:37:13 +0000 (12:37 -0600)
committerCarl Love <cel@us.ibm.com>
Thu, 9 Dec 2021 19:01:52 +0000 (13:01 -0600)
On ELFv1, the _start symbol must point to the *function descriptor* (in
the .opd section), not to the function code (in the .text section) like
with ELFv2 and other architectures.

gdb/testsuite/gdb.dwarf2/frame-inlined-in-outer-frame.S

index 224b50b20a5aaccc11820d2f0bf7138fc3cc25c2..112788a344050bd5d442636c0f79bc2e20209766 100644 (file)
 #if defined __powerpc64__
 #  if _CALL_ELF == 2
 .abiversion 2   /* Tell gdb what ELF version to use. */
+.global _start
+_start:
 #  else
 .abiversion 1   /* Tell gdb what ELF version to use. */
 .align 2
+.global _start
 .section ".opd", "aw"
 .align 3
+_start:
 .quad ._start,.TOC.@tocbase,0
 .previous
 .type ._start,@function
 ._start:
 #  endif
-#endif
+#else
 .global _start
 _start:
+#endif
 .cfi_startproc
 
 /* State that the return address for this frame is undefined. */