소스 검색

+ align files in generated .a files not by #0, but by #10 (Line Feed). This is
compatible with GNU ar and others, and fixes linking with sdcc-sdld.

git-svn-id: trunk@45277 -

nickysn 5 년 전
부모
커밋
6422e9a803
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 5 1
      compiler/owar.pas

+ 5 - 1
compiler/owar.pas

@@ -233,8 +233,12 @@ implementation
 
 
     procedure tarobjectwriter.closefile;
+      const
+        LF:char=#10;
       begin
-        ardata.align(2);
+        { align on an even boundary, by inserting an LF if necessary }
+        if odd(ardata.size) then
+          write(LF,1);
         { fix the size in the header }
         createarhdr(objfn,ardata.size-objpos-sizeof(tarhdr),'42','42','644');
         { write the header }