]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/ld: support archives larger than 2G
authorIan Lance Taylor <iant@golang.org>
Tue, 21 Jan 2014 17:29:19 +0000 (09:29 -0800)
committerIan Lance Taylor <iant@golang.org>
Tue, 21 Jan 2014 17:29:19 +0000 (09:29 -0800)
R=golang-codereviews, gobot, rsc
CC=golang-codereviews
https://golang.org/cl/53950043

src/cmd/ld/lib.c
src/cmd/ld/lib.h

index 18c27876eef20594877eba1ad57ec4bfb99a78c9..98fa7aa48233f762e40da4bbd0a3348297180b9d 100644 (file)
@@ -269,8 +269,8 @@ loadlib(void)
  * look for the next file in an archive.
  * adapted from libmach.
  */
-int
-nextar(Biobuf *bp, int off, struct ar_hdr *a)
+static vlong
+nextar(Biobuf *bp, vlong off, struct ar_hdr *a)
 {
        int r;
        int32 arsize;
@@ -300,7 +300,7 @@ nextar(Biobuf *bp, int off, struct ar_hdr *a)
 void
 objfile(char *file, char *pkg)
 {
-       int32 off, l;
+       vlong off, l;
        Biobuf *f;
        char magbuf[SARMAG];
        char pname[150];
index 761678ec0229124e05ab7cd64237e3b6185da5bc..99023f0ae2169bd261a41748c8978053a133d5d5 100644 (file)
@@ -241,7 +241,6 @@ void*       mal(uint32 n);
 void   mark(LSym *s);
 void   mywhatsys(void);
 struct ar_hdr;
-int    nextar(Biobuf *bp, int off, struct ar_hdr *a);
 void   objfile(char *file, char *pkg);
 void   patch(void);
 int    pathchar(void);