00001 /* 00002 * Copyright 2005 PathScale, Inc. All Rights Reserved. 00003 */ 00004 00005 /* 00006 00007 Copyright (C) 2000,2002,2004 Silicon Graphics, Inc. All Rights Reserved. 00008 00009 This program is free software; you can redistribute it and/or modify it 00010 under the terms of version 2.1 of the GNU Lesser General Public License 00011 as published by the Free Software Foundation. 00012 00013 This program is distributed in the hope that it would be useful, but 00014 WITHOUT ANY WARRANTY; without even the implied warranty of 00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00016 00017 Further, this software is distributed without any warranty that it is 00018 free of the rightful claim of any third person regarding infringement 00019 or the like. Any license provided herein, whether implied or 00020 otherwise, applies only to this software file. Patent licenses, if 00021 any, provided herein do not apply to combinations of this program with 00022 other software, or any other product whatsoever. 00023 00024 You should have received a copy of the GNU Lesser General Public 00025 License along with this program; if not, write the Free Software 00026 Foundation, Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, 00027 USA. 00028 00029 Contact information: Silicon Graphics, Inc., 1500 Crittenden Lane, 00030 Mountain View, CA 94043, or: 00031 00032 http://www.sgi.com 00033 00034 For further information regarding this notice, see: 00035 00036 http://oss.sgi.com/projects/GenInfo/NoticeExplan 00037 00038 */ 00039 00040 00041 #ifdef HAVE_ELF_H 00042 #include <elf.h> 00043 #elif defined(HAVE_LIBELF_H) 00044 /* On one platform without elf.h this gets Elf32_Rel 00045 type defined (a required type). */ 00046 #include <libelf.h> 00047 #endif 00048 #if defined(BUILD_OS_DARWIN) 00049 #include "darwin_elf.h" 00050 #include <mach-o/reloc.h> 00051 #endif /* defined(BUILD_OS_DARWIN) */ 00052 00053 /* The target address is given: the place in the source integer 00054 is to be determined. 00055 */ 00056 #ifdef WORDS_BIGENDIAN 00057 #define WRITE_UNALIGNED(dbg,dest,source, srclength,len_out) \ 00058 { \ 00059 dbg->de_copy_word(dest, \ 00060 ((char *)source) +srclength-len_out, \ 00061 len_out) ; \ 00062 } 00063 00064 00065 #else /* LITTLE ENDIAN */ 00066 00067 #define WRITE_UNALIGNED(dbg,dest,source, srclength,len_out) \ 00068 { \ 00069 dbg->de_copy_word( (dest) , \ 00070 ((char *)source) , \ 00071 len_out) ; \ 00072 } 00073 #endif 00074 00075 00076 00077 #include "libdwarf.h" 00078 00079 #include "dwarf.h" 00080 #include "pro_opaque.h" 00081 #include "pro_error.h" 00082 #include "pro_util.h" 00083 #include "pro_encode_nm.h" 00084 #include "pro_alloc.h"
1.5.6