relocationEntry-elf-sparc.C

Go to the documentation of this file.
00001 /*
00002  * See the dyninst/COPYRIGHT file for copyright information.
00003  * 
00004  * We provide the Paradyn Tools (below described as "Paradyn")
00005  * on an AS IS basis, and do not warrant its validity or performance.
00006  * We reserve the right to update, modify, or discontinue this
00007  * software at any time.  We shall have no obligation to supply such
00008  * updates or modifications or any other form of support to you.
00009  * 
00010  * By your use of Paradyn, you understand and agree that we (or any
00011  * other person or entity with proprietary rights in Paradyn) are
00012  * under no obligation to provide either maintenance services,
00013  * update services, notices of latent defects, or correction of
00014  * defects for Paradyn.
00015  * 
00016  * This library is free software; you can redistribute it and/or
00017  * modify it under the terms of the GNU Lesser General Public
00018  * License as published by the Free Software Foundation; either
00019  * version 2.1 of the License, or (at your option) any later version.
00020  * 
00021  * This library is distributed in the hope that it will be useful,
00022  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00023  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00024  * Lesser General Public License for more details.
00025  * 
00026  * You should have received a copy of the GNU Lesser General Public
00027  * License along with this library; if not, write to the Free Software
00028  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
00029  */
00030 
00031 /* Functions of the relocationEntry class specific to SPARC ELF */
00032 #define ELF_TARGET_SPARC 1
00033 #include "Symtab.h"
00034 #include "Serialization.h"
00035 #include "annotations.h"
00036 #include <elf.h>
00037 
00038 const char* relocationEntry::relType2Str(unsigned long r, unsigned /*addressWidth*/) {
00039     switch(r) {
00040         CASE_RETURN_STR(R_SPARC_NONE);
00041         CASE_RETURN_STR(R_SPARC_8);
00042         CASE_RETURN_STR(R_SPARC_16);
00043         CASE_RETURN_STR(R_SPARC_32);
00044         CASE_RETURN_STR(R_SPARC_DISP8);
00045         CASE_RETURN_STR(R_SPARC_DISP16);
00046         CASE_RETURN_STR(R_SPARC_DISP32);
00047         CASE_RETURN_STR(R_SPARC_WDISP30);
00048         CASE_RETURN_STR(R_SPARC_WDISP22);
00049         CASE_RETURN_STR(R_SPARC_HI22);
00050         CASE_RETURN_STR(R_SPARC_22);
00051         CASE_RETURN_STR(R_SPARC_13);
00052         CASE_RETURN_STR(R_SPARC_LO10);
00053         CASE_RETURN_STR(R_SPARC_GOT10);
00054         CASE_RETURN_STR(R_SPARC_GOT13);
00055         CASE_RETURN_STR(R_SPARC_GOT22);
00056         CASE_RETURN_STR(R_SPARC_PC10);
00057         CASE_RETURN_STR(R_SPARC_PC22);
00058         CASE_RETURN_STR(R_SPARC_WPLT30);
00059         CASE_RETURN_STR(R_SPARC_COPY);
00060         CASE_RETURN_STR(R_SPARC_GLOB_DAT);
00061         CASE_RETURN_STR(R_SPARC_JMP_SLOT);
00062         CASE_RETURN_STR(R_SPARC_RELATIVE);
00063         CASE_RETURN_STR(R_SPARC_UA32);
00064         CASE_RETURN_STR(R_SPARC_PLT32);
00065         CASE_RETURN_STR(R_SPARC_HIPLT22);
00066         CASE_RETURN_STR(R_SPARC_LOPLT10);
00067         CASE_RETURN_STR(R_SPARC_PCPLT32);
00068         CASE_RETURN_STR(R_SPARC_PCPLT22);
00069         CASE_RETURN_STR(R_SPARC_PCPLT10);
00070         CASE_RETURN_STR(R_SPARC_10);
00071         CASE_RETURN_STR(R_SPARC_11);
00072         CASE_RETURN_STR(R_SPARC_64);
00073         CASE_RETURN_STR(R_SPARC_OLO10);
00074         CASE_RETURN_STR(R_SPARC_HH22);
00075         CASE_RETURN_STR(R_SPARC_HM10);
00076         CASE_RETURN_STR(R_SPARC_LM22);
00077         CASE_RETURN_STR(R_SPARC_PC_HH22);
00078         CASE_RETURN_STR(R_SPARC_PC_HM10);
00079         CASE_RETURN_STR(R_SPARC_PC_LM22);
00080         CASE_RETURN_STR(R_SPARC_WDISP16);
00081         CASE_RETURN_STR(R_SPARC_WDISP19);
00082         CASE_RETURN_STR(R_SPARC_7);
00083         CASE_RETURN_STR(R_SPARC_5);
00084         CASE_RETURN_STR(R_SPARC_6);
00085         CASE_RETURN_STR(R_SPARC_DISP64);
00086         CASE_RETURN_STR(R_SPARC_PLT64);
00087         CASE_RETURN_STR(R_SPARC_HIX22);
00088         CASE_RETURN_STR(R_SPARC_LOX10);
00089         CASE_RETURN_STR(R_SPARC_H44);
00090         CASE_RETURN_STR(R_SPARC_M44);
00091         CASE_RETURN_STR(R_SPARC_L44);
00092         CASE_RETURN_STR(R_SPARC_REGISTER);
00093         CASE_RETURN_STR(R_SPARC_UA64);
00094         CASE_RETURN_STR(R_SPARC_UA16);
00095         CASE_RETURN_STR(R_SPARC_TLS_GD_HI22);
00096         CASE_RETURN_STR(R_SPARC_TLS_GD_LO10);
00097         CASE_RETURN_STR(R_SPARC_TLS_GD_ADD);
00098         CASE_RETURN_STR(R_SPARC_TLS_GD_CALL);
00099         CASE_RETURN_STR(R_SPARC_TLS_LDM_HI22);
00100         CASE_RETURN_STR(R_SPARC_TLS_LDM_LO10);
00101         CASE_RETURN_STR(R_SPARC_TLS_LDM_ADD);
00102         CASE_RETURN_STR(R_SPARC_TLS_LDM_CALL);
00103         CASE_RETURN_STR(R_SPARC_TLS_LDO_HIX22);
00104         CASE_RETURN_STR(R_SPARC_TLS_LDO_LOX10);
00105         CASE_RETURN_STR(R_SPARC_TLS_LDO_ADD);
00106         CASE_RETURN_STR(R_SPARC_TLS_IE_HI22);
00107         CASE_RETURN_STR(R_SPARC_TLS_IE_LO10);
00108         CASE_RETURN_STR(R_SPARC_TLS_IE_LD);
00109         CASE_RETURN_STR(R_SPARC_TLS_IE_LDX);
00110         CASE_RETURN_STR(R_SPARC_TLS_IE_ADD);
00111         CASE_RETURN_STR(R_SPARC_TLS_LE_HIX22);
00112         CASE_RETURN_STR(R_SPARC_TLS_LE_LOX10);
00113         CASE_RETURN_STR(R_SPARC_TLS_DTPMOD32);
00114         CASE_RETURN_STR(R_SPARC_TLS_DTPMOD64);
00115         CASE_RETURN_STR(R_SPARC_TLS_DTPOFF32);
00116         CASE_RETURN_STR(R_SPARC_TLS_DTPOFF64);
00117         CASE_RETURN_STR(R_SPARC_TLS_TPOFF32);
00118         CASE_RETURN_STR(R_SPARC_TLS_TPOFF64);
00119         default:
00120             return "?";
00121     }
00122 }
00123 
00124 SYMTAB_EXPORT unsigned long relocationEntry::getGlobalRelType(unsigned /*addressWidth*/) {
00125     return R_SPARC_GLOB_DAT;
00126 }
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 12 Jul 2013 for SymtabAPI by  doxygen 1.6.1