4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
26 #pragma ident "%Z%%M% %I% %E% SMI"
30 #if defined(ELFWRAP_X86)
31 #include <i386/machdep_x86.h>
33 #define target_init target_init_amd64
35 #define target_init target_init_i386
38 #if defined(ELFWRAP_SPARC)
39 #include <sparc/machdep_sparc.h>
41 #define target_init target_init_sparcv9
43 #define target_init target_init_sparc
48 * Establish any target specific data. This module is compiled using the
49 * defines shown above, to provide data for each target machine elfwrap(1)
50 * supports - each target module being assigned a unique interface name.
53 target_init(TargDesc_t
*tdp
)
56 * ELF header information.
58 tdp
->td_class
= M_CLASS
; /* e_ident[EI_CLASS] */
59 tdp
->td_data
= M_DATA
; /* e_ident[EI_DATA] */
60 tdp
->td_mach
= M_MACH
; /* e_machine */
63 * Default data buffer alignment.
65 tdp
->td_align
= M_WORD_ALIGN
; /* d_align */
68 * Symbol table entry size.
70 tdp
->td_symsz
= sizeof (Sym
); /* d_size */