Bläddra i källkod

+ 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 år sedan
förälder
incheckning
6422e9a803
1 ändrade filer med 5 tillägg och 1 borttagningar
  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 }