GNU Binutils with patches for OS216
修訂 | 82d97e5597357bd5b45517bec1a5f10041e7470a (tree) |
---|---|
時間 | 2003-06-07 09:16:57 |
作者 | Jim Blandy <jimb@code...> |
Commiter | Jim Blandy |
* ppc-linux-tdep.c (ppc64_call_dummy_address): New function.
(ppc_linux_init_abi): Set it as the gdbarch's call_dummy_address
method.
@@ -1,5 +1,9 @@ | ||
1 | 1 | 2003-06-06 Jim Blandy <jimb@redhat.com> |
2 | 2 | |
3 | + * ppc-linux-tdep.c (ppc64_call_dummy_address): New function. | |
4 | + (ppc_linux_init_abi): Set it as the gdbarch's call_dummy_address | |
5 | + method. | |
6 | + | |
3 | 7 | * ppc-linux-tdep.c (ppc64_desc_entry_point): New function. |
4 | 8 | (ppc64_standard_linkage_target): Use it. |
5 | 9 |
@@ -893,6 +893,18 @@ ppc64_skip_trampoline_code (CORE_ADDR pc) | ||
893 | 893 | } |
894 | 894 | |
895 | 895 | |
896 | +/* On 64-bit PowerPC Linux, the ELF header's e_entry field is the | |
897 | + address of a function descriptor for the entry point function, not | |
898 | + the actual entry point itself. So to find the actual address at | |
899 | + which execution should begin, we need to fetch the function's entry | |
900 | + point from that descriptor. */ | |
901 | +static CORE_ADDR | |
902 | +ppc64_call_dummy_address (void) | |
903 | +{ | |
904 | + return ppc64_desc_entry_point (entry_point_address ()); | |
905 | +} | |
906 | + | |
907 | + | |
896 | 908 | enum { |
897 | 909 | ELF_NGREG = 48, |
898 | 910 | ELF_NFPREG = 33, |
@@ -1014,6 +1026,8 @@ ppc_linux_init_abi (struct gdbarch_info info, | ||
1014 | 1026 | |
1015 | 1027 | if (tdep->wordsize == 8) |
1016 | 1028 | { |
1029 | + set_gdbarch_call_dummy_address (gdbarch, ppc64_call_dummy_address); | |
1030 | + | |
1017 | 1031 | set_gdbarch_in_solib_call_trampoline |
1018 | 1032 | (gdbarch, ppc64_in_solib_call_trampoline); |
1019 | 1033 | set_gdbarch_skip_trampoline_code (gdbarch, ppc64_skip_trampoline_code); |