mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-27 02:25:20 +07:00
b24413180f
Many source files in the tree are missing licensing information, which makes it harder for compliance tools to determine the correct license. By default all files without license information are under the default license of the kernel, which is GPL version 2. Update the files which contain no license information with the 'GPL-2.0' SPDX license identifier. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This patch is based on work done by Thomas Gleixner and Kate Stewart and Philippe Ombredanne. How this work was done: Patches were generated and checked against linux-4.14-rc6 for a subset of the use cases: - file had no licensing information it it. - file was a */uapi/* one with no licensing information in it, - file was a */uapi/* one with existing licensing information, Further patches will be generated in subsequent months to fix up cases where non-standard license headers were used, and references to license had to be inferred by heuristics based on keywords. The analysis to determine which SPDX License Identifier to be applied to a file was done in a spreadsheet of side by side results from of the output of two independent scanners (ScanCode & Windriver) producing SPDX tag:value files created by Philippe Ombredanne. Philippe prepared the base worksheet, and did an initial spot review of a few 1000 files. The 4.13 kernel was the starting point of the analysis with 60,537 files assessed. Kate Stewart did a file by file comparison of the scanner results in the spreadsheet to determine which SPDX license identifier(s) to be applied to the file. She confirmed any determination that was not immediately clear with lawyers working with the Linux Foundation. Criteria used to select files for SPDX license identifier tagging was: - Files considered eligible had to be source code files. - Make and config files were included as candidates if they contained >5 lines of source - File already had some variant of a license header in it (even if <5 lines). All documentation files were explicitly excluded. The following heuristics were used to determine which SPDX license identifiers to apply. - when both scanners couldn't find any license traces, file was considered to have no license information in it, and the top level COPYING file license applied. For non */uapi/* files that summary was: SPDX license identifier # files ---------------------------------------------------|------- GPL-2.0 11139 and resulted in the first patch in this series. If that file was a */uapi/* path one, it was "GPL-2.0 WITH Linux-syscall-note" otherwise it was "GPL-2.0". Results of that was: SPDX license identifier # files ---------------------------------------------------|------- GPL-2.0 WITH Linux-syscall-note 930 and resulted in the second patch in this series. - if a file had some form of licensing information in it, and was one of the */uapi/* ones, it was denoted with the Linux-syscall-note if any GPL family license was found in the file or had no licensing in it (per prior point). Results summary: SPDX license identifier # files ---------------------------------------------------|------ GPL-2.0 WITH Linux-syscall-note 270 GPL-2.0+ WITH Linux-syscall-note 169 ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) 21 ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 17 LGPL-2.1+ WITH Linux-syscall-note 15 GPL-1.0+ WITH Linux-syscall-note 14 ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) 5 LGPL-2.0+ WITH Linux-syscall-note 4 LGPL-2.1 WITH Linux-syscall-note 3 ((GPL-2.0 WITH Linux-syscall-note) OR MIT) 3 ((GPL-2.0 WITH Linux-syscall-note) AND MIT) 1 and that resulted in the third patch in this series. - when the two scanners agreed on the detected license(s), that became the concluded license(s). - when there was disagreement between the two scanners (one detected a license but the other didn't, or they both detected different licenses) a manual inspection of the file occurred. - In most cases a manual inspection of the information in the file resulted in a clear resolution of the license that should apply (and which scanner probably needed to revisit its heuristics). - When it was not immediately clear, the license identifier was confirmed with lawyers working with the Linux Foundation. - If there was any question as to the appropriate license identifier, the file was flagged for further research and to be revisited later in time. In total, over 70 hours of logged manual review was done on the spreadsheet to determine the SPDX license identifiers to apply to the source files by Kate, Philippe, Thomas and, in some cases, confirmation by lawyers working with the Linux Foundation. Kate also obtained a third independent scan of the 4.13 code base from FOSSology, and compared selected files where the other two scanners disagreed against that SPDX file, to see if there was new insights. The Windriver scanner is based on an older version of FOSSology in part, so they are related. Thomas did random spot checks in about 500 files from the spreadsheets for the uapi headers and agreed with SPDX license identifier in the files he inspected. For the non-uapi files Thomas did random spot checks in about 15000 files. In initial set of patches against 4.14-rc6, 3 files were found to have copy/paste license identifier errors, and have been fixed to reflect the correct identifier. Additionally Philippe spent 10 hours this week doing a detailed manual inspection and review of the 12,461 patched files from the initial patch version early this week with: - a full scancode scan run, collecting the matched texts, detected license ids and scores - reviewing anything where there was a license detected (about 500+ files) to ensure that the applied SPDX license was correct - reviewing anything where there was no detection but the patch license was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied SPDX license was correct This produced a worksheet with 20 files needing minor correction. This worksheet was then exported into 3 different .csv files for the different types of files to be modified. These .csv files were then reviewed by Greg. Thomas wrote a script to parse the csv files and add the proper SPDX tag to the file, in the format that the file expected. This script was further refined by Greg based on the output to detect more types of files automatically and to distinguish between header and source .c files (which need different comment types.) Finally Greg ran the script using the .csv files to generate the patches. Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com> Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
362 lines
14 KiB
C
362 lines
14 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef __ASMPARISC_ELF_H
|
|
#define __ASMPARISC_ELF_H
|
|
|
|
/*
|
|
* ELF register definitions..
|
|
*/
|
|
|
|
#include <asm/ptrace.h>
|
|
|
|
#define EM_PARISC 15
|
|
|
|
/* HPPA specific definitions. */
|
|
|
|
/* Legal values for e_flags field of Elf32_Ehdr. */
|
|
|
|
#define EF_PARISC_TRAPNIL 0x00010000 /* Trap nil pointer dereference. */
|
|
#define EF_PARISC_EXT 0x00020000 /* Program uses arch. extensions. */
|
|
#define EF_PARISC_LSB 0x00040000 /* Program expects little endian. */
|
|
#define EF_PARISC_WIDE 0x00080000 /* Program expects wide mode. */
|
|
#define EF_PARISC_NO_KABP 0x00100000 /* No kernel assisted branch
|
|
prediction. */
|
|
#define EF_PARISC_LAZYSWAP 0x00400000 /* Allow lazy swapping. */
|
|
#define EF_PARISC_ARCH 0x0000ffff /* Architecture version. */
|
|
|
|
/* Defined values for `e_flags & EF_PARISC_ARCH' are: */
|
|
|
|
#define EFA_PARISC_1_0 0x020b /* PA-RISC 1.0 big-endian. */
|
|
#define EFA_PARISC_1_1 0x0210 /* PA-RISC 1.1 big-endian. */
|
|
#define EFA_PARISC_2_0 0x0214 /* PA-RISC 2.0 big-endian. */
|
|
|
|
/* Additional section indices. */
|
|
|
|
#define SHN_PARISC_ANSI_COMMON 0xff00 /* Section for tenatively declared
|
|
symbols in ANSI C. */
|
|
#define SHN_PARISC_HUGE_COMMON 0xff01 /* Common blocks in huge model. */
|
|
|
|
/* Legal values for sh_type field of Elf32_Shdr. */
|
|
|
|
#define SHT_PARISC_EXT 0x70000000 /* Contains product specific ext. */
|
|
#define SHT_PARISC_UNWIND 0x70000001 /* Unwind information. */
|
|
#define SHT_PARISC_DOC 0x70000002 /* Debug info for optimized code. */
|
|
|
|
/* Legal values for sh_flags field of Elf32_Shdr. */
|
|
|
|
#define SHF_PARISC_SHORT 0x20000000 /* Section with short addressing. */
|
|
#define SHF_PARISC_HUGE 0x40000000 /* Section far from gp. */
|
|
#define SHF_PARISC_SBP 0x80000000 /* Static branch prediction code. */
|
|
|
|
/* Legal values for ST_TYPE subfield of st_info (symbol type). */
|
|
|
|
#define STT_PARISC_MILLICODE 13 /* Millicode function entry point. */
|
|
|
|
#define STT_HP_OPAQUE (STT_LOOS + 0x1)
|
|
#define STT_HP_STUB (STT_LOOS + 0x2)
|
|
|
|
/* HPPA relocs. */
|
|
|
|
#define R_PARISC_NONE 0 /* No reloc. */
|
|
#define R_PARISC_DIR32 1 /* Direct 32-bit reference. */
|
|
#define R_PARISC_DIR21L 2 /* Left 21 bits of eff. address. */
|
|
#define R_PARISC_DIR17R 3 /* Right 17 bits of eff. address. */
|
|
#define R_PARISC_DIR17F 4 /* 17 bits of eff. address. */
|
|
#define R_PARISC_DIR14R 6 /* Right 14 bits of eff. address. */
|
|
#define R_PARISC_PCREL32 9 /* 32-bit rel. address. */
|
|
#define R_PARISC_PCREL21L 10 /* Left 21 bits of rel. address. */
|
|
#define R_PARISC_PCREL17R 11 /* Right 17 bits of rel. address. */
|
|
#define R_PARISC_PCREL17F 12 /* 17 bits of rel. address. */
|
|
#define R_PARISC_PCREL14R 14 /* Right 14 bits of rel. address. */
|
|
#define R_PARISC_DPREL21L 18 /* Left 21 bits of rel. address. */
|
|
#define R_PARISC_DPREL14R 22 /* Right 14 bits of rel. address. */
|
|
#define R_PARISC_GPREL21L 26 /* GP-relative, left 21 bits. */
|
|
#define R_PARISC_GPREL14R 30 /* GP-relative, right 14 bits. */
|
|
#define R_PARISC_LTOFF21L 34 /* LT-relative, left 21 bits. */
|
|
#define R_PARISC_LTOFF14R 38 /* LT-relative, right 14 bits. */
|
|
#define R_PARISC_SECREL32 41 /* 32 bits section rel. address. */
|
|
#define R_PARISC_SEGBASE 48 /* No relocation, set segment base. */
|
|
#define R_PARISC_SEGREL32 49 /* 32 bits segment rel. address. */
|
|
#define R_PARISC_PLTOFF21L 50 /* PLT rel. address, left 21 bits. */
|
|
#define R_PARISC_PLTOFF14R 54 /* PLT rel. address, right 14 bits. */
|
|
#define R_PARISC_LTOFF_FPTR32 57 /* 32 bits LT-rel. function pointer. */
|
|
#define R_PARISC_LTOFF_FPTR21L 58 /* LT-rel. fct ptr, left 21 bits. */
|
|
#define R_PARISC_LTOFF_FPTR14R 62 /* LT-rel. fct ptr, right 14 bits. */
|
|
#define R_PARISC_FPTR64 64 /* 64 bits function address. */
|
|
#define R_PARISC_PLABEL32 65 /* 32 bits function address. */
|
|
#define R_PARISC_PCREL64 72 /* 64 bits PC-rel. address. */
|
|
#define R_PARISC_PCREL22F 74 /* 22 bits PC-rel. address. */
|
|
#define R_PARISC_PCREL14WR 75 /* PC-rel. address, right 14 bits. */
|
|
#define R_PARISC_PCREL14DR 76 /* PC rel. address, right 14 bits. */
|
|
#define R_PARISC_PCREL16F 77 /* 16 bits PC-rel. address. */
|
|
#define R_PARISC_PCREL16WF 78 /* 16 bits PC-rel. address. */
|
|
#define R_PARISC_PCREL16DF 79 /* 16 bits PC-rel. address. */
|
|
#define R_PARISC_DIR64 80 /* 64 bits of eff. address. */
|
|
#define R_PARISC_DIR14WR 83 /* 14 bits of eff. address. */
|
|
#define R_PARISC_DIR14DR 84 /* 14 bits of eff. address. */
|
|
#define R_PARISC_DIR16F 85 /* 16 bits of eff. address. */
|
|
#define R_PARISC_DIR16WF 86 /* 16 bits of eff. address. */
|
|
#define R_PARISC_DIR16DF 87 /* 16 bits of eff. address. */
|
|
#define R_PARISC_GPREL64 88 /* 64 bits of GP-rel. address. */
|
|
#define R_PARISC_GPREL14WR 91 /* GP-rel. address, right 14 bits. */
|
|
#define R_PARISC_GPREL14DR 92 /* GP-rel. address, right 14 bits. */
|
|
#define R_PARISC_GPREL16F 93 /* 16 bits GP-rel. address. */
|
|
#define R_PARISC_GPREL16WF 94 /* 16 bits GP-rel. address. */
|
|
#define R_PARISC_GPREL16DF 95 /* 16 bits GP-rel. address. */
|
|
#define R_PARISC_LTOFF64 96 /* 64 bits LT-rel. address. */
|
|
#define R_PARISC_LTOFF14WR 99 /* LT-rel. address, right 14 bits. */
|
|
#define R_PARISC_LTOFF14DR 100 /* LT-rel. address, right 14 bits. */
|
|
#define R_PARISC_LTOFF16F 101 /* 16 bits LT-rel. address. */
|
|
#define R_PARISC_LTOFF16WF 102 /* 16 bits LT-rel. address. */
|
|
#define R_PARISC_LTOFF16DF 103 /* 16 bits LT-rel. address. */
|
|
#define R_PARISC_SECREL64 104 /* 64 bits section rel. address. */
|
|
#define R_PARISC_SEGREL64 112 /* 64 bits segment rel. address. */
|
|
#define R_PARISC_PLTOFF14WR 115 /* PLT-rel. address, right 14 bits. */
|
|
#define R_PARISC_PLTOFF14DR 116 /* PLT-rel. address, right 14 bits. */
|
|
#define R_PARISC_PLTOFF16F 117 /* 16 bits LT-rel. address. */
|
|
#define R_PARISC_PLTOFF16WF 118 /* 16 bits PLT-rel. address. */
|
|
#define R_PARISC_PLTOFF16DF 119 /* 16 bits PLT-rel. address. */
|
|
#define R_PARISC_LTOFF_FPTR64 120 /* 64 bits LT-rel. function ptr. */
|
|
#define R_PARISC_LTOFF_FPTR14WR 123 /* LT-rel. fct. ptr., right 14 bits. */
|
|
#define R_PARISC_LTOFF_FPTR14DR 124 /* LT-rel. fct. ptr., right 14 bits. */
|
|
#define R_PARISC_LTOFF_FPTR16F 125 /* 16 bits LT-rel. function ptr. */
|
|
#define R_PARISC_LTOFF_FPTR16WF 126 /* 16 bits LT-rel. function ptr. */
|
|
#define R_PARISC_LTOFF_FPTR16DF 127 /* 16 bits LT-rel. function ptr. */
|
|
#define R_PARISC_LORESERVE 128
|
|
#define R_PARISC_COPY 128 /* Copy relocation. */
|
|
#define R_PARISC_IPLT 129 /* Dynamic reloc, imported PLT */
|
|
#define R_PARISC_EPLT 130 /* Dynamic reloc, exported PLT */
|
|
#define R_PARISC_TPREL32 153 /* 32 bits TP-rel. address. */
|
|
#define R_PARISC_TPREL21L 154 /* TP-rel. address, left 21 bits. */
|
|
#define R_PARISC_TPREL14R 158 /* TP-rel. address, right 14 bits. */
|
|
#define R_PARISC_LTOFF_TP21L 162 /* LT-TP-rel. address, left 21 bits. */
|
|
#define R_PARISC_LTOFF_TP14R 166 /* LT-TP-rel. address, right 14 bits.*/
|
|
#define R_PARISC_LTOFF_TP14F 167 /* 14 bits LT-TP-rel. address. */
|
|
#define R_PARISC_TPREL64 216 /* 64 bits TP-rel. address. */
|
|
#define R_PARISC_TPREL14WR 219 /* TP-rel. address, right 14 bits. */
|
|
#define R_PARISC_TPREL14DR 220 /* TP-rel. address, right 14 bits. */
|
|
#define R_PARISC_TPREL16F 221 /* 16 bits TP-rel. address. */
|
|
#define R_PARISC_TPREL16WF 222 /* 16 bits TP-rel. address. */
|
|
#define R_PARISC_TPREL16DF 223 /* 16 bits TP-rel. address. */
|
|
#define R_PARISC_LTOFF_TP64 224 /* 64 bits LT-TP-rel. address. */
|
|
#define R_PARISC_LTOFF_TP14WR 227 /* LT-TP-rel. address, right 14 bits.*/
|
|
#define R_PARISC_LTOFF_TP14DR 228 /* LT-TP-rel. address, right 14 bits.*/
|
|
#define R_PARISC_LTOFF_TP16F 229 /* 16 bits LT-TP-rel. address. */
|
|
#define R_PARISC_LTOFF_TP16WF 230 /* 16 bits LT-TP-rel. address. */
|
|
#define R_PARISC_LTOFF_TP16DF 231 /* 16 bits LT-TP-rel. address. */
|
|
#define R_PARISC_HIRESERVE 255
|
|
|
|
#define PA_PLABEL_FDESC 0x02 /* bit set if PLABEL points to
|
|
* a function descriptor, not
|
|
* an address */
|
|
|
|
/* The following are PA function descriptors
|
|
*
|
|
* addr: the absolute address of the function
|
|
* gp: either the data pointer (r27) for non-PIC code or the
|
|
* the PLT pointer (r19) for PIC code */
|
|
|
|
/* Format for the Elf32 Function descriptor */
|
|
typedef struct elf32_fdesc {
|
|
__u32 addr;
|
|
__u32 gp;
|
|
} Elf32_Fdesc;
|
|
|
|
/* Format for the Elf64 Function descriptor */
|
|
typedef struct elf64_fdesc {
|
|
__u64 dummy[2]; /* FIXME: nothing uses these, why waste
|
|
* the space */
|
|
__u64 addr;
|
|
__u64 gp;
|
|
} Elf64_Fdesc;
|
|
|
|
#ifdef __KERNEL__
|
|
|
|
#ifdef CONFIG_64BIT
|
|
#define Elf_Fdesc Elf64_Fdesc
|
|
#else
|
|
#define Elf_Fdesc Elf32_Fdesc
|
|
#endif /*CONFIG_64BIT*/
|
|
|
|
#endif /*__KERNEL__*/
|
|
|
|
/* Legal values for p_type field of Elf32_Phdr/Elf64_Phdr. */
|
|
|
|
#define PT_HP_TLS (PT_LOOS + 0x0)
|
|
#define PT_HP_CORE_NONE (PT_LOOS + 0x1)
|
|
#define PT_HP_CORE_VERSION (PT_LOOS + 0x2)
|
|
#define PT_HP_CORE_KERNEL (PT_LOOS + 0x3)
|
|
#define PT_HP_CORE_COMM (PT_LOOS + 0x4)
|
|
#define PT_HP_CORE_PROC (PT_LOOS + 0x5)
|
|
#define PT_HP_CORE_LOADABLE (PT_LOOS + 0x6)
|
|
#define PT_HP_CORE_STACK (PT_LOOS + 0x7)
|
|
#define PT_HP_CORE_SHM (PT_LOOS + 0x8)
|
|
#define PT_HP_CORE_MMF (PT_LOOS + 0x9)
|
|
#define PT_HP_PARALLEL (PT_LOOS + 0x10)
|
|
#define PT_HP_FASTBIND (PT_LOOS + 0x11)
|
|
#define PT_HP_OPT_ANNOT (PT_LOOS + 0x12)
|
|
#define PT_HP_HSL_ANNOT (PT_LOOS + 0x13)
|
|
#define PT_HP_STACK (PT_LOOS + 0x14)
|
|
|
|
#define PT_PARISC_ARCHEXT 0x70000000
|
|
#define PT_PARISC_UNWIND 0x70000001
|
|
|
|
/* Legal values for p_flags field of Elf32_Phdr/Elf64_Phdr. */
|
|
|
|
#define PF_PARISC_SBP 0x08000000
|
|
|
|
#define PF_HP_PAGE_SIZE 0x00100000
|
|
#define PF_HP_FAR_SHARED 0x00200000
|
|
#define PF_HP_NEAR_SHARED 0x00400000
|
|
#define PF_HP_CODE 0x01000000
|
|
#define PF_HP_MODIFY 0x02000000
|
|
#define PF_HP_LAZYSWAP 0x04000000
|
|
#define PF_HP_SBP 0x08000000
|
|
|
|
/*
|
|
* The following definitions are those for 32-bit ELF binaries on a 32-bit
|
|
* kernel and for 64-bit binaries on a 64-bit kernel. To run 32-bit binaries
|
|
* on a 64-bit kernel, arch/parisc/kernel/binfmt_elf32.c defines these
|
|
* macros appropriately and then #includes binfmt_elf.c, which then includes
|
|
* this file.
|
|
*/
|
|
#ifndef ELF_CLASS
|
|
|
|
/*
|
|
* This is used to ensure we don't load something for the wrong architecture.
|
|
*
|
|
* Note that this header file is used by default in fs/binfmt_elf.c. So
|
|
* the following macros are for the default case. However, for the 64
|
|
* bit kernel we also support 32 bit parisc binaries. To do that
|
|
* arch/parisc/kernel/binfmt_elf32.c defines its own set of these
|
|
* macros, and then it includes fs/binfmt_elf.c to provide an alternate
|
|
* elf binary handler for 32 bit binaries (on the 64 bit kernel).
|
|
*/
|
|
#ifdef CONFIG_64BIT
|
|
#define ELF_CLASS ELFCLASS64
|
|
#else
|
|
#define ELF_CLASS ELFCLASS32
|
|
#endif
|
|
|
|
typedef unsigned long elf_greg_t;
|
|
|
|
/*
|
|
* This yields a string that ld.so will use to load implementation
|
|
* specific libraries for optimization. This is more specific in
|
|
* intent than poking at uname or /proc/cpuinfo.
|
|
*/
|
|
|
|
#define ELF_PLATFORM ("PARISC\0")
|
|
|
|
#define SET_PERSONALITY(ex) \
|
|
set_personality((current->personality & ~PER_MASK) | PER_LINUX); \
|
|
current->thread.map_base = DEFAULT_MAP_BASE; \
|
|
current->thread.task_size = DEFAULT_TASK_SIZE \
|
|
|
|
/*
|
|
* Fill in general registers in a core dump. This saves pretty
|
|
* much the same registers as hp-ux, although in a different order.
|
|
* Registers marked # below are not currently saved in pt_regs, so
|
|
* we use their current values here.
|
|
*
|
|
* gr0..gr31
|
|
* sr0..sr7
|
|
* iaoq0..iaoq1
|
|
* iasq0..iasq1
|
|
* cr11 (sar)
|
|
* cr19 (iir)
|
|
* cr20 (isr)
|
|
* cr21 (ior)
|
|
* # cr22 (ipsw)
|
|
* # cr0 (recovery counter)
|
|
* # cr24..cr31 (temporary registers)
|
|
* # cr8,9,12,13 (protection IDs)
|
|
* # cr10 (scr/ccr)
|
|
* # cr15 (ext int enable mask)
|
|
*
|
|
*/
|
|
|
|
#define ELF_CORE_COPY_REGS(dst, pt) \
|
|
memset(dst, 0, sizeof(dst)); /* don't leak any "random" bits */ \
|
|
memcpy(dst + 0, pt->gr, 32 * sizeof(elf_greg_t)); \
|
|
memcpy(dst + 32, pt->sr, 8 * sizeof(elf_greg_t)); \
|
|
memcpy(dst + 40, pt->iaoq, 2 * sizeof(elf_greg_t)); \
|
|
memcpy(dst + 42, pt->iasq, 2 * sizeof(elf_greg_t)); \
|
|
dst[44] = pt->sar; dst[45] = pt->iir; \
|
|
dst[46] = pt->isr; dst[47] = pt->ior; \
|
|
dst[48] = mfctl(22); dst[49] = mfctl(0); \
|
|
dst[50] = mfctl(24); dst[51] = mfctl(25); \
|
|
dst[52] = mfctl(26); dst[53] = mfctl(27); \
|
|
dst[54] = mfctl(28); dst[55] = mfctl(29); \
|
|
dst[56] = mfctl(30); dst[57] = mfctl(31); \
|
|
dst[58] = mfctl( 8); dst[59] = mfctl( 9); \
|
|
dst[60] = mfctl(12); dst[61] = mfctl(13); \
|
|
dst[62] = mfctl(10); dst[63] = mfctl(15);
|
|
|
|
#endif /* ! ELF_CLASS */
|
|
|
|
#define ELF_NGREG 80 /* We only need 64 at present, but leave space
|
|
for expansion. */
|
|
typedef elf_greg_t elf_gregset_t[ELF_NGREG];
|
|
|
|
#define ELF_NFPREG 32
|
|
typedef double elf_fpreg_t;
|
|
typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
|
|
|
|
struct task_struct;
|
|
|
|
extern int dump_task_fpu (struct task_struct *, elf_fpregset_t *);
|
|
#define ELF_CORE_COPY_FPREGS(tsk, elf_fpregs) dump_task_fpu(tsk, elf_fpregs)
|
|
|
|
struct pt_regs; /* forward declaration... */
|
|
|
|
|
|
#define elf_check_arch(x) ((x)->e_machine == EM_PARISC && (x)->e_ident[EI_CLASS] == ELF_CLASS)
|
|
|
|
/*
|
|
* These are used to set parameters in the core dumps.
|
|
*/
|
|
#define ELF_DATA ELFDATA2MSB
|
|
#define ELF_ARCH EM_PARISC
|
|
#define ELF_OSABI ELFOSABI_LINUX
|
|
|
|
/* %r23 is set by ld.so to a pointer to a function which might be
|
|
registered using atexit. This provides a means for the dynamic
|
|
linker to call DT_FINI functions for shared libraries that have
|
|
been loaded before the code runs.
|
|
|
|
So that we can use the same startup file with static executables,
|
|
we start programs with a value of 0 to indicate that there is no
|
|
such function. */
|
|
#define ELF_PLAT_INIT(_r, load_addr) _r->gr[23] = 0
|
|
|
|
#define ELF_EXEC_PAGESIZE 4096
|
|
|
|
/* This is the location that an ET_DYN program is loaded if exec'ed. Typical
|
|
use of this is to invoke "./ld.so someprog" to test out a new version of
|
|
the loader. We need to make sure that it is out of the way of the program
|
|
that it will "exec", and that there is sufficient room for the brk.
|
|
|
|
(2 * TASK_SIZE / 3) turns into something undefined when run through a
|
|
32 bit preprocessor and in some cases results in the kernel trying to map
|
|
ld.so to the kernel virtual base. Use a sane value instead. /Jes
|
|
*/
|
|
|
|
#define ELF_ET_DYN_BASE (TASK_UNMAPPED_BASE + 0x01000000)
|
|
|
|
/* This yields a mask that user programs can use to figure out what
|
|
instruction set this CPU supports. This could be done in user space,
|
|
but it's not easy, and we've already done it here. */
|
|
|
|
#define ELF_HWCAP 0
|
|
|
|
/* Masks for stack and mmap randomization */
|
|
#define BRK_RND_MASK (is_32bit_task() ? 0x07ffUL : 0x3ffffUL)
|
|
#define MMAP_RND_MASK (is_32bit_task() ? 0x1fffUL : 0x3ffffUL)
|
|
#define STACK_RND_MASK MMAP_RND_MASK
|
|
|
|
struct mm_struct;
|
|
extern unsigned long arch_randomize_brk(struct mm_struct *);
|
|
#define arch_randomize_brk arch_randomize_brk
|
|
|
|
#endif
|