diff --git a/compiler/optdead.pas b/compiler/optdead.pas index 04e545771e..23c7a688fa 100644 --- a/compiler/optdead.pas +++ b/compiler/optdead.pas @@ -398,6 +398,11 @@ const else begin 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; end; if not symbolprogfound then