]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* ppc-linux-tdep.c (ppc64_call_dummy_address): New function.
authorJim Blandy <jimb@codesourcery.com>
Sat, 7 Jun 2003 00:16:57 +0000 (00:16 +0000)
committerJim Blandy <jimb@codesourcery.com>
Sat, 7 Jun 2003 00:16:57 +0000 (00:16 +0000)
(ppc_linux_init_abi): Set it as the gdbarch's call_dummy_address
method.

gdb/ChangeLog
gdb/ppc-linux-tdep.c

index e053db752b2e69665ea3d31b2cef5932c91f814d..a8b150faa9970f1c9ef75d6b166fcbef0d9ff1e8 100644 (file)
@@ -1,5 +1,9 @@
 2003-06-06  Jim Blandy  <jimb@redhat.com>
 
+       * ppc-linux-tdep.c (ppc64_call_dummy_address): New function.
+       (ppc_linux_init_abi): Set it as the gdbarch's call_dummy_address
+       method.
+
        * ppc-linux-tdep.c (ppc64_desc_entry_point): New function.
        (ppc64_standard_linkage_target): Use it.
 
index 900a8d91ee0e90e39acebb680f492dfb86d2017d..78c90fdb1554393c0bbf3893ad84bd9ae1833564 100644 (file)
@@ -893,6 +893,18 @@ ppc64_skip_trampoline_code (CORE_ADDR pc)
 }
 
 
+/* On 64-bit PowerPC Linux, the ELF header's e_entry field is the
+   address of a function descriptor for the entry point function, not
+   the actual entry point itself.  So to find the actual address at
+   which execution should begin, we need to fetch the function's entry
+   point from that descriptor.  */
+static CORE_ADDR
+ppc64_call_dummy_address (void)
+{
+  return ppc64_desc_entry_point (entry_point_address ());
+}
+
+
 enum {
   ELF_NGREG = 48,
   ELF_NFPREG = 33,
@@ -1014,6 +1026,8 @@ ppc_linux_init_abi (struct gdbarch_info info,
   
   if (tdep->wordsize == 8)
     {
+      set_gdbarch_call_dummy_address (gdbarch, ppc64_call_dummy_address);
+
       set_gdbarch_in_solib_call_trampoline
         (gdbarch, ppc64_in_solib_call_trampoline);
       set_gdbarch_skip_trampoline_code (gdbarch, ppc64_skip_trampoline_code);