toolsandutils/e32tools/elf2e32/source/pl_elfconsumer.h
author William Roberts <williamr@symbian.org>
Tue, 06 Jul 2010 16:25:46 +0100
branchGCC_SURGE
changeset 60 5a90ee674b42
child 61 b376866b09e6
permissions -rw-r--r--
Reinstate elf2e32, so that we can change it more easily in GCC_SURGE builds
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
60
5a90ee674b42 Reinstate elf2e32, so that we can change it more easily in GCC_SURGE builds
William Roberts <williamr@symbian.org>
parents:
diff changeset
     1
// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
5a90ee674b42 Reinstate elf2e32, so that we can change it more easily in GCC_SURGE builds
William Roberts <williamr@symbian.org>
parents:
diff changeset
     2
// All rights reserved.
5a90ee674b42 Reinstate elf2e32, so that we can change it more easily in GCC_SURGE builds
William Roberts <williamr@symbian.org>
parents:
diff changeset
     3
// This component and the accompanying materials are made available
5a90ee674b42 Reinstate elf2e32, so that we can change it more easily in GCC_SURGE builds
William Roberts <williamr@symbian.org>
parents:
diff changeset
     4
// under the terms of "Eclipse Public License v1.0"
5a90ee674b42 Reinstate elf2e32, so that we can change it more easily in GCC_SURGE builds
William Roberts <williamr@symbian.org>
parents:
diff changeset
     5
// which accompanies this distribution, and is available
5a90ee674b42 Reinstate elf2e32, so that we can change it more easily in GCC_SURGE builds
William Roberts <williamr@symbian.org>
parents:
diff changeset
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
5a90ee674b42 Reinstate elf2e32, so that we can change it more easily in GCC_SURGE builds
William Roberts <williamr@symbian.org>
parents:
diff changeset
     7
//
5a90ee674b42 Reinstate elf2e32, so that we can change it more easily in GCC_SURGE builds
William Roberts <williamr@symbian.org>
parents:
diff changeset
     8
// Initial Contributors:
5a90ee674b42 Reinstate elf2e32, so that we can change it more easily in GCC_SURGE builds
William Roberts <williamr@symbian.org>
parents:
diff changeset
     9
// Nokia Corporation - initial contribution.
5a90ee674b42 Reinstate elf2e32, so that we can change it more easily in GCC_SURGE builds
William Roberts <williamr@symbian.org>
parents:
diff changeset
    10
//
5a90ee674b42 Reinstate elf2e32, so that we can change it more easily in GCC_SURGE builds
William Roberts <williamr@symbian.org>
parents:
diff changeset
    11
// Contributors:
5a90ee674b42 Reinstate elf2e32, so that we can change it more easily in GCC_SURGE builds
William Roberts <williamr@symbian.org>
parents:
diff changeset
    12
//
5a90ee674b42 Reinstate elf2e32, so that we can change it more easily in GCC_SURGE builds
William Roberts <williamr@symbian.org>
parents:
diff changeset
    13
// Description:
5a90ee674b42 Reinstate elf2e32, so that we can change it more easily in GCC_SURGE builds
William Roberts <williamr@symbian.org>
parents:
diff changeset
    14
// Implementation of the Class ElfConsumer for the elf2e32 tool
5a90ee674b42 Reinstate elf2e32, so that we can change it more easily in GCC_SURGE builds
William Roberts <williamr@symbian.org>
parents:
diff changeset
    15
// @internalComponent
5a90ee674b42 Reinstate elf2e32, so that we can change it more easily in GCC_SURGE builds
William Roberts <williamr@symbian.org>
parents:
diff changeset
    16
// @released
5a90ee674b42 Reinstate elf2e32, so that we can change it more easily in GCC_SURGE builds
William Roberts <williamr@symbian.org>
parents:
diff changeset
    17
// 
5a90ee674b42 Reinstate elf2e32, so that we can change it more easily in GCC_SURGE builds
William Roberts <williamr@symbian.org>
parents:
diff changeset
    18
//
5a90ee674b42 Reinstate elf2e32, so that we can change it more easily in GCC_SURGE builds
William Roberts <williamr@symbian.org>
parents:
diff changeset
    19
5a90ee674b42 Reinstate elf2e32, so that we can change it more easily in GCC_SURGE builds
William Roberts <williamr@symbian.org>
parents:
diff changeset
    20
#if !defined(_PL_ELFCONSUMER_H_)
5a90ee674b42 Reinstate elf2e32, so that we can change it more easily in GCC_SURGE builds
William Roberts <williamr@symbian.org>
parents:
diff changeset
    21
#define _PL_ELFCONSUMER_H_
5a90ee674b42 Reinstate elf2e32, so that we can change it more easily in GCC_SURGE builds
William Roberts <williamr@symbian.org>
parents:
diff changeset
    22
5a90ee674b42 Reinstate elf2e32, so that we can change it more easily in GCC_SURGE builds
William Roberts <williamr@symbian.org>
parents:
diff changeset
    23
#include "pl_elfexecutable.h"
5a90ee674b42 Reinstate elf2e32, so that we can change it more easily in GCC_SURGE builds
William Roberts <williamr@symbian.org>
parents:
diff changeset
    24
#include <list>
5a90ee674b42 Reinstate elf2e32, so that we can change it more easily in GCC_SURGE builds
William Roberts <williamr@symbian.org>
parents:
diff changeset
    25
#include <stdio.h>
5a90ee674b42 Reinstate elf2e32, so that we can change it more easily in GCC_SURGE builds
William Roberts <williamr@symbian.org>
parents:
diff changeset
    26
5a90ee674b42 Reinstate elf2e32, so that we can change it more easily in GCC_SURGE builds
William Roberts <williamr@symbian.org>
parents:
diff changeset
    27
using std::list;
5a90ee674b42 Reinstate elf2e32, so that we can change it more easily in GCC_SURGE builds
William Roberts <williamr@symbian.org>
parents:
diff changeset
    28
5a90ee674b42 Reinstate elf2e32, so that we can change it more easily in GCC_SURGE builds
William Roberts <williamr@symbian.org>
parents:
diff changeset
    29
enum{ KMaxWindowsIOSize = 31 * 1024 * 1024 };
5a90ee674b42 Reinstate elf2e32, so that we can change it more easily in GCC_SURGE builds
William Roberts <williamr@symbian.org>
parents:
diff changeset
    30
5a90ee674b42 Reinstate elf2e32, so that we can change it more easily in GCC_SURGE builds
William Roberts <williamr@symbian.org>
parents:
diff changeset
    31
/**
5a90ee674b42 Reinstate elf2e32, so that we can change it more easily in GCC_SURGE builds
William Roberts <williamr@symbian.org>
parents:
diff changeset
    32
This class is for reading the ELF file generated by the static linker and based on whether it is
5a90ee674b42 Reinstate elf2e32, so that we can change it more easily in GCC_SURGE builds
William Roberts <williamr@symbian.org>
parents:
diff changeset
    33
ET_EXEC or ET_DYN, it processes the imports(if required) or exports respectively.
5a90ee674b42 Reinstate elf2e32, so that we can change it more easily in GCC_SURGE builds
William Roberts <williamr@symbian.org>
parents:
diff changeset
    34
@internalComponent
5a90ee674b42 Reinstate elf2e32, so that we can change it more easily in GCC_SURGE builds
William Roberts <williamr@symbian.org>
parents:
diff changeset
    35
@released
5a90ee674b42 Reinstate elf2e32, so that we can change it more easily in GCC_SURGE builds
William Roberts <williamr@symbian.org>
parents:
diff changeset
    36
*/
5a90ee674b42 Reinstate elf2e32, so that we can change it more easily in GCC_SURGE builds
William Roberts <williamr@symbian.org>
parents:
diff changeset
    37
class ElfConsumer : public ElfExecutable
5a90ee674b42 Reinstate elf2e32, so that we can change it more easily in GCC_SURGE builds
William Roberts <williamr@symbian.org>
parents:
diff changeset
    38
{
5a90ee674b42 Reinstate elf2e32, so that we can change it more easily in GCC_SURGE builds
William Roberts <williamr@symbian.org>
parents:
diff changeset
    39
public:
5a90ee674b42 Reinstate elf2e32, so that we can change it more easily in GCC_SURGE builds
William Roberts <williamr@symbian.org>
parents:
diff changeset
    40
	ElfConsumer(ParameterListInterface *aParameterListInterface);
5a90ee674b42 Reinstate elf2e32, so that we can change it more easily in GCC_SURGE builds
William Roberts <williamr@symbian.org>
parents:
diff changeset
    41
	virtual ~ElfConsumer();
5a90ee674b42 Reinstate elf2e32, so that we can change it more easily in GCC_SURGE builds
William Roberts <williamr@symbian.org>
parents:
diff changeset
    42
	PLUINT32 ReadElfFile(char* aFile);
5a90ee674b42 Reinstate elf2e32, so that we can change it more easily in GCC_SURGE builds
William Roberts <williamr@symbian.org>
parents:
diff changeset
    43
	int GetElfSymbolList(list<Symbol*>& aList);
5a90ee674b42 Reinstate elf2e32, so that we can change it more easily in GCC_SURGE builds
William Roberts <williamr@symbian.org>
parents:
diff changeset
    44
	void GetImageDetails(/*E32ImageInterface aInterface*/);
5a90ee674b42 Reinstate elf2e32, so that we can change it more easily in GCC_SURGE builds
William Roberts <williamr@symbian.org>
parents:
diff changeset
    45
	PLUINT32 ProcessElfFile();
5a90ee674b42 Reinstate elf2e32, so that we can change it more easily in GCC_SURGE builds
William Roberts <williamr@symbian.org>
parents:
diff changeset
    46
5a90ee674b42 Reinstate elf2e32, so that we can change it more easily in GCC_SURGE builds
William Roberts <williamr@symbian.org>
parents:
diff changeset
    47
private:
5a90ee674b42 Reinstate elf2e32, so that we can change it more easily in GCC_SURGE builds
William Roberts <williamr@symbian.org>
parents:
diff changeset
    48
	char*		iMemBlock;
5a90ee674b42 Reinstate elf2e32, so that we can change it more easily in GCC_SURGE builds
William Roberts <williamr@symbian.org>
parents:
diff changeset
    49
};
5a90ee674b42 Reinstate elf2e32, so that we can change it more easily in GCC_SURGE builds
William Roberts <williamr@symbian.org>
parents:
diff changeset
    50
5a90ee674b42 Reinstate elf2e32, so that we can change it more easily in GCC_SURGE builds
William Roberts <williamr@symbian.org>
parents:
diff changeset
    51
5a90ee674b42 Reinstate elf2e32, so that we can change it more easily in GCC_SURGE builds
William Roberts <williamr@symbian.org>
parents:
diff changeset
    52
5a90ee674b42 Reinstate elf2e32, so that we can change it more easily in GCC_SURGE builds
William Roberts <williamr@symbian.org>
parents:
diff changeset
    53
5a90ee674b42 Reinstate elf2e32, so that we can change it more easily in GCC_SURGE builds
William Roberts <williamr@symbian.org>
parents:
diff changeset
    54
#endif // !defined(_PL_ELFCONSUMER_H_)