From c28eb6c2947ce079b782ee537d43b3639ba5a251 Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Wed, 19 Feb 1997 17:13:15 -0700 Subject: [PATCH] pa-hpux10.h (MD_EXEC_PREFIX): Define appropriately for hpux10. * pa/pa-hpux10.h (MD_EXEC_PREFIX): Define appropriately for hpux10. (MD_STARTFILE_PREFIX): Similarly. * pa/pa.c (return_addr_rtx): Add some comments about cases it doesn't handle correctly. * pa/pa.h (ASM_OUTPUT_SECTION_NAME): Surround the section name with '$' if not using GAS. From-SVN: r13667 --- gcc/config/pa/pa-hpux10.h | 16 ++++++++++++++++ gcc/config/pa/pa.c | 23 ++++++++++++++++++++++- 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/gcc/config/pa/pa-hpux10.h b/gcc/config/pa/pa-hpux10.h index 730f65e7281..1c57d5ee6ea 100644 --- a/gcc/config/pa/pa-hpux10.h +++ b/gcc/config/pa/pa-hpux10.h @@ -53,3 +53,19 @@ do { \ output_file_directive ((FILE), main_input_filename); \ } while (0) +/* Under hpux10, the normal location of the `ld' and `as' programs is the + /usr/ccs/bin directory. */ + +#ifndef CROSS_COMPILE +#undef MD_EXEC_PREFIX +#define MD_EXEC_PREFIX "/usr/ccs/bin/" +#endif + +/* Under hpux10, the normal location of the various *crt*.o files is the + /usr/ccs/lib directory. */ + +#ifndef CROSS_COMPILE +#undef MD_STARTFILE_PREFIX +#define MD_STARTFILE_PREFIX "/usr/ccs/lib/" +#endif + diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c index 1d9100498cc..3ed113b9805 100644 --- a/gcc/config/pa/pa.c +++ b/gcc/config/pa/pa.c @@ -3038,7 +3038,28 @@ hppa_expand_epilogue () the current frame, after the prologue. FRAMEADDR is the frame pointer of the COUNT frame. - We want to ignore any export stub remnants here. */ + We want to ignore any export stub remnants here. + + The value returned is used in two different ways: + + 1. To find a function's caller. + + 2. To change the return address for a function. + + This function handles most instances of case 1; however, it will + fail if there are two levels of stubs to execute on the return + path. The only way I believe that can happen is if the return value + needs a parameter relocation, which never happens for C code. + + This function handles most instances of case 2; however, it will + fail if we did not originally have stub code on the return path + but will need code on the new return path. This can happen if + the caller & callee are both in the main program, but the new + return location is in a shared library. + + To handle this correctly we need to set the return pointer at + frame-20 to point to a return stub frame-24 to point to the + location we wish to return to. */ rtx return_addr_rtx (count, frameaddr) -- 2.30.2