tools/elf4rom/libs/dwarf-20071209/libdwarf/pro_util.h
author Mike Kinghan <mikek@symbian.org>
Wed, 04 Aug 2010 10:56:22 +0100
branchGCC_SURGE
changeset 91 07b904f40417
parent 34 92d87f2e53c2
permissions -rwxr-xr-x
Provisional fix for bug 3508 - Persistent storage support breaks Linux compatibility. Enables libnvmemmory.so to be built and dynamically linked on Linux and rom boot reports persistent storage image created OK, but ROM then crashes.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
34
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
     1
/*
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
     2
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
     3
  Copyright (C) 2000,2004 Silicon Graphics, Inc.  All Rights Reserved.
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
     4
  Portions Copyright 2002 Sun Microsystems, Inc. All rights reserved.
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
     5
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
     6
  This program is free software; you can redistribute it and/or modify it
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
     7
  under the terms of version 2.1 of the GNU Lesser General Public License 
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
     8
  as published by the Free Software Foundation.
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
     9
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    10
  This program is distributed in the hope that it would be useful, but
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    11
  WITHOUT ANY WARRANTY; without even the implied warranty of
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    12
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    13
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    14
  Further, this software is distributed without any warranty that it is
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    15
  free of the rightful claim of any third person regarding infringement 
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    16
  or the like.  Any license provided herein, whether implied or 
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    17
  otherwise, applies only to this software file.  Patent licenses, if
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    18
  any, provided herein do not apply to combinations of this program with 
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    19
  other software, or any other product whatsoever.  
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    20
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    21
  You should have received a copy of the GNU Lesser General Public
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    22
  License along with this program; if not, write the Free Software
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    23
  Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston MA 02110-1301,
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    24
  USA.
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    25
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    26
  Contact information:  Silicon Graphics, Inc., 1500 Crittenden Lane,
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    27
  Mountain View, CA 94043, or:
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    28
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    29
  http://www.sgi.com
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    30
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    31
  For further information regarding this notice, see:
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    32
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    33
  http://oss.sgi.com/projects/GenInfo/NoticeExplan
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    34
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    35
*/
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    36
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    37
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    38
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    39
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    40
#define IS_64BIT(dbg) 	((dbg)->de_flags & DW_DLC_SIZE_64 ? 1 : 0)
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    41
#define ISA_IA64(dbg) 	((dbg)->de_flags & DW_DLC_ISA_IA64 ? 1 : 0)
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    42
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    43
/* definition of sizes of types, given target machine */
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    44
#define sizeof_sbyte(dbg) 	sizeof(Dwarf_Sbyte)
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    45
#define sizeof_ubyte(dbg)	sizeof(Dwarf_Ubyte)
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    46
#define sizeof_uhalf(dbg)	sizeof(Dwarf_Half)
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    47
/* certain sizes not defined here, but set in dbg record.
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    48
   See pro_init.c
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    49
*/
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    50
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    51
/* Computes amount of padding necessary to align n to a k-boundary. */
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    52
/* Important: Assumes n, k both GREATER than zero. */
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    53
#define PADDING(n, k) ( (k)-1 - ((n)-1)%(k) )
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    54
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    55
/* The following defines are only important for users of the
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    56
** producer part of libdwarf, and such should have these
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    57
** defined correctly (as necessary) 
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    58
** by the #include <elf.h> done in pro_incl.h
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    59
** before the #include "pro_util.h".
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    60
** For others producer macros do not matter so 0 is a usable value, and
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    61
** zero values let compilation succeed on more non-MIPS architectures.
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    62
** A better approach would be welcome.
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    63
*/
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    64
/* R_MIPS* are #define so #ifndef works */
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    65
/* R_IA_64* are not necessarily #define (might be enum) so #ifndef
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    66
   is useless, we use the configure script generating 
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    67
   HAVE_R_IA_64_DIR32LSB and HAVE_R_IA64_DIR32LSB.
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    68
*/
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    69
#ifndef R_MIPS_64
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    70
#define R_MIPS_64 0
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    71
#endif
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    72
#ifndef R_MIPS_32
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    73
#define R_MIPS_32 0
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    74
#endif
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    75
#ifndef R_MIPS_SCN_DISP
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    76
#define R_MIPS_SCN_DISP 0
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    77
#endif
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    78
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    79
/* R_IA_64_DIR32LSB came before the now-standard R_IA64_DIR32LSB
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    80
   (etc) was defined.  This now deals with either form,
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    81
   preferring the new form if available.  */
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    82
#ifdef HAVE_R_IA64_DIR32LSB
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    83
#define DWARF_PRO_R_IA64_DIR32LSB R_IA64_DIR32LSB
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    84
#define DWARF_PRO_R_IA64_DIR64LSB R_IA64_DIR64LSB
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    85
#define DWARF_PRO_R_IA64_SEGREL64LSB R_IA64_SEGREL64LSB
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    86
#define DWARF_PRO_R_IA64_SEGREL32LSB R_IA64_SEGREL32LSB
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    87
#endif
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    88
#if defined(HAVE_R_IA_64_DIR32LSB) && !defined(HAVE_R_IA64_DIR32LSB)
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    89
#define DWARF_PRO_R_IA64_DIR32LSB R_IA_64_DIR32LSB
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    90
#define DWARF_PRO_R_IA64_DIR64LSB R_IA_64_DIR64LSB
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    91
#define DWARF_PRO_R_IA64_SEGREL64LSB R_IA_64_SEGREL64LSB
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    92
#define DWARF_PRO_R_IA64_SEGREL32LSB R_IA_64_SEGREL32LSB
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    93
#endif
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    94
#if !defined(HAVE_R_IA_64_DIR32LSB) && !defined(HAVE_R_IA64_DIR32LSB)
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    95
#define DWARF_PRO_R_IA64_DIR32LSB 0
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    96
#define DWARF_PRO_R_IA64_DIR64LSB 0
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    97
#define DWARF_PRO_R_IA64_SEGREL64LSB 0
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    98
#define DWARF_PRO_R_IA64_SEGREL32LSB 0
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
    99
#endif
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
   100
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
   101
/*
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
   102
 * The default "I don't know" value can't be zero.
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
   103
 * Because that's the sentinel value that means "no relocation".
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
   104
 * In order to use this library in 'symbolic relocation mode we
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
   105
 * don't care if this value is the right relocation value,
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
   106
 * only that it's non-NULL.  So at the end, we define it
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
   107
 * to something sensible.
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
   108
 */
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
   109
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
   110
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
   111
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
   112
#if defined(sun)
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
   113
#if defined(sparc)
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
   114
#define Get_REL64_isa(dbg)         (R_SPARC_UA64)
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
   115
#define Get_REL32_isa(dbg)         (R_SPARC_UA32)
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
   116
#define Get_REL_SEGREL_isa(dbg)    (R_SPARC_NONE) /* I don't know! */
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
   117
#else  /* i386 */
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
   118
#define Get_REL64_isa(dbg)         (R_386_32)	/* Any non-zero value is ok */
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
   119
#define Get_REL32_isa(dbg)         (R_386_32)
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
   120
#define Get_REL_SEGREL_isa(dbg)    (R_386_NONE) /* I don't know! */
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
   121
#endif /* sparc || i386 */
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
   122
#else  /* !sun */
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
   123
#ifdef HAVE_SYS_IA64_ELF_H
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
   124
#define Get_REL64_isa(dbg)         (ISA_IA64(dbg) ? \
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
   125
				DWARF_PRO_R_IA64_DIR64LSB : R_MIPS_64)
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
   126
#define Get_REL32_isa(dbg)         (ISA_IA64(dbg) ? \
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
   127
				DWARF_PRO_R_IA64_DIR32LSB : R_MIPS_32)
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
   128
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
   129
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
   130
/* ia64 uses 32bit dwarf offsets for sections */
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
   131
#define Get_REL_SEGREL_isa(dbg)    (ISA_IA64(dbg) ? \
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
   132
				DWARF_PRO_R_IA64_SEGREL32LSB : R_MIPS_SCN_DISP)
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
   133
#else /* HAVE_SYS_IA64_ELF_H */
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
   134
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
   135
#if !defined(linux) && !defined(__BEOS__)
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
   136
#define Get_REL64_isa(dbg)         (R_MIPS_64)
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
   137
#define Get_REL32_isa(dbg)         (R_MIPS_32)
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
   138
#define Get_REL_SEGREL_isa(dbg)    (R_MIPS_SCN_DISP)
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
   139
#else
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
   140
#define Get_REL64_isa(dbg)	(1)
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
   141
#define Get_REL32_isa(dbg)	(1)   /* these are used on linux */
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
   142
#define Get_REL_SEGREL_isa(dbg)	(1)   /* non zero values, see comments above */
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
   143
#endif
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
   144
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
   145
#endif /* HAVE_SYS_IA64_ELF_H */
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
   146
#endif /* !sun */
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
   147
92d87f2e53c2 Added ELF4ROM and e32test-driver
Martin Trojer <martin.trojer@nokia.com>
parents:
diff changeset
   148