Modified rbuild to generate a map file of the boot loader
authorNathan Woods <npwoods@mess.org>
Fri, 30 Dec 2005 13:33:31 +0000 (13:33 +0000)
committerNathan Woods <npwoods@mess.org>
Fri, 30 Dec 2005 13:33:31 +0000 (13:33 +0000)
svn path=/trunk/; revision=20457

reactos/tools/rbuild/backend/mingw/modulehandler.cpp
reactos/tools/rbuild/backend/mingw/modulehandler.h

index c4fe4ae..94a5cbd 100644 (file)
@@ -1321,7 +1321,7 @@ MingwModuleHandler::GenerateCommands (
 }
 
 void
 }
 
 void
-MingwModuleHandler::GenerateBuildMapCode ()
+MingwModuleHandler::GenerateBuildMapCode ( const char *mapTarget )
 {
        fprintf ( fMakefile,
                  "ifeq ($(ROS_BUILDMAP),full)\n" );
 {
        fprintf ( fMakefile,
                  "ifeq ($(ROS_BUILDMAP),full)\n" );
@@ -1334,7 +1334,8 @@ MingwModuleHandler::GenerateBuildMapCode ()
        fprintf ( fMakefile,
                  "\t$(ECHO_OBJDUMP)\n" );
        fprintf ( fMakefile,
        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,
                  mapFilename.c_str () );
 
        fprintf ( fMakefile,
@@ -1345,7 +1346,8 @@ MingwModuleHandler::GenerateBuildMapCode ()
        fprintf ( fMakefile,
                  "\t$(ECHO_NM)\n" );
        fprintf ( fMakefile,
        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,
                  mapFilename.c_str () );
 
        fprintf ( fMakefile,
@@ -2672,6 +2674,7 @@ MingwBootLoaderModuleHandler::GenerateBootLoaderModuleTarget ()
        fprintf ( fMakefile,
                  "\t${objcopy} -O binary %s $@\n",
                  junk_tmp.c_str () );
        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 () );
        fprintf ( fMakefile,
                  "\t-@${rm} %s 2>$(NUL)\n",
                  junk_tmp.c_str () );
index 238ab16..627c796 100644 (file)
@@ -119,6 +119,7 @@ protected:
                                     const std::string& libsMacro,
                                     const std::string& pefixupParameters );
        void GeneratePhonyTarget() const;
                                     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;
        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);
        bool IsWineModule () const;
        std::string GetDefinitionFilename () const;
        static std::string RemoveVariables ( std::string path);
-       void GenerateBuildMapCode ();
        void GenerateBuildNonSymbolStrippedCode ();
        void CleanupCompilationUnitVector ( std::vector<CompilationUnit*>& compilationUnits );
        void GetRpcHeaderDependencies ( std::vector<std::string>& dependencies ) const;
        void GenerateBuildNonSymbolStrippedCode ();
        void CleanupCompilationUnitVector ( std::vector<CompilationUnit*>& compilationUnits );
        void GetRpcHeaderDependencies ( std::vector<std::string>& dependencies ) const;