diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2011-09-19 21:05:30 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2011-09-19 21:05:30 +0000 |
commit | 5a2beec0ed09fd14396be0e3f56d5ad2ad599780 (patch) | |
tree | 90f39f2f1a3ca9aca23e1b40e248c7e59e537b37 /lib/csu | |
parent | 88a0a713bca6e63cf4199ebd1af80c4933416c77 (diff) |
Use long calls like we do on hppa, otherwise the function we want to call
might be unreachable.
Diffstat (limited to 'lib/csu')
-rw-r--r-- | lib/csu/hppa64/md_init.h | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/lib/csu/hppa64/md_init.h b/lib/csu/hppa64/md_init.h index 4f73b6d2b6e..0cbb0b7464d 100644 --- a/lib/csu/hppa64/md_init.h +++ b/lib/csu/hppa64/md_init.h @@ -1,4 +1,4 @@ -/* $OpenBSD: md_init.h,v 1.2 2011/04/20 14:33:27 jsing Exp $ */ +/* $OpenBSD: md_init.h,v 1.3 2011/09/19 21:05:29 kettenis Exp $ */ /* * Copyright (c) 2003 Dale Rahn. All rights reserved. @@ -26,10 +26,17 @@ #define MD_SECT_CALL_FUNC(section, func) \ - __asm (".section "#section",\"ax\",@progbits \n" \ - " bl " #func ",%r2 \n" \ - " std %r19,-80(%r30) \n" \ - " ldd -80(%r30),%r19 \n" \ + __asm (".section .rodata \n" \ + " .align 8 \n" \ + "L$" #func " \n" \ + " .dword "#func " \n" \ + " .previous \n" \ + " .section "#section",\"ax\",@progbits \n" \ + " addil LR'L$" #func "-$global$, %dp \n" \ + " ldd RR'L$" #func "-$global$(%r1), %r1\n" \ + " bve,l (%r1), %rp \n" \ + " std %dp,-80(%sp) \n" \ + " ldd -80(%sp),%dp \n" \ " .previous") #define MD_SECTION_PROLOGUE(sect, entry_pt) \ |