e32tools/elf2e32/source/e32exporttable.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 // Class for E32 Export Table implementation of the elf2e32 tool
       
    15 // @internalComponent
       
    16 // @released
       
    17 // 
       
    18 //
       
    19 
       
    20 #ifndef __E32EXPORTTABLE__
       
    21 #define __E32EXPORTTABLE__
       
    22 
       
    23 #include "elfdefs.h"
       
    24 
       
    25 #include "pl_elfexports.h"
       
    26 
       
    27 class ElfExecutable;
       
    28 
       
    29 /**
       
    30 class for E32 Export Table
       
    31 @internalComponent
       
    32 @released
       
    33 */
       
    34 class E32ExportTable {
       
    35  public:
       
    36   E32ExportTable() : 
       
    37 	   iElfExecutable(0), iSize(0), iTable(0), iExportTableAddress(0),
       
    38 	   iAllocateP(true), iNumExports(0)
       
    39 	   {};
       
    40   ~E32ExportTable();
       
    41   void CreateExportTable(ElfExecutable * aElfExecutable, ElfExports::ExportList & aExportList);
       
    42   size_t GetNumExports();
       
    43   bool AllocateP();
       
    44   size_t GetExportTableSize();
       
    45   unsigned int * GetExportTable();
       
    46 
       
    47  public:
       
    48   ElfExecutable * iElfExecutable;
       
    49   size_t iSize;
       
    50   unsigned int * iTable;
       
    51   // NB. This a virtual address (within the RO segment).
       
    52   Elf32_Addr iExportTableAddress;
       
    53   // True if the postlinker must allocate the export table in the E32Image.
       
    54   // This should only be false for custom built ELF executables.
       
    55   bool iAllocateP;
       
    56   size_t iNumExports;
       
    57 };
       
    58 
       
    59 
       
    60 #endif