139092Srnordier/* 239092Srnordier * Copyright (c) 1998 Robert Nordier 339092Srnordier * All rights reserved. 439092Srnordier * 539092Srnordier * Redistribution and use in source and binary forms, with or without 639092Srnordier * modification, are permitted provided that the following conditions 739092Srnordier * are met: 839092Srnordier * 1. Redistributions of source code must retain the above copyright 939092Srnordier * notice, this list of conditions and the following disclaimer. 1039092Srnordier * 2. Redistributions in binary form must reproduce the above copyright 1139092Srnordier * notice, this list of conditions and the following disclaimer in the 1239092Srnordier * documentation and/or other materials provided with the distribution. 1339092Srnordier * 1439092Srnordier * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS``AS IS'' AND 1539092Srnordier * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1639092Srnordier * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 1739092Srnordier * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS 1839092Srnordier * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 1939092Srnordier * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 2039092Srnordier * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 2139092Srnordier * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 2239092Srnordier * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 2339092Srnordier * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 2439092Srnordier * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2539092Srnordier * 2650479Speter * $FreeBSD$ 2739092Srnordier */ 2839092Srnordier 2955416Smarcel#include <sys/elf32.h> 3039092Srnordier 3139092Srnordierstruct elfh { 3239092Srnordier Elf32_Ehdr e; /* ELF header */ 3339092Srnordier Elf32_Phdr p[2]; /* program header */ 3439092Srnordier Elf32_Shdr sh[4]; /* section header */ 3539092Srnordier char shstrtab[28]; /* section header string table */ 3639092Srnordier}; 3739092Srnordier 3855416Smarcelextern const struct elfh elfhdr; /* ELF header template */ 39