This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: PATCH: Fix trampolines on PA on 32 bit machines


  In message <200109221855.f8MIt1fG023581@hiauly1.hia.nrc.ca>you write:
  > This fixes a problem noted with the HP assembler involving calling
  > nested functions indirectly.  It turns out that the HP assembler and
  > linker conspire together to change calls to $$dyncall to $$dyncall_external
  > .
  > The assembler does this by setting R_RESERVED in the relocation data
  > for $$dyncall.  Yikes!
  > 
  > The current trampoline implementation uses an indirect call to the
  > trampoline on the stack without a plabel.  $$dyncall checks to see
  > if a plabel is being used for the indirect call while $$dyncall_external
  > doesn't.  $$dyncall_external assumes that a plabel is being used.
  > 
  > This patch adds a plabel to the trampoline and initializes it accordingly.
  > I think it now should be possible to call a nested function indirectly
  > from a shared library.  Note this is only for non 64 bit machines.
  > 
  > Bootstrap checked with no regressions on hppa1.1-hp-hpux10.20.
  > 
  > OK?
  > 
  > Dave
  > -- 
  > J. David Anglin                                  dave.anglin@nrc.ca
  > National Research Council of Canada              (613) 990-0752 (FAX: 952-6
  > 605)
  > 
  > 2001-09-14  John David Anglin  <dave@hiauly1.hia.nrc.ca>
  > 
  > 	* pa.h (TRAMPOLINE_TEMPLATE): Add two words to the template for
  > 	non 64-bit machines.  Use these as a plabel for the trampoline.
  > 	(TRAMPOLINE_SIZE): Adjust size for new words.
  > 	(INITIALIZE_TRAMPOLINE): Initialize new words.
  > 	(TRAMPOLINE_ADJUST_ADDRESS): New.  Adjust address to make it a
  > 	pointer to the plabel in the trampoline.
Approved.  Please install.
jeff


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]