130692c65c4174412c90e79489e98ab85c1a7412fBen Cheng/* elf-fdpic.h: FDPIC ELF load map 230692c65c4174412c90e79489e98ab85c1a7412fBen Cheng * 330692c65c4174412c90e79489e98ab85c1a7412fBen Cheng * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved. 430692c65c4174412c90e79489e98ab85c1a7412fBen Cheng * Written by David Howells (dhowells@redhat.com) 530692c65c4174412c90e79489e98ab85c1a7412fBen Cheng * 630692c65c4174412c90e79489e98ab85c1a7412fBen Cheng * This program is free software; you can redistribute it and/or 730692c65c4174412c90e79489e98ab85c1a7412fBen Cheng * modify it under the terms of the GNU General Public License 830692c65c4174412c90e79489e98ab85c1a7412fBen Cheng * as published by the Free Software Foundation; either version 930692c65c4174412c90e79489e98ab85c1a7412fBen Cheng * 2 of the License, or (at your option) any later version. 1030692c65c4174412c90e79489e98ab85c1a7412fBen Cheng */ 1130692c65c4174412c90e79489e98ab85c1a7412fBen Cheng 1230692c65c4174412c90e79489e98ab85c1a7412fBen Cheng#ifndef _UAPI_LINUX_ELF_FDPIC_H 1330692c65c4174412c90e79489e98ab85c1a7412fBen Cheng#define _UAPI_LINUX_ELF_FDPIC_H 1430692c65c4174412c90e79489e98ab85c1a7412fBen Cheng 1530692c65c4174412c90e79489e98ab85c1a7412fBen Cheng#include <linux/elf.h> 1630692c65c4174412c90e79489e98ab85c1a7412fBen Cheng 1730692c65c4174412c90e79489e98ab85c1a7412fBen Cheng#define PT_GNU_STACK (PT_LOOS + 0x474e551) 1830692c65c4174412c90e79489e98ab85c1a7412fBen Cheng 1930692c65c4174412c90e79489e98ab85c1a7412fBen Cheng/* segment mappings for ELF FDPIC libraries/executables/interpreters */ 2030692c65c4174412c90e79489e98ab85c1a7412fBen Chengstruct elf32_fdpic_loadseg { 2130692c65c4174412c90e79489e98ab85c1a7412fBen Cheng Elf32_Addr addr; /* core address to which mapped */ 2230692c65c4174412c90e79489e98ab85c1a7412fBen Cheng Elf32_Addr p_vaddr; /* VMA recorded in file */ 2330692c65c4174412c90e79489e98ab85c1a7412fBen Cheng Elf32_Word p_memsz; /* allocation size recorded in file */ 2430692c65c4174412c90e79489e98ab85c1a7412fBen Cheng}; 2530692c65c4174412c90e79489e98ab85c1a7412fBen Cheng 2630692c65c4174412c90e79489e98ab85c1a7412fBen Chengstruct elf32_fdpic_loadmap { 2730692c65c4174412c90e79489e98ab85c1a7412fBen Cheng Elf32_Half version; /* version of these structures, just in case... */ 2830692c65c4174412c90e79489e98ab85c1a7412fBen Cheng Elf32_Half nsegs; /* number of segments */ 2930692c65c4174412c90e79489e98ab85c1a7412fBen Cheng struct elf32_fdpic_loadseg segs[]; 3030692c65c4174412c90e79489e98ab85c1a7412fBen Cheng}; 3130692c65c4174412c90e79489e98ab85c1a7412fBen Cheng 3230692c65c4174412c90e79489e98ab85c1a7412fBen Cheng#define ELF32_FDPIC_LOADMAP_VERSION 0x0000 3330692c65c4174412c90e79489e98ab85c1a7412fBen Cheng 3430692c65c4174412c90e79489e98ab85c1a7412fBen Cheng#endif /* _UAPI_LINUX_ELF_FDPIC_H */ 35