mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-28 18:10:46 +00:00
* hppa-tdep.c (hppa_fix_call_dummy): If FUN is a procedure label,
then gets its real address into FUN and its GOT/DP value into %r19.
* tm-hppa.h (CALL_DUMMY): Use %r20, not %r19 as a temporary.
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
Tue Apr 5 15:29:25 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
|
||||
|
||||
* hppa-tdep.c (hppa_fix_call_dummy): If FUN is a procedure label,
|
||||
then gets its real address into FUN and its GOT/DP value into %r19.
|
||||
|
||||
* tm-hppa.h (CALL_DUMMY): Use %r20, not %r19 as a temporary.
|
||||
|
||||
* hppa-tdep.c (frameless_function_invocation): If no unwind
|
||||
descriptor was found, then assume this was not a frameless
|
||||
function invocation.
|
||||
|
||||
@@ -344,8 +344,8 @@ call_dummy
|
||||
ldsid (0,r22), r4
|
||||
ldil 0, r1 ; _sr4export will be placed here.
|
||||
ldo 0(r1), r1
|
||||
ldsid (0,r1), r19
|
||||
combt,=,n r3, r19, text_space ; If target is in data space, do a
|
||||
ldsid (0,r1), r20
|
||||
combt,=,n r3, r20, text_space ; If target is in data space, do a
|
||||
ble 0(sr5, r22) ; "normal" procedure call
|
||||
copy r31, r2
|
||||
break 4, 8
|
||||
@@ -388,7 +388,7 @@ text_space ; Otherwise, go through _sr4export,
|
||||
#define CALL_DUMMY {0x4BDA3FB9, 0x4BD93FB1, 0x4BD83FA9, 0x4BD73FA1,\
|
||||
0x37C13FB9, 0x24201004, 0x2C391005, 0x24311006,\
|
||||
0x2C291007, 0x22C00000, 0x36D60000, 0x02C010A4,\
|
||||
0x20200000, 0x34210000, 0x002010b3, 0x82642022,\
|
||||
0x20200000, 0x34210000, 0x002010b4, 0x82832022,\
|
||||
0xe6c06000, 0x081f0242, 0x00010004, 0x00151820,\
|
||||
0xe6c00002, 0xe4202000, 0x6bdf3fd1, 0x00010004,\
|
||||
0x00151820, 0xe6c00002, 0x08000240, 0x08000240}
|
||||
|
||||
@@ -1074,6 +1074,20 @@ hppa_fix_call_dummy (dummy, pc, fun, nargs, args, type, gcc_p)
|
||||
|
||||
dyncall_addr = SYMBOL_VALUE_ADDRESS (msymbol);
|
||||
|
||||
/* FUN could be a procedure label, in which case we have to get
|
||||
its real address and the value of its GOT/DP. */
|
||||
if (fun & 0x2)
|
||||
{
|
||||
/* Get the GOT/DP value for the target function. It's
|
||||
at *(fun+4). Note the call dummy is *NOT* allowed to
|
||||
trash %r19 before calling the target function. */
|
||||
write_register (19, read_memory_integer ((fun & ~0x3) + 4, 4));
|
||||
|
||||
/* Now get the real address for the function we are calling, it's
|
||||
at *fun. */
|
||||
fun = (CORE_ADDR) read_memory_integer (fun & ~0x3, 4);
|
||||
}
|
||||
|
||||
/* If we are calling an import stub (eg calling into a dynamic library)
|
||||
then have sr4export call the magic __d_plt_call routine which is linked
|
||||
in from end.o. (You can't use _sr4export to call the import stub as
|
||||
|
||||
Reference in New Issue
Block a user