From 266227abcba4f70af3a2f4cbc34384ee498a3a50 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 29 Mar 2003 19:20:17 +0000 Subject: Update. 2003-03-27 David Mosberger * sysdeps/ia64/dl-machine.h (RTLD_START): Wrap ".save rp, r0" directive into empty .prologue region to ensure that call-chain is terminated even for the first instruction. * sysdeps/ia64/elf/start.S (_start): Use ".save rp, r0" idiom to terminate call-chain right from the get-go. * sysdeps/unix/sysv/linux/ia64/fork.S (fork): Remove unnecessary stop bit between compare & branch. --- sysdeps/ia64/dl-machine.h | 8 ++++++-- sysdeps/ia64/elf/start.S | 6 ++++-- 2 files changed, 10 insertions(+), 4 deletions(-) (limited to 'sysdeps/ia64') diff --git a/sysdeps/ia64/dl-machine.h b/sysdeps/ia64/dl-machine.h index be09ae81e6..d3cc0ca210 100644 --- a/sysdeps/ia64/dl-machine.h +++ b/sysdeps/ia64/dl-machine.h @@ -301,8 +301,10 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) "_start:\n" \ "0: { .mii\n" \ " .prologue\n" \ -" .save ar.pfs, r32\n" \ " .save rp, r0\n" \ +" .body\n" \ +" .prologue\n" \ +" .save ar.pfs, r32\n" \ " alloc loc0 = ar.pfs, 0, 3, 4, 0\n" \ " .body\n" \ " mov r2 = ip\n" \ @@ -332,8 +334,10 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) " .proc _dl_start_user#\n" \ "_dl_start_user:\n" \ " .prologue\n" \ -" .save ar.pfs, r32\n" \ " .save rp, r0\n" \ +" .body\n" \ +" .prologue\n" \ +" .save ar.pfs, r32\n" \ " .body\n" \ " { .mii\n" \ " /* Save the pointer to the user entry point fptr in loc2. */\n" \ diff --git a/sysdeps/ia64/elf/start.S b/sysdeps/ia64/elf/start.S index a05ddfbb52..18eaf8eae4 100644 --- a/sysdeps/ia64/elf/start.S +++ b/sysdeps/ia64/elf/start.S @@ -39,6 +39,9 @@ .proc _start .type _start,@function _start: + .prologue + .save rp, r0 + .body .prologue { .mlx alloc r2 = ar.pfs,0,0,7,0 @@ -76,8 +79,7 @@ _start: { .mmi ld8 out3 = [out3] /* pointer to `init' function descriptor */ ld8 out4 = [out4] /* pointer to `fini' function descriptor */ - .save rp, r4 - mov r4 = r0 /* terminate unwind chain with a NULL return-pointer */ + nop 0 } .body { .mib -- cgit 1.4.1