Browse Source

Discard ait_symbol_end if tai_symbol_end(hp).sym.is_used is false

Pierre Muller 2 months ago
parent
commit
08b7d2ffdb
1 changed files with 1 additions and 0 deletions
  1. 1 0
      compiler/aggas.pas

+ 1 - 0
compiler/aggas.pas

@@ -1503,6 +1503,7 @@ implementation
            ait_symbol_end :
            ait_symbol_end :
              begin
              begin
                if (tf_needs_symbol_size in target_info.flags) and
                if (tf_needs_symbol_size in target_info.flags) and
+                  (tai_symbol_end(hp).sym.is_used) and
                  { On WebAssembly, the .size directive shouldn't be generated for
                  { On WebAssembly, the .size directive shouldn't be generated for
                    function symbols, otherwise LLVM-MC v16 and above produce the
                    function symbols, otherwise LLVM-MC v16 and above produce the
                    'warning: .size directive ignored for function symbols' message. }
                    'warning: .size directive ignored for function symbols' message. }