diff options
author | Kurt Miller <kurt@cvs.openbsd.org> | 2008-10-17 01:10:48 +0000 |
---|---|---|
committer | Kurt Miller <kurt@cvs.openbsd.org> | 2008-10-17 01:10:48 +0000 |
commit | c4fb0e9f47340ee63def31d3a8ac385bcc8f71f6 (patch) | |
tree | c8b8fcb5ee1ad98eb0388e11d34a8809a09b715c /lib/csu/hppa | |
parent | fe835a6c9c9a9258f094308cb1dbe43e2bd5c2fd (diff) |
adjust asm to be pic compatible. okay kettenis@
Diffstat (limited to 'lib/csu/hppa')
-rw-r--r-- | lib/csu/hppa/crt0.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/csu/hppa/crt0.c b/lib/csu/hppa/crt0.c index d5b42b3a735..c47c2aaa5f7 100644 --- a/lib/csu/hppa/crt0.c +++ b/lib/csu/hppa/crt0.c @@ -1,4 +1,4 @@ -/* $OpenBSD: crt0.c,v 1.11 2005/08/04 16:33:05 espie Exp $ */ +/* $OpenBSD: crt0.c,v 1.12 2008/10/17 01:10:47 kurt Exp $ */ /* * Copyright (c) 2001 Michael Shalayeff @@ -75,10 +75,13 @@ __asm( ".proc\n\t" ".callinfo frame=0, calls\n\t" ".entry\n\t" - "ldil L%$global$, %r27\n\t" + "bl L$lpc, %r27\n\t" + "depi 0, 31, 2, %r27\n\t" +"L$lpc: addil L'$global$ - ($PIC_pcrel$0 - 8), %r27\n\t" + "ldo R'$global$ - ($PIC_pcrel$0 - 12)(%r1),%r27\n\t" ".call\n\t" "b ___start\n\t" - "ldo R%$global$(%r27), %r27\n\t" + "copy %r27, %r19\n\t" ".exit\n\t" ".procend\n\t"); |