1e2be04c7SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ 2607ca46eSDavid Howells /* elf-fdpic.h: FDPIC ELF load map 3607ca46eSDavid Howells * 4607ca46eSDavid Howells * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved. 5607ca46eSDavid Howells * Written by David Howells (dhowells@redhat.com) 6607ca46eSDavid Howells * 7607ca46eSDavid Howells * This program is free software; you can redistribute it and/or 8607ca46eSDavid Howells * modify it under the terms of the GNU General Public License 9607ca46eSDavid Howells * as published by the Free Software Foundation; either version 10607ca46eSDavid Howells * 2 of the License, or (at your option) any later version. 11607ca46eSDavid Howells */ 12607ca46eSDavid Howells 130c552e5fSDavid Howells #ifndef _UAPI_LINUX_ELF_FDPIC_H 140c552e5fSDavid Howells #define _UAPI_LINUX_ELF_FDPIC_H 15607ca46eSDavid Howells 16607ca46eSDavid Howells #include <linux/elf.h> 17607ca46eSDavid Howells 18607ca46eSDavid Howells #define PT_GNU_STACK (PT_LOOS + 0x474e551) 19607ca46eSDavid Howells 20607ca46eSDavid Howells /* segment mappings for ELF FDPIC libraries/executables/interpreters */ 21607ca46eSDavid Howells struct elf32_fdpic_loadseg { 22607ca46eSDavid Howells Elf32_Addr addr; /* core address to which mapped */ 23607ca46eSDavid Howells Elf32_Addr p_vaddr; /* VMA recorded in file */ 24607ca46eSDavid Howells Elf32_Word p_memsz; /* allocation size recorded in file */ 25607ca46eSDavid Howells }; 26607ca46eSDavid Howells 27607ca46eSDavid Howells struct elf32_fdpic_loadmap { 28607ca46eSDavid Howells Elf32_Half version; /* version of these structures, just in case... */ 29607ca46eSDavid Howells Elf32_Half nsegs; /* number of segments */ 30607ca46eSDavid Howells struct elf32_fdpic_loadseg segs[]; 31607ca46eSDavid Howells }; 32607ca46eSDavid Howells 33607ca46eSDavid Howells #define ELF32_FDPIC_LOADMAP_VERSION 0x0000 34607ca46eSDavid Howells 35*b922bf04SGreg Ungerer /* segment mappings for ELF FDPIC libraries/executables/interpreters */ 36*b922bf04SGreg Ungerer struct elf64_fdpic_loadseg { 37*b922bf04SGreg Ungerer Elf64_Addr addr; /* core address to which mapped */ 38*b922bf04SGreg Ungerer Elf64_Addr p_vaddr; /* VMA recorded in file */ 39*b922bf04SGreg Ungerer Elf64_Word p_memsz; /* allocation size recorded in file */ 40*b922bf04SGreg Ungerer }; 41*b922bf04SGreg Ungerer 42*b922bf04SGreg Ungerer struct elf64_fdpic_loadmap { 43*b922bf04SGreg Ungerer Elf64_Half version; /* version of these structures, just in case... */ 44*b922bf04SGreg Ungerer Elf64_Half nsegs; /* number of segments */ 45*b922bf04SGreg Ungerer struct elf64_fdpic_loadseg segs[]; 46*b922bf04SGreg Ungerer }; 47*b922bf04SGreg Ungerer 48*b922bf04SGreg Ungerer #define ELF64_FDPIC_LOADMAP_VERSION 0x0000 49*b922bf04SGreg Ungerer 500c552e5fSDavid Howells #endif /* _UAPI_LINUX_ELF_FDPIC_H */ 51