libelf_convert.m4 (164190) | libelf_convert.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_convert.m4 164190 2006-11-11 17:16:35Z jkoshy $"); | 28__FBSDID("$FreeBSD: head/lib/libelf/libelf_convert.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 42/* 43 * Macros to swap various integral quantities. --- 185 unchanged lines hidden (view full) --- 229 230define(`IGNORE', 231 `define(IGNORE_$1`'32, 1) 232 define(IGNORE_$1`'64, 1)') 233 234IGNORE(MOVEP) 235IGNORE(NOTE) 236 | 37#include <string.h> 38 39#include "_libelf.h" 40 41/* WARNING: GENERATED FROM __file__. */ 42 43/* 44 * Macros to swap various integral quantities. --- 185 unchanged lines hidden (view full) --- 230 231define(`IGNORE', 232 `define(IGNORE_$1`'32, 1) 233 define(IGNORE_$1`'64, 1)') 234 235IGNORE(MOVEP) 236IGNORE(NOTE) 237 |
237ifelse(eval(OSRELDATE < 700009),1, 238 `IGNORE(CAP) 239 IGNORE(MOVE) 240 IGNORE(SYMINFO) 241 IGNORE(VDEF) 242 IGNORE(VNEED) 243 define(`IGNORE_LWORD', 1)', 244 `') 245 | |
246define(IGNORE_BYTE, 1) /* 'lator, leave 'em bytes alone */ 247define(IGNORE_NOTE, 1) 248define(IGNORE_SXWORD32, 1) 249define(IGNORE_XWORD32, 1) 250 251/* 252 * `BASE'_XXX flags cause class agnostic template functions 253 * to be generated. --- 196 unchanged lines hidden (view full) --- 450 * - if the type is declared as `SIZEDEP', then 32 and 64 bit 451 * variants of the conversion functions are generated. 452 * - otherwise a 32 bit variant is generated. 453 * - if the type is a structure type, we generate 32 and 64 bit 454 * variants of the conversion functions. 455 */ 456 457define(`MAKE_TYPE_CONVERTER', | 238define(IGNORE_BYTE, 1) /* 'lator, leave 'em bytes alone */ 239define(IGNORE_NOTE, 1) 240define(IGNORE_SXWORD32, 1) 241define(IGNORE_XWORD32, 1) 242 243/* 244 * `BASE'_XXX flags cause class agnostic template functions 245 * to be generated. --- 196 unchanged lines hidden (view full) --- 442 * - if the type is declared as `SIZEDEP', then 32 and 64 bit 443 * variants of the conversion functions are generated. 444 * - otherwise a 32 bit variant is generated. 445 * - if the type is a structure type, we generate 32 and 64 bit 446 * variants of the conversion functions. 447 */ 448 449define(`MAKE_TYPE_CONVERTER', |
458 `ifdef(`BASE'_$1, | 450 `#if __FreeBSD_version >= $3 /* $1 */ 451ifdef(`BASE'_$1, |
459 `ifdef(`IGNORE_'$1,`', 460 `MAKEPRIM_TO_F($1,$2,`',64) 461 MAKEPRIM_TO_M($1,$2,`',64)')', 462 `ifdef(`SIZEDEP_'$1, 463 `MAKEPRIM_TO_F($1,$2,32,32)dnl 464 MAKEPRIM_TO_M($1,$2,32,32)dnl 465 MAKEPRIM_TO_F($1,$2,64,64)dnl 466 MAKEPRIM_TO_M($1,$2,64,64)', 467 `MAKE_TO_F($1,$2,32)dnl 468 MAKE_TO_F($1,$2,64)dnl 469 MAKE_TO_M($1,$2,32)dnl | 452 `ifdef(`IGNORE_'$1,`', 453 `MAKEPRIM_TO_F($1,$2,`',64) 454 MAKEPRIM_TO_M($1,$2,`',64)')', 455 `ifdef(`SIZEDEP_'$1, 456 `MAKEPRIM_TO_F($1,$2,32,32)dnl 457 MAKEPRIM_TO_M($1,$2,32,32)dnl 458 MAKEPRIM_TO_F($1,$2,64,64)dnl 459 MAKEPRIM_TO_M($1,$2,64,64)', 460 `MAKE_TO_F($1,$2,32)dnl 461 MAKE_TO_F($1,$2,64)dnl 462 MAKE_TO_M($1,$2,32)dnl |
470 MAKE_TO_M($1,$2,64)')')') | 463 MAKE_TO_M($1,$2,64)')') 464#endif /* $1 */ 465') |
471 472define(`MAKE_TYPE_CONVERTERS', 473 `ifelse($#,1,`', 474 `MAKE_TYPE_CONVERTER($1)MAKE_TYPE_CONVERTERS(shift($@))')') 475 476divert(0) 477 478/* --- 134 unchanged lines hidden (view full) --- 613 `ifdef(`IGNORE_'$1, 614 `.$3$2 = NULL', 615 `.$3$2 = libelf_cvt_$1_$3')', 616 `ifdef(`SIZEDEP_'$1, 617 `.$3$2 = libelf_cvt_$1$2_$3', 618 `.$3$2 = libelf_cvt$2_$1_$3')')')') 619 620define(`CONVERTER_NAME', | 466 467define(`MAKE_TYPE_CONVERTERS', 468 `ifelse($#,1,`', 469 `MAKE_TYPE_CONVERTER($1)MAKE_TYPE_CONVERTERS(shift($@))')') 470 471divert(0) 472 473/* --- 134 unchanged lines hidden (view full) --- 608 `ifdef(`IGNORE_'$1, 609 `.$3$2 = NULL', 610 `.$3$2 = libelf_cvt_$1_$3')', 611 `ifdef(`SIZEDEP_'$1, 612 `.$3$2 = libelf_cvt_$1$2_$3', 613 `.$3$2 = libelf_cvt$2_$1_$3')')')') 614 615define(`CONVERTER_NAME', |
621 `[ELF_T_$1] = { | 616 `#if __FreeBSD_version >= $3 617 [ELF_T_$1] = { |
622 CONV($1,32,tof), CONV($1,32,tom), 623 CONV($1,64,tof), CONV($1,64,tom) }, | 618 CONV($1,32,tof), CONV($1,32,tom), 619 CONV($1,64,tof), CONV($1,64,tom) }, |
620#endif |
|
624')') 625 626define(`CONVERTER_NAMES', 627 `ifelse($#,1,`', 628 `CONVERTER_NAME($1)CONVERTER_NAMES(shift($@))')') 629 630undefine(`IGNORE_BYTE32', `IGNORE_BYTE64') 631divert(0) --- 37 unchanged lines hidden --- | 621')') 622 623define(`CONVERTER_NAMES', 624 `ifelse($#,1,`', 625 `CONVERTER_NAME($1)CONVERTER_NAMES(shift($@))')') 626 627undefine(`IGNORE_BYTE32', `IGNORE_BYTE64') 628divert(0) --- 37 unchanged lines hidden --- |