]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - usr.sbin/kgzip/aouthdr.c
Followup to r347996
[FreeBSD/FreeBSD.git] / usr.sbin / kgzip / aouthdr.c
1 /*-
2  * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
3  *
4  * Copyright (c) 2000 Robert Nordier
5  * All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions
9  * are met:
10  * 1. Redistributions of source code must retain the above copyright
11  *    notice, this list of conditions and the following disclaimer.
12  * 2. Redistributions in binary form must reproduce the above copyright
13  *    notice, this list of conditions and the following disclaimer in
14  *    the documentation and/or other materials provided with the
15  *    distribution.
16  *
17  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS
18  * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY
21  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
23  * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
25  * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
26  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
27  * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28  *
29  * $FreeBSD$
30  */
31
32 #include <stddef.h>
33 #include "aouthdr.h"
34
35 #define KGZ_FIX_NSIZE   0       /* Run-time fixup */
36
37 const struct kgz_aouthdr0 aouthdr0 = {
38     /* a.out header */
39     {
40         MID_I386 << 020 | OMAGIC,                       /* a_midmag */
41         0,                                              /* a_text */
42         sizeof(struct kgz_hdr) + KGZ_FIX_NSIZE,         /* a_data */
43         0,                                              /* a_bss */
44         sizeof(struct nlist) * KGZ__STNUM,              /* a_syms */
45         0,                                              /* a_entry */
46         0,                                              /* a_trsize */
47         0                                               /* a_drsize */
48     }
49 };
50
51 const struct kgz_aouthdr1 aouthdr1 = {
52     /* Symbol table */
53     {
54         {
55             {
56                 (char *)offsetof(struct kgz__strtab,
57                                  kgz)                   /* n_un */
58             },
59             N_DATA | N_EXT,                             /* n_type */
60             AUX_OBJECT,                                 /* n_other */
61             0,                                          /* n_desc */
62             0                                           /* n_value */
63         },
64         {
65             {
66                 (char *)offsetof(struct kgz__strtab,
67                                  kgz_ndata)             /* n_un */
68             },
69             N_DATA | N_EXT,                             /* n_type */
70             AUX_OBJECT,                                 /* n_other */
71             0,                                          /* n_desc */
72             sizeof(struct kgz_hdr)                      /* n_value */
73         }
74     },
75     /* String table */
76     {
77         sizeof(struct kgz__strtab),                     /* length */
78         KGZ__STR_KGZ,                                   /* kgz */
79         KGZ__STR_KGZ_NDATA                              /* kgz_ndata */
80     }
81 };