From 94c6a2cd26a8d4bb7e68c074fdb3c5914cce811b Mon Sep 17 00:00:00 2001 From: Nathan Woods Date: Fri, 30 Dec 2005 13:33:31 +0000 Subject: [PATCH] Modified rbuild to generate a map file of the boot loader svn path=/trunk/; revision=20457 --- reactos/tools/rbuild/backend/mingw/modulehandler.cpp | 9 ++++++--- reactos/tools/rbuild/backend/mingw/modulehandler.h | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/reactos/tools/rbuild/backend/mingw/modulehandler.cpp b/reactos/tools/rbuild/backend/mingw/modulehandler.cpp index c4fe4aeeb32..94a5cbda7f7 100644 --- a/reactos/tools/rbuild/backend/mingw/modulehandler.cpp +++ b/reactos/tools/rbuild/backend/mingw/modulehandler.cpp @@ -1321,7 +1321,7 @@ MingwModuleHandler::GenerateCommands ( } void -MingwModuleHandler::GenerateBuildMapCode () +MingwModuleHandler::GenerateBuildMapCode ( const char *mapTarget ) { fprintf ( fMakefile, "ifeq ($(ROS_BUILDMAP),full)\n" ); @@ -1334,7 +1334,8 @@ MingwModuleHandler::GenerateBuildMapCode () fprintf ( fMakefile, "\t$(ECHO_OBJDUMP)\n" ); fprintf ( fMakefile, - "\t$(Q)${objdump} -d -S $@ > %s\n", + "\t$(Q)${objdump} -d -S %s > %s\n", + mapTarget ? mapTarget : "$@", mapFilename.c_str () ); fprintf ( fMakefile, @@ -1345,7 +1346,8 @@ MingwModuleHandler::GenerateBuildMapCode () fprintf ( fMakefile, "\t$(ECHO_NM)\n" ); fprintf ( fMakefile, - "\t$(Q)${nm} --numeric-sort $@ > %s\n", + "\t$(Q)${nm} --numeric-sort %s > %s\n", + mapTarget ? mapTarget : "$@", mapFilename.c_str () ); fprintf ( fMakefile, @@ -2672,6 +2674,7 @@ MingwBootLoaderModuleHandler::GenerateBootLoaderModuleTarget () fprintf ( fMakefile, "\t${objcopy} -O binary %s $@\n", junk_tmp.c_str () ); + GenerateBuildMapCode ( junk_tmp.c_str() ); fprintf ( fMakefile, "\t-@${rm} %s 2>$(NUL)\n", junk_tmp.c_str () ); diff --git a/reactos/tools/rbuild/backend/mingw/modulehandler.h b/reactos/tools/rbuild/backend/mingw/modulehandler.h index 238ab1626cf..627c796a2f3 100644 --- a/reactos/tools/rbuild/backend/mingw/modulehandler.h +++ b/reactos/tools/rbuild/backend/mingw/modulehandler.h @@ -119,6 +119,7 @@ protected: const std::string& libsMacro, const std::string& pefixupParameters ); void GeneratePhonyTarget() const; + void GenerateBuildMapCode ( const char *mapTarget = NULL ); void GenerateRules (); void GenerateImportLibraryTargetIfNeeded (); void GetDefinitionDependencies ( string_list& dependencies ) const; @@ -199,7 +200,6 @@ private: bool IsWineModule () const; std::string GetDefinitionFilename () const; static std::string RemoveVariables ( std::string path); - void GenerateBuildMapCode (); void GenerateBuildNonSymbolStrippedCode (); void CleanupCompilationUnitVector ( std::vector& compilationUnits ); void GetRpcHeaderDependencies ( std::vector& dependencies ) const;