|
1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // Implementation of the Class ElfImportRelocation for the elf2e32 tool |
|
15 // @internalComponent |
|
16 // @released |
|
17 // |
|
18 // |
|
19 |
|
20 #include "pl_elfimportrelocation.h" |
|
21 #include "pl_elfexecutable.h" |
|
22 |
|
23 |
|
24 /** |
|
25 Constructor for class ElfImportRelocation |
|
26 @param aElfExec - Instance of class ElfExecutable |
|
27 @param aAddr |
|
28 @param aAddend |
|
29 @param aIndex |
|
30 @param aRelType |
|
31 @param aRel |
|
32 @internalComponent |
|
33 @released |
|
34 */ |
|
35 ElfImportRelocation::ElfImportRelocation(ElfExecutable *aElfExec,PLMemAddr32 aAddr, \ |
|
36 PLUINT32 aAddend, PLUINT32 aIndex, PLUCHAR aRelType, \ |
|
37 Elf32_Rel* aRel): \ |
|
38 ElfRelocation(aElfExec, aAddr, aAddend, aIndex, aRelType, aRel), \ |
|
39 iVerRecord(NULL) |
|
40 { |
|
41 iSymbol = &(aElfExec->iElfDynSym[iSymNdx]); |
|
42 iSegment = aElfExec->Segment(iAddr); |
|
43 iSegmentType = aElfExec->SegmentType(iAddr); |
|
44 } |
|
45 |
|
46 |
|
47 |
|
48 /** |
|
49 Destructor for class ElfImportRelocation |
|
50 @internalComponent |
|
51 @released |
|
52 */ |
|
53 ElfImportRelocation::~ElfImportRelocation(){ |
|
54 |
|
55 } |
|
56 |
|
57 |
|
58 /** |
|
59 Function to know is import relocation |
|
60 @internalComponent |
|
61 @released |
|
62 */ |
|
63 bool ElfImportRelocation::IsImportRelocation(){ |
|
64 return true; |
|
65 } |
|
66 |
|
67 /** |
|
68 Function to add import relocation |
|
69 @internalComponent |
|
70 @released |
|
71 */ |
|
72 void ElfImportRelocation::Add() { |
|
73 iElfExec->AddToImports(this); |
|
74 } |
|
75 |
|
76 |