/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2010 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_MACHELF_H
#define _SYS_MACHELF_H
#ifdef __cplusplus
extern "C" {
#endif
#include <sys/elf_amd64.h>
#include <sys/elf_SPARC.h>
#endif
#ifndef _ASM
#endif /* _ASM */
/*
* Make machine class dependent data types transparent to the common code
*/
#if defined(_ELF64) && !defined(_ELF32_COMPAT)
#ifndef _ASM
#endif /* _ASM */
#if defined(_KERNEL)
#endif
#ifndef _ASM
#endif /* _ASM */
#else /* _ILP32 */
#ifndef _ASM
#endif /* _ASM */
#if defined(_KERNEL)
#define ELF_R_TYPE_DATA(x) (0)
#endif
#ifndef _ASM
#endif /* _ASM */
#endif /* _ILP32 */
/*
* Elf `printf' type-cast macros. These force arguments to be a fixed size
* so that Elf32 and Elf64 can share common format strings.
*/
#ifndef __lint
/*
* A native pointer is special. Although it can be convenient to display
* these from a common format (ull), compilers may flag the cast of a pointer
* to an integer as illegal. Casting these pointers to the native pointer
* size, suppresses any compiler errors.
*/
#else
#define EC_SWORD(a) ((int)(a))
#endif
#ifdef __cplusplus
}
#endif
#endif /* _SYS_MACHELF_H */