summaryrefslogtreecommitdiffstats
path: root/lib/libelf/elf_types.m4
diff options
context:
space:
mode:
authorjkoshy <jkoshy@FreeBSD.org>2006-12-18 05:40:01 +0000
committerjkoshy <jkoshy@FreeBSD.org>2006-12-18 05:40:01 +0000
commit25bc13b7367e813ef4d53432a4e4383099e93ba0 (patch)
tree5ded8ca022a55b5ca759f3341c1e05289fb61a08 /lib/libelf/elf_types.m4
parentfdbeae7cd48d220f22f51d00a1b3c7c6525973ee (diff)
downloadFreeBSD-src-25bc13b7367e813ef4d53432a4e4383099e93ba0.zip
FreeBSD-src-25bc13b7367e813ef4d53432a4e4383099e93ba0.tar.gz
Use <osreldate.h> rather than the OS version reported by the kernel
to determine which Elf Types are to be handled. Change the M4 templates to wrap an `#if __FreeBSD_version >= NNN'/`#endif' pair around the generated code for each ELF data type, where `NNN' is the OS version where the ELF type was added to the source tree. This change allows cross-builds of old sources on newer FreeBSD systems to work correctly. Problem reported by: ru
Diffstat (limited to 'lib/libelf/elf_types.m4')
-rw-r--r--lib/libelf/elf_types.m458
1 files changed, 34 insertions, 24 deletions
diff --git a/lib/libelf/elf_types.m4 b/lib/libelf/elf_types.m4
index b317184..9abbe71 100644
--- a/lib/libelf/elf_types.m4
+++ b/lib/libelf/elf_types.m4
@@ -28,33 +28,43 @@
/*
* ELF types, defined in the "enum Elf_Type" API.
+ *
+ * The members of the list form a 3-tuple: (name, C-type-suffix, OSversion).
+ * + `name' is an Elf_Type symbol without the `ELF_T_' prefix.
+ * + `C-type-suffix' is the suffix for Elf32_ and Elf64_ type names.
+ * + `version' is the OS version the symbol first appeared in.
+ *
+ * OS revisions of note are:
+ * 600102 - The earliest (6.0-STABLE) version supported by this code.
+ * 700009 - Symbol versioning and ELF64 type changes.
+ * 700025 - More ELF types and the introduction of libelf.
*/
define(`ELF_TYPE_LIST',
- ``ADDR, Addr',
- `BYTE, Byte',
- `CAP, Cap',
- `DYN, Dyn',
- `EHDR, Ehdr',
- `HALF, Half',
- `LWORD, Lword',
- `MOVE, Move',
- `MOVEP, MoveP',
- `NOTE, Note',
- `OFF, Off',
- `PHDR, Phdr',
- `REL, Rel',
- `RELA, Rela',
- `SHDR, Shdr',
- `SWORD, Sword',
- `SXWORD, Sxword',
- `SYMINFO, Syminfo',
- `SYM, Sym',
- `VDEF, Verdef',
- `VNEED, Verneed',
- `WORD, Word',
- `XWORD, Xword',
- `NUM, _'')
+ ``ADDR, Addr, 600102',
+ `BYTE, Byte, 600102',
+ `CAP, Cap, 700025',
+ `DYN, Dyn, 600102',
+ `EHDR, Ehdr, 600102',
+ `HALF, Half, 600102',
+ `LWORD, Lword, 700025',
+ `MOVE, Move, 700025',
+ `MOVEP, MoveP, 700025',
+ `NOTE, Note, 600102',
+ `OFF, Off, 600102',
+ `PHDR, Phdr, 600102',
+ `REL, Rel, 600102',
+ `RELA, Rela, 600102',
+ `SHDR, Shdr, 600102',
+ `SWORD, Sword, 600102',
+ `SXWORD, Sxword, 700009',
+ `SYMINFO, Syminfo, 700025',
+ `SYM, Sym, 600102',
+ `VDEF, Verdef, 700009',
+ `VNEED, Verneed, 700009',
+ `WORD, Word, 600102',
+ `XWORD, Xword, 700009',
+ `NUM, _, _'')
/*
* DEFINE_STRUCT(NAME,MEMBERLIST...)
OpenPOWER on IntegriCloud