18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
28c2ecf20Sopenharmony_ci/* elf-fdpic.h: FDPIC ELF load map
38c2ecf20Sopenharmony_ci *
48c2ecf20Sopenharmony_ci * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
58c2ecf20Sopenharmony_ci * Written by David Howells (dhowells@redhat.com)
68c2ecf20Sopenharmony_ci *
78c2ecf20Sopenharmony_ci * This program is free software; you can redistribute it and/or
88c2ecf20Sopenharmony_ci * modify it under the terms of the GNU General Public License
98c2ecf20Sopenharmony_ci * as published by the Free Software Foundation; either version
108c2ecf20Sopenharmony_ci * 2 of the License, or (at your option) any later version.
118c2ecf20Sopenharmony_ci */
128c2ecf20Sopenharmony_ci
138c2ecf20Sopenharmony_ci#ifndef _UAPI_LINUX_ELF_FDPIC_H
148c2ecf20Sopenharmony_ci#define _UAPI_LINUX_ELF_FDPIC_H
158c2ecf20Sopenharmony_ci
168c2ecf20Sopenharmony_ci#include <linux/elf.h>
178c2ecf20Sopenharmony_ci
188c2ecf20Sopenharmony_ci#define PT_GNU_STACK    (PT_LOOS + 0x474e551)
198c2ecf20Sopenharmony_ci
208c2ecf20Sopenharmony_ci/* segment mappings for ELF FDPIC libraries/executables/interpreters */
218c2ecf20Sopenharmony_cistruct elf32_fdpic_loadseg {
228c2ecf20Sopenharmony_ci	Elf32_Addr	addr;		/* core address to which mapped */
238c2ecf20Sopenharmony_ci	Elf32_Addr	p_vaddr;	/* VMA recorded in file */
248c2ecf20Sopenharmony_ci	Elf32_Word	p_memsz;	/* allocation size recorded in file */
258c2ecf20Sopenharmony_ci};
268c2ecf20Sopenharmony_ci
278c2ecf20Sopenharmony_cistruct elf32_fdpic_loadmap {
288c2ecf20Sopenharmony_ci	Elf32_Half	version;	/* version of these structures, just in case... */
298c2ecf20Sopenharmony_ci	Elf32_Half	nsegs;		/* number of segments */
308c2ecf20Sopenharmony_ci	struct elf32_fdpic_loadseg segs[];
318c2ecf20Sopenharmony_ci};
328c2ecf20Sopenharmony_ci
338c2ecf20Sopenharmony_ci#define ELF32_FDPIC_LOADMAP_VERSION	0x0000
348c2ecf20Sopenharmony_ci
358c2ecf20Sopenharmony_ci#endif /* _UAPI_LINUX_ELF_FDPIC_H */
36