e32tools/elf2e32/source/elffilesupplied.h
changeset 0 044383f39525
equal deleted inserted replaced
-1:000000000000 0:044383f39525
       
     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 // ElfFileSupplied class for elf2e32 tool
       
    15 // @internalComponent
       
    16 // @released
       
    17 // 
       
    18 //
       
    19 
       
    20 #ifndef __ELFFILESUPPLIED_H_
       
    21 #define __ELFFILESUPPLIED_H_
       
    22 
       
    23 #include "usecasebase.h"
       
    24 #include "e32exporttable.h"
       
    25 #include <list>
       
    26 
       
    27 class Symbol;
       
    28 class DllSymbol;
       
    29 class DSOHandler;
       
    30 class ParameterManager;
       
    31 
       
    32 typedef std::list<Symbol*> SymbolList;
       
    33 
       
    34 /**
       
    35 This class is derived from the base class UseCaseBase and handles case for elf file supplied.
       
    36 
       
    37 @internalComponent
       
    38 @released
       
    39 */
       
    40 class ElfFileSupplied : public UseCaseBase
       
    41 {
       
    42 
       
    43 public:
       
    44 	ElfFileSupplied(ParameterListInterface* aParameterListInterface);
       
    45 	~ElfFileSupplied();
       
    46 	int Execute();
       
    47 
       
    48 	void ReadElfFile();
       
    49 	virtual void ProcessExports();
       
    50 	virtual void GenerateOutput();
       
    51 	void ValidateExports(SymbolList* aDefExports);
       
    52 	void CreateExports();
       
    53 	void WriteDefFile();
       
    54 	void WriteDSOFile();
       
    55 	void WriteE32();
       
    56 	virtual bool ImageIsDll();
       
    57 	virtual bool WarnForNewExports();
       
    58 	SymbolType SymbolTypeF(char * aName);
       
    59 	E32ImageHeaderV * AllocateE32ImageHeader();
       
    60 
       
    61 	virtual void CreateExportTable();
       
    62 	void CreateExportBitMap();
       
    63 	virtual size_t GetNumExports();
       
    64 	virtual size_t GetExportOffset();
       
    65 	virtual bool AllocateExportTableP();
       
    66 	virtual char * GetExportTable();
       
    67 	virtual size_t GetExportTableSize();
       
    68 
       
    69 	PLUINT16 GetExportDescSize();
       
    70 	PLUINT8 GetExportDescType();
       
    71 	size_t GetExportTableAddress();
       
    72 	//Method to check whether a symbol name is unwanted
       
    73 	int UnWantedSymbolp(const char * aSymbol);
       
    74 
       
    75 protected:
       
    76 	SymbolList iSymList;
       
    77 	DSOHandler	*iElfIfc;
       
    78 
       
    79 	E32ExportTable iExportTable;
       
    80 	int iNumAbsentExports;
       
    81 	PLUINT8 * iExportBitMap;
       
    82 
       
    83 	E32ImageFile * iE32ImageFile;
       
    84 	ElfExecutable *iElfExecutable;
       
    85 	PLUINT16 iExportDescSize;
       
    86 	PLUINT8 iExportDescType;
       
    87 };
       
    88 
       
    89 
       
    90 #endif
       
    91