diff options
author | Carlos O'Donell <carlos@systemhalted.org> | 2014-04-29 03:08:48 -0400 |
---|---|---|
committer | Carlos O'Donell <carlos@systemhalted.org> | 2014-04-29 04:20:39 -0400 |
commit | 5abebba403181de898bbea4ee1bcce5f088c663b (patch) | |
tree | 0c4a8eac85e1f2db87621b524bfcbdeb24c2c8f9 /sysdeps/hppa/bits | |
parent | 4e4a58f4ee45cea6f3083af8f12d3834bb999555 (diff) | |
download | glibc-5abebba403181de898bbea4ee1bcce5f088c663b.tar.gz |
Relocate hppa from ports to libc.
Diffstat (limited to 'sysdeps/hppa/bits')
-rw-r--r-- | sysdeps/hppa/bits/endian.h | 7 | ||||
-rw-r--r-- | sysdeps/hppa/bits/link.h | 56 | ||||
-rw-r--r-- | sysdeps/hppa/bits/linkmap.h | 6 | ||||
-rw-r--r-- | sysdeps/hppa/bits/setjmp.h | 60 |
4 files changed, 129 insertions, 0 deletions
diff --git a/sysdeps/hppa/bits/endian.h b/sysdeps/hppa/bits/endian.h new file mode 100644 index 0000000000..585db0c0fa --- /dev/null +++ b/sysdeps/hppa/bits/endian.h @@ -0,0 +1,7 @@ +/* hppa1.1 big-endian. */ + +#ifndef _ENDIAN_H +# error "Never use <bits/endian.h> directly; include <endian.h> instead." +#endif + +#define __BYTE_ORDER __BIG_ENDIAN diff --git a/sysdeps/hppa/bits/link.h b/sysdeps/hppa/bits/link.h new file mode 100644 index 0000000000..fa6e1ebe70 --- /dev/null +++ b/sysdeps/hppa/bits/link.h @@ -0,0 +1,56 @@ +/* Copyright (C) 2005-2014 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library. If not, see + <http://www.gnu.org/licenses/>. */ + +#ifndef _LINK_H +# error "Never include <bits/link.h> directly; use <link.h> instead." +#endif + +/* Registers for entry into PLT on hppa. */ +typedef struct La_hppa_regs +{ + uint32_t lr_reg[4]; + double lr_fpreg[4]; + uint32_t lr_sp; + uint32_t lr_ra; +} La_hppa_regs; + +/* Return values for calls from PLT on hppa. */ +typedef struct La_hppa_retval +{ + uint32_t lrv_r28; + uint32_t lrv_r29; + double lr_fr4; +} La_hppa_retval; + + +__BEGIN_DECLS + +extern Elf32_Addr la_hppa_gnu_pltenter (Elf32_Sym *__sym, unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + La_hppa_regs *__regs, + unsigned int *__flags, + const char *__symname, + long int *__framesizep); +extern unsigned int la_hppa_gnu_pltexit (Elf32_Sym *__sym, unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + const La_hppa_regs *__inregs, + La_hppa_retval *__outregs, + const char *symname); + +__END_DECLS diff --git a/sysdeps/hppa/bits/linkmap.h b/sysdeps/hppa/bits/linkmap.h new file mode 100644 index 0000000000..54842b2299 --- /dev/null +++ b/sysdeps/hppa/bits/linkmap.h @@ -0,0 +1,6 @@ +/* Used to store the function descriptor table */ +struct link_map_machine + { + size_t fptr_table_len; + ElfW(Addr) *fptr_table; + }; diff --git a/sysdeps/hppa/bits/setjmp.h b/sysdeps/hppa/bits/setjmp.h new file mode 100644 index 0000000000..9a404e7c1e --- /dev/null +++ b/sysdeps/hppa/bits/setjmp.h @@ -0,0 +1,60 @@ +/* Copyright (C) 2000-2014 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library. If not, see + <http://www.gnu.org/licenses/>. */ + +/* Define the machine-dependent type `jmp_buf'. HPPA version. */ +#ifndef _BITS_SETJMP_H +#define _BITS_SETJMP_H 1 + +#if !defined _SETJMP_H && !defined _PTHREAD_H +# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead." +#endif + +#ifndef _ASM +/* The entire jump buffer must be 168 bytes long and laid + out in exactly as follows for ABI consistency. + * 20 x 32-bit gprs, with 8-bytes of padding, arranged so: + - r3 (callee saves) + - 4 bytes of padding. + - r4-r18 (callee saves) + - r19 (PIC register) + - r27 (static link register) + - r30 (stcack pointer) + - r2 (return pointer) + - 4 bytes of padding. + * 10 x 64-bit fprs in this order: + - fr12-fr21 (callee saves) + Note: We have 8 bytes of free space for future uses. */ +typedef union + { + struct __jmp_buf_internal_tag + { + int __r3; + int __pad0; + int __r4_r18[15]; + int __r19; + int __r27; + int __sp; + int __rp; + int __pad1; + double __fr12_fr21[10]; + } __jmp_buf; + /* Legacy definition. Ensures double alignment for fpsrs. */ + double __align[21]; + } __jmp_buf[1]; +#endif + +#endif /* bits/setjmp.h */ |