libelf_fsize.m4 (164190) | libelf_fsize.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 --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 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 * | 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 --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 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 * $FreeBSD: head/lib/libelf/libelf_fsize.m4 164190 2006-11-11 17:16:35Z jkoshy $ | 26 * $FreeBSD: head/lib/libelf/libelf_fsize.m4 165317 2006-12-18 05:40:01Z jkoshy $ |
27 */ 28 29#include <libelf.h> | 27 */ 28 29#include <libelf.h> |
30#include <osreldate.h> |
|
30 31#include "_libelf.h" 32 33/* 34 * Create an array of file sizes from the elf_type definitions 35 */ 36 37divert(-1) --- 11 unchanged lines hidden (view full) --- 49 50/* Currently unimplemented types */ 51define(`MOVEP_SIZE', 0) 52 53/* Overrides for 32 bit types that do not exist */ 54define(`XWORD_SIZE32', 0) 55define(`SXWORD_SIZE32', 0) 56 | 31 32#include "_libelf.h" 33 34/* 35 * Create an array of file sizes from the elf_type definitions 36 */ 37 38divert(-1) --- 11 unchanged lines hidden (view full) --- 50 51/* Currently unimplemented types */ 52define(`MOVEP_SIZE', 0) 53 54/* Overrides for 32 bit types that do not exist */ 55define(`XWORD_SIZE32', 0) 56define(`SXWORD_SIZE32', 0) 57 |
57ifelse(eval(OSRELDATE < 700009),1, 58 `define(`CAP_SIZE', 0) 59 define(`LWORD_SIZE', 0) 60 define(`MOVE_SIZE', 0) 61 define(`SYMINFO_SIZE', 0) 62 define(`VDEF_SIZE', 0) 63 define(`VNEED_SIZE', 0)',`') 64 | |
65/* 66 * FSZ{32,64} define the sizes of 32 and 64 bit file structures respectively. 67 */ 68 69define(`FSZ32',`_FSZ32($1_DEF)') 70define(`_FSZ32', 71 `ifelse($#,1,0, 72 `_BSZ32($1)+_FSZ32(shift($@))')') --- 44 unchanged lines hidden (view full) --- 117 `ifelse($#,1,`', 118 `DEFINE_ELF_FSIZE($1) 119 DEFINE_ELF_FSIZES(shift($@))')') 120 121DEFINE_ELF_FSIZES(ELF_TYPE_LIST) 122DEFINE_ELF_FSIZE(`IDENT',`') # `IDENT' is a pseudo type 123 124define(`FSIZE', | 58/* 59 * FSZ{32,64} define the sizes of 32 and 64 bit file structures respectively. 60 */ 61 62define(`FSZ32',`_FSZ32($1_DEF)') 63define(`_FSZ32', 64 `ifelse($#,1,0, 65 `_BSZ32($1)+_FSZ32(shift($@))')') --- 44 unchanged lines hidden (view full) --- 110 `ifelse($#,1,`', 111 `DEFINE_ELF_FSIZE($1) 112 DEFINE_ELF_FSIZES(shift($@))')') 113 114DEFINE_ELF_FSIZES(ELF_TYPE_LIST) 115DEFINE_ELF_FSIZE(`IDENT',`') # `IDENT' is a pseudo type 116 117define(`FSIZE', |
125 `[ELF_T_$1] = { .fsz32 = $1_SIZE32, .fsz64 = $1_SIZE64 },') | 118 `#if __FreeBSD_version >= $3 119 [ELF_T_$1] = { .fsz32 = $1_SIZE32, .fsz64 = $1_SIZE64 }, 120#endif') |
126define(`FSIZES', 127 `ifelse($#,1,`', 128 `FSIZE($1) 129FSIZES(shift($@))')') 130 131divert(0) 132 133struct fsize { --- 27 unchanged lines hidden --- | 121define(`FSIZES', 122 `ifelse($#,1,`', 123 `FSIZE($1) 124FSIZES(shift($@))')') 125 126divert(0) 127 128struct fsize { --- 27 unchanged lines hidden --- |