| 1 |
/* |
| 2 |
* libhugetlbfs - Easy use of Linux hugepages |
| 3 |
* Copyright (C) 2007 David Gibson, IBM Corporation. |
| 4 |
* |
| 5 |
* Based on code from the GNU C Library, Copyright Free Software Foundation, Inc. |
| 6 |
* |
| 7 |
* This library is free software; you can redistribute it and/or |
| 8 |
* modify it under the terms of the GNU Lesser General Public License |
| 9 |
* as published by the Free Software Foundation; either version 2.1 of |
| 10 |
* the License, or (at your option) any later version. |
| 11 |
* |
| 12 |
* This library is distributed in the hope that it will be useful, but |
| 13 |
* WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 15 |
* Lesser General Public License for more details. |
| 16 |
* |
| 17 |
* You should have received a copy of the GNU Lesser General Public |
| 18 |
* License along with this library; if not, write to the Free Software |
| 19 |
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 20 |
*/ |
| 21 |
|
| 22 |
.text |
| 23 |
#if _CALL_ELF != 2 |
| 24 |
.align 2 |
| 25 |
.globl direct_syscall |
| 26 |
.globl .direct_syscall |
| 27 |
.section ".opd","aw" |
| 28 |
direct_syscall: |
| 29 |
.quad .direct_syscall |
| 30 |
.quad .TOC.@tocbase |
| 31 |
.quad 0 |
| 32 |
.previous |
| 33 |
.type .direct_syscall,@function |
| 34 |
.direct_syscall: |
| 35 |
#else |
| 36 |
.globl direct_syscall |
| 37 |
.type direct_syscall,@function |
| 38 |
direct_syscall: |
| 39 |
#endif |
| 40 |
mr 0,3 |
| 41 |
mr 3,4 |
| 42 |
mr 4,5 |
| 43 |
mr 5,6 |
| 44 |
mr 6,7 |
| 45 |
mr 7,8 |
| 46 |
mr 8,9 |
| 47 |
sc |
| 48 |
blr |
| 49 |
|
| 50 |
#if defined(__linux__) && defined(__ELF__) |
| 51 |
.section .note.GNU-stack,"",%progbits |
| 52 |
#endif |