Pārlūkot izejas kodu

* first search for gnm and only then for nm
* fixed error message in case the output of (g)nm/objdump can't be parsed

git-svn-id: trunk@12349 -

Jonas Maebe 16 gadi atpakaļ
vecāks
revīzija
1597aac6d2
3 mainītis faili ar 6 papildinājumiem un 6 dzēšanām
  1. 1 1
      compiler/msg/errore.msg
  2. 1 1
      compiler/msgtxt.inc
  3. 4 4
      compiler/optdead.pas

+ 1 - 1
compiler/msg/errore.msg

@@ -2571,7 +2571,7 @@ wpo_cannot_extract_live_symbol_info_no_link=12014_E_Cannot extract symbol livene
 wpo_cannot_find_symbol_progs=12015_F_Cannot find "$1" or "$2" to extract symbol liveness information from linked program
 wpo_cannot_find_symbol_progs=12015_F_Cannot find "$1" or "$2" to extract symbol liveness information from linked program
 % Certain symbol liveness collectors need a helper program to extract the symbol information from the linked program.
 % Certain symbol liveness collectors need a helper program to extract the symbol information from the linked program.
 % This helper program is normally 'nm', which is part of the GNU binutils
 % This helper program is normally 'nm', which is part of the GNU binutils
-wpo_error_reading_symbol_file=12016_E_Error during reading symbol liveness information produced by "$2"
+wpo_error_reading_symbol_file=12016_E_Error during reading symbol liveness information produced by "$1"
 % An error occurred during the reading of the symbol liveness file that was generated using the 'nm' or 'objdump' program. The reason
 % An error occurred during the reading of the symbol liveness file that was generated using the 'nm' or 'objdump' program. The reason
 % can be that it was shorter than expected, or that its format was not understood.
 % can be that it was shorter than expected, or that its format was not understood.
 wpo_error_executing_symbol_prog=12017_F_Error executing "$1" (exitcode: $2) to extract symbol information from linked program
 wpo_error_executing_symbol_prog=12017_F_Error executing "$1" (exitcode: $2) to extract symbol information from linked program

+ 1 - 1
compiler/msgtxt.inc

@@ -881,7 +881,7 @@ const msgtxt : array[0..000209,1..240] of char=(
   '12015_F_Cannot find "$1" or "$2" to extract symbol liveness informatio'+
   '12015_F_Cannot find "$1" or "$2" to extract symbol liveness informatio'+
   'n from linked program'#000+
   'n from linked program'#000+
   '12016_E_Error during reading symbol liveness information produced by "'+
   '12016_E_Error during reading symbol liveness information produced by "'+
-  '$2"'#000+
+  '$1"'#000+
   '12017_F_Error executing "$1" (','exitcode: $2) to extract symbol inform'+
   '12017_F_Error executing "$1" (','exitcode: $2) to extract symbol inform'+
   'ation from linked program'#000+
   'ation from linked program'#000+
   '12018_E_Collection of symbol liveness information can only help when u'+
   '12018_E_Collection of symbol liveness information can only help when u'+

+ 4 - 4
compiler/optdead.pas

@@ -284,7 +284,7 @@ const
         result:=error;
         result:=error;
         if not result then
         if not result then
           exit;
           exit;
-        cgmessage1(wpo_error_reading_symbol_file,'fullutilname');
+        cgmessage1(wpo_error_reading_symbol_file,symbolprogfullpath);
 {$i-}
 {$i-}
         close(fsymfile);
         close(fsymfile);
 {$i+}
 {$i+}
@@ -349,11 +349,11 @@ const
 
 
 
 
     begin { twpodeadcodeinfofromexternallinker }
     begin { twpodeadcodeinfofromexternallinker }
-      { try nm }
-      symbolprogfound:=findutil('nm',nmfullname,symbolprogfullpath);
       { gnu-nm (e.g., on solaris) }
       { gnu-nm (e.g., on solaris) }
+      symbolprogfound:=findutil('gnm',nmfullname,symbolprogfullpath);
+      { regular nm }
       if not symbolprogfound then
       if not symbolprogfound then
-        symbolprogfound:=findutil('gnm',nmfullname,symbolprogfullpath);
+        symbolprogfound:=findutil('nm',nmfullname,symbolprogfullpath);
       if not symbolprogfound then
       if not symbolprogfound then
         begin
         begin
           { try objdump }
           { try objdump }