1 /* $OpenBSD: prebind.h,v 1.2 2006/05/12 22:14:04 drahn Exp $ */ 2 /* 3 * Copyright (c) 2006 Dale Rahn <drahn@dalerahn.com> 4 * 5 * Permission to use, copy, modify, and distribute this software for any 6 * purpose with or without fee is hereby granted, provided that the above 7 * copyright notice and this permission notice appear in all copies. 8 * 9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 */ 17 18 #define PREBIND_VERSION 2 19 struct prebind_footer { 20 off_t prebind_base; 21 u_int32_t nameidx_idx; 22 u_int32_t symcache_idx; 23 u_int32_t pltsymcache_idx; 24 u_int32_t fixup_idx; 25 u_int32_t nametab_idx; 26 u_int32_t fixupcnt_idx; 27 u_int32_t libmap_idx; 28 29 u_int32_t symcache_cnt; 30 u_int32_t pltsymcache_cnt; 31 u_int32_t fixup_cnt; 32 u_int32_t numlibs; 33 u_int32_t prebind_size; 34 35 u_int32_t id0; 36 u_int32_t id1; 37 /* do not modify or add fields below this point in the struct */ 38 off_t orig_size; 39 u_int32_t prebind_version; 40 char bind_id[4]; 41 #define BIND_ID0 'P' 42 #define BIND_ID1 'R' 43 #define BIND_ID2 'E' 44 #define BIND_ID3 'B' 45 }; 46 47 48 struct nameidx { 49 u_int32_t name; 50 u_int32_t id0; 51 u_int32_t id1; 52 }; 53 54 struct symcachetab { 55 u_int32_t idx; 56 u_int32_t obj_idx; 57 u_int32_t sym_idx; 58 }; 59 60 struct fixup { 61 u_int32_t sym; 62 u_int32_t obj_idx; 63 u_int32_t sym_idx; 64 }; 65