瀏覽代碼

* don't write an alignment for symbols in internal llvm sections (sections
whose name starts with 'llvm.')

git-svn-id: trunk@35038 -

Jonas Maebe 8 年之前
父節點
當前提交
d328d7d95d
共有 1 個文件被更改,包括 10 次插入3 次删除
  1. 10 3
      compiler/llvm/agllvm.pas

+ 10 - 3
compiler/llvm/agllvm.pas

@@ -1240,9 +1240,16 @@ implementation
                         writer.AsmWrite('"');
                         writer.AsmWrite('"');
                       end;
                       end;
                   end;
                   end;
-                  { alignment }
-                  writer.AsmWrite(', align ');
-                  writer.AsmWriteln(tostr(taillvmdecl(hp).alignment));
+                  { sections whose name starts with 'llvm.' are for LLVM
+                    internal use and don't have an alignment }
+                  if pos('llvm.',taillvmdecl(hp).secname)<>1 then
+                    begin
+                      { alignment }
+                      writer.AsmWrite(', align ');
+                      writer.AsmWriteln(tostr(taillvmdecl(hp).alignment));
+                    end
+                  else
+                    writer.AsmLn;
                 end;
                 end;
             end;
             end;
           ait_llvmalias:
           ait_llvmalias: