diff options
author | Jakub Jelinek <jakub@redhat.com> | 2004-01-23 18:32:16 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2004-01-23 18:32:16 +0100 |
commit | 02731d29bed36e8a4b2e29ecb9ce8bbba5a27ace (patch) | |
tree | 69217cf85354fc3dea053bd54868f93c845f5e30 /gcc | |
parent | 0a944ef648a5d7cab40f741d7a4491904f200936 (diff) | |
download | gcc-02731d29bed36e8a4b2e29ecb9ce8bbba5a27ace.zip gcc-02731d29bed36e8a4b2e29ecb9ce8bbba5a27ace.tar.gz gcc-02731d29bed36e8a4b2e29ecb9ce8bbba5a27ace.tar.bz2 |
linux64.h (MD_FALLBACK_FRAME_STATE_FOR): Corrected to handle kernels with changed ucontext.
* config/rs6000/linux64.h (MD_FALLBACK_FRAME_STATE_FOR)
[!__powerpc64__]: Corrected to handle kernels with changed ucontext.
* include/powerpc-signal.h: Add #ifndef __powerpc64__ around the
header. For __powerpc64__ provide the default-signal.h definitions
for now.
* include/x86_64-signal.h [!__x86_64__]: Include java-signal-aux.h
instead of the dummy definitions.
* configure.host (x86_64-*): Remove CHECKREFSPEC, add DIVIDESPEC.
(powerpc64*-*): Remove with_libffi_default.
Only add -mminimal-toc for 64-bit compilations.
* configure.in: Use powerpc-signal.h on powerpc64 as well.
(x86_64-*-linux*): Set SIGNAL_HANDLER_AUX.
Link SIGNAL_HANDLER_AUX to include/java-signal-aux.h.
* configure: Rebuilt.
From-SVN: r76437
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/rs6000/linux64.h | 26 |
2 files changed, 22 insertions, 9 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 20e4249..f71af42 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2004-01-21 Jakub Jelinek <jakub@redhat.com> + + * config/rs6000/linux64.h (MD_FALLBACK_FRAME_STATE_FOR) + [!__powerpc64__]: Corrected to handle kernels with changed ucontext. + 2004-01-23 Eric Botcazou <ebotcazou@act-europe.fr> Olivier Hainque <hainque@act-europe.fr> diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h index d36aef4..560795e 100644 --- a/gcc/config/rs6000/linux64.h +++ b/gcc/config/rs6000/linux64.h @@ -550,13 +550,27 @@ while (0) #ifdef IN_LIBGCC2 #include <signal.h> +#ifdef __powerpc64__ #include <sys/ucontext.h> -#ifdef __powerpc64__ enum { SIGNAL_FRAMESIZE = 128 }; + #else + +/* During the 2.5 kernel series the kernel ucontext was changed, but + the new layout is compatible with the old one, so we just define + and use the old one here for simplicity and compatibility. */ + +struct kernel_old_ucontext { + unsigned long uc_flags; + struct ucontext *uc_link; + stack_t uc_stack; + struct sigcontext_struct uc_mcontext; + sigset_t uc_sigmask; +}; enum { SIGNAL_FRAMESIZE = 64 }; #endif + #endif #ifdef __powerpc64__ @@ -674,7 +688,7 @@ enum { SIGNAL_FRAMESIZE = 64 }; struct siginfo *pinfo; \ void *puc; \ struct siginfo info; \ - struct ucontext uc; \ + struct kernel_old_ucontext uc; \ } *rt_ = (CONTEXT)->cfa; \ sc_ = &rt_->uc.uc_mcontext; \ } \ @@ -698,15 +712,9 @@ enum { SIGNAL_FRAMESIZE = 64 }; (FS)->regs.reg[LINK_REGISTER_REGNUM].loc.offset \ = (long)&(sc_->regs->link) - new_cfa_; \ \ - /* The unwinder expects the IP to point to the following insn, \ - whereas the kernel returns the address of the actual \ - faulting insn. We store NIP+4 in an unused register slot to \ - get the same result for multiple evaluation of the same signal \ - frame. */ \ - sc_->regs->gpr[47] = sc_->regs->nip + 4; \ (FS)->regs.reg[CR0_REGNO].how = REG_SAVED_OFFSET; \ (FS)->regs.reg[CR0_REGNO].loc.offset \ - = (long)&(sc_->regs->gpr[47]) - new_cfa_; \ + = (long)&(sc_->regs->nip) - new_cfa_; \ (FS)->retaddr_column = CR0_REGNO; \ goto SUCCESS; \ } while (0) |