1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ 2*4882a593Smuzhiyun /* elf-fdpic.h: FDPIC ELF load map 3*4882a593Smuzhiyun * 4*4882a593Smuzhiyun * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved. 5*4882a593Smuzhiyun * Written by David Howells (dhowells@redhat.com) 6*4882a593Smuzhiyun * 7*4882a593Smuzhiyun * This program is free software; you can redistribute it and/or 8*4882a593Smuzhiyun * modify it under the terms of the GNU General Public License 9*4882a593Smuzhiyun * as published by the Free Software Foundation; either version 10*4882a593Smuzhiyun * 2 of the License, or (at your option) any later version. 11*4882a593Smuzhiyun */ 12*4882a593Smuzhiyun 13*4882a593Smuzhiyun #ifndef _UAPI_LINUX_ELF_FDPIC_H 14*4882a593Smuzhiyun #define _UAPI_LINUX_ELF_FDPIC_H 15*4882a593Smuzhiyun 16*4882a593Smuzhiyun #include <linux/elf.h> 17*4882a593Smuzhiyun 18*4882a593Smuzhiyun #define PT_GNU_STACK (PT_LOOS + 0x474e551) 19*4882a593Smuzhiyun 20*4882a593Smuzhiyun /* segment mappings for ELF FDPIC libraries/executables/interpreters */ 21*4882a593Smuzhiyun struct elf32_fdpic_loadseg { 22*4882a593Smuzhiyun Elf32_Addr addr; /* core address to which mapped */ 23*4882a593Smuzhiyun Elf32_Addr p_vaddr; /* VMA recorded in file */ 24*4882a593Smuzhiyun Elf32_Word p_memsz; /* allocation size recorded in file */ 25*4882a593Smuzhiyun }; 26*4882a593Smuzhiyun 27*4882a593Smuzhiyun struct elf32_fdpic_loadmap { 28*4882a593Smuzhiyun Elf32_Half version; /* version of these structures, just in case... */ 29*4882a593Smuzhiyun Elf32_Half nsegs; /* number of segments */ 30*4882a593Smuzhiyun struct elf32_fdpic_loadseg segs[]; 31*4882a593Smuzhiyun }; 32*4882a593Smuzhiyun 33*4882a593Smuzhiyun #define ELF32_FDPIC_LOADMAP_VERSION 0x0000 34*4882a593Smuzhiyun 35*4882a593Smuzhiyun #endif /* _UAPI_LINUX_ELF_FDPIC_H */ 36