168313Srnordier/* 268313Srnordier * Copyright (c) 2000 Robert Nordier 368313Srnordier * All rights reserved. 468313Srnordier * 568313Srnordier * Redistribution and use in source and binary forms, with or without 668313Srnordier * modification, are permitted provided that the following conditions 768313Srnordier * are met: 868313Srnordier * 1. Redistributions of source code must retain the above copyright 968313Srnordier * notice, this list of conditions and the following disclaimer. 1068313Srnordier * 2. Redistributions in binary form must reproduce the above copyright 1168313Srnordier * notice, this list of conditions and the following disclaimer in 1268313Srnordier * the documentation and/or other materials provided with the 1368313Srnordier * distribution. 1468313Srnordier * 1568313Srnordier * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS 1668313Srnordier * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 1768313Srnordier * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1868313Srnordier * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY 1968313Srnordier * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2068313Srnordier * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 2168313Srnordier * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 2268313Srnordier * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 2368313Srnordier * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 2468313Srnordier * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 2568313Srnordier * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2668313Srnordier * 2768313Srnordier * $FreeBSD: releng/10.2/usr.sbin/kgzip/aouthdr.c 68313 2000-11-04 13:02:00Z rnordier $ 2868313Srnordier */ 2968313Srnordier 3068313Srnordier#include <stddef.h> 3168313Srnordier#include "aouthdr.h" 3268313Srnordier 3368313Srnordier#define KGZ_FIX_NSIZE 0 /* Run-time fixup */ 3468313Srnordier 3568313Srnordierconst struct kgz_aouthdr0 aouthdr0 = { 3668313Srnordier /* a.out header */ 3768313Srnordier { 3868313Srnordier MID_I386 << 020 | OMAGIC, /* a_midmag */ 3968313Srnordier 0, /* a_text */ 4068313Srnordier sizeof(struct kgz_hdr) + KGZ_FIX_NSIZE, /* a_data */ 4168313Srnordier 0, /* a_bss */ 4268313Srnordier sizeof(struct nlist) * KGZ__STNUM, /* a_syms */ 4368313Srnordier 0, /* a_entry */ 4468313Srnordier 0, /* a_trsize */ 4568313Srnordier 0 /* a_drsize */ 4668313Srnordier } 4768313Srnordier}; 4868313Srnordier 4968313Srnordierconst struct kgz_aouthdr1 aouthdr1 = { 5068313Srnordier /* Symbol table */ 5168313Srnordier { 5268313Srnordier { 5368313Srnordier { 5468313Srnordier (char *)offsetof(struct kgz__strtab, 5568313Srnordier kgz) /* n_un */ 5668313Srnordier }, 5768313Srnordier N_DATA | N_EXT, /* n_type */ 5868313Srnordier AUX_OBJECT, /* n_other */ 5968313Srnordier 0, /* n_desc */ 6068313Srnordier 0 /* n_value */ 6168313Srnordier }, 6268313Srnordier { 6368313Srnordier { 6468313Srnordier (char *)offsetof(struct kgz__strtab, 6568313Srnordier kgz_ndata) /* n_un */ 6668313Srnordier }, 6768313Srnordier N_DATA | N_EXT, /* n_type */ 6868313Srnordier AUX_OBJECT, /* n_other */ 6968313Srnordier 0, /* n_desc */ 7068313Srnordier sizeof(struct kgz_hdr) /* n_value */ 7168313Srnordier } 7268313Srnordier }, 7368313Srnordier /* String table */ 7468313Srnordier { 7568313Srnordier sizeof(struct kgz__strtab), /* length */ 7668313Srnordier KGZ__STR_KGZ, /* kgz */ 7768313Srnordier KGZ__STR_KGZ_NDATA /* kgz_ndata */ 7868313Srnordier } 7968313Srnordier}; 80