Selaa lähdekoodia

* tell GNU nm not to print undefined symbols, because
a) we don't care about them
b) for 32 bit binaries on 64 bit platforms, they are indented differently
than defined symbols
(fixes -OWsymbolliveness for 32 bit binaries on 64 bit Linux platforms)

git-svn-id: trunk@20950 -

Jonas Maebe 13 vuotta sitten
vanhempi
commit
a8087498fa
1 muutettua tiedostoa jossa 5 lisäystä ja 0 poistoa
  1. 5 0
      compiler/optdead.pas

+ 5 - 0
compiler/optdead.pas

@@ -398,6 +398,11 @@ const
       else
       else
         begin
         begin
           symbolprogfullpath:=symbolprogfullpath+' -p ';
           symbolprogfullpath:=symbolprogfullpath+' -p ';
+          { GNU nm shows 64 bit addresses when processing 32 bit binaries on
+            a 64 bit platform, but only skips 8 spaces for the address in case
+            of undefined symbols -> skip undefined symbols }
+          if target_info.system in (systems_linux+systems_windows) then
+            symbolprogfullpath:=symbolprogfullpath+'--defined-only ';
           symbolprogisnm:=true;
           symbolprogisnm:=true;
         end;
         end;
       if not symbolprogfound then
       if not symbolprogfound then