Deleted Added
full compact
libelf_msize.m4 (164190) libelf_msize.m4 (165317)
1/*-
2 * Copyright (c) 2006 Joseph Koshy
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 11 unchanged lines hidden (view full) ---

20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2006 Joseph Koshy
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 11 unchanged lines hidden (view full) ---

20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
28__FBSDID("$FreeBSD: head/lib/libelf/libelf_msize.m4 164190 2006-11-11 17:16:35Z jkoshy $");
28__FBSDID("$FreeBSD: head/lib/libelf/libelf_msize.m4 165317 2006-12-18 05:40:01Z jkoshy $");
29
30#include <sys/types.h>
31#include <sys/elf32.h>
32#include <sys/elf64.h>
33
34#include <assert.h>
35#include <libelf.h>
29
30#include <sys/types.h>
31#include <sys/elf32.h>
32#include <sys/elf64.h>
33
34#include <assert.h>
35#include <libelf.h>
36#include <osreldate.h>
36#include <string.h>
37
38#include "_libelf.h"
39
40/* WARNING: GENERATED FROM __file__. */
41
42struct msize {
43 size_t msz32;

--- 8 unchanged lines hidden (view full) ---

52
53/*
54 * Unimplemented types.
55 */
56define(MOVEP_SIZE, 0)
57define(SXWORD_SIZE32, 0)
58define(XWORD_SIZE32, 0)
59
37#include <string.h>
38
39#include "_libelf.h"
40
41/* WARNING: GENERATED FROM __file__. */
42
43struct msize {
44 size_t msz32;

--- 8 unchanged lines hidden (view full) ---

53
54/*
55 * Unimplemented types.
56 */
57define(MOVEP_SIZE, 0)
58define(SXWORD_SIZE32, 0)
59define(XWORD_SIZE32, 0)
60
60ifelse(eval(OSRELDATE < 700009),1,
61 `define(`CAP_SIZE', 0)
62 define(`LWORD_SIZE', 0)
63 define(`MOVE_SIZE', 0)
64 define(`SYMINFO_SIZE', 0)
65 define(`VDEF_SIZE', 0)
66 define(`VNEED_SIZE', 0)',`')
67
68define(`DEFINE_ELF_MSIZE',
69 `ifdef($1`_SIZE',
70 `define($1_SIZE32,$1_SIZE)
71 define($1_SIZE64,$1_SIZE)',
72 `ifdef($1`_SIZE32',`',
73 `define($1_SIZE32,sizeof(Elf32_$2))')
74 ifdef($1`_SIZE64',`',
75 `define($1_SIZE64,sizeof(Elf64_$2))')')')
76define(`DEFINE_ELF_MSIZES',
77 `ifelse($#,1,`',
78 `DEFINE_ELF_MSIZE($1)
79 DEFINE_ELF_MSIZES(shift($@))')')
80
81DEFINE_ELF_MSIZES(ELF_TYPE_LIST)
82
83define(`MSIZE',
61define(`DEFINE_ELF_MSIZE',
62 `ifdef($1`_SIZE',
63 `define($1_SIZE32,$1_SIZE)
64 define($1_SIZE64,$1_SIZE)',
65 `ifdef($1`_SIZE32',`',
66 `define($1_SIZE32,sizeof(Elf32_$2))')
67 ifdef($1`_SIZE64',`',
68 `define($1_SIZE64,sizeof(Elf64_$2))')')')
69define(`DEFINE_ELF_MSIZES',
70 `ifelse($#,1,`',
71 `DEFINE_ELF_MSIZE($1)
72 DEFINE_ELF_MSIZES(shift($@))')')
73
74DEFINE_ELF_MSIZES(ELF_TYPE_LIST)
75
76define(`MSIZE',
84 `[ELF_T_$1] = { .msz32 = $1_SIZE32, .msz64 = $1_SIZE64 },')
77 `#if __FreeBSD_version >= $3
78 [ELF_T_$1] = { .msz32 = $1_SIZE32, .msz64 = $1_SIZE64 },
79#endif')
85define(`MSIZES',
86 `ifelse($#,1,`',
87 `MSIZE($1)
88MSIZES(shift($@))')')
89
90divert(0)
91
92static struct msize msize[ELF_T_NUM] = {

--- 20 unchanged lines hidden ---
80define(`MSIZES',
81 `ifelse($#,1,`',
82 `MSIZE($1)
83MSIZES(shift($@))')')
84
85divert(0)
86
87static struct msize msize[ELF_T_NUM] = {

--- 20 unchanged lines hidden ---