Hello,

Thanks for this, and also sorry for the lazy question.

My testing on my machine indicates a limit of 2GB total limit on compile: 

too much data in section SXCOFFTOC (over 2e+09 bytes)
too much data in section SDATA (over 2e+09 bytes)

I have built a bash script that creates large random files of a fixed size 
and then generates a short Go program that embeds them, increasing the 
number of files with each run, so you can see when your compile fails. 
You can find the bash and instructions here: 
https://github.com/gnewton/test_go_embed

I just threw it together, so might be a little rough around the edges. 
Feedback welcome.

Question: Wondering why the above error complains about too much data in 
*two* sections: are the embedded files stored across multiple sections (I 
know nothing of how this is done internally to the elf format)?

Thanks,
Glen

On Monday, September 20, 2021 at 5:11:45 PM UTC-4 Ian Lance Taylor wrote:

> On Mon, Sep 20, 2021 at 2:04 PM Glen Newton <glen....@gmail.com> wrote:
> >
> > I am testing this with an increasing number of 1GB files. At 3 files, 
> and I am getting this error:
> >
> > compile: writing output: write $WORK/b001/_pkg_.a: no space left on 
> device
> >
> > I haven't been able to find how to change $WORK to point to a larger 
> partition. Suggestions?
>
> Set the TMPDIR environment variable to control temporary files in
> general, or the GOTMPDIR environment variable to control just
> temporary files created by the go tool.
>
> Ian
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/65e20ea9-cbe4-4cf1-823d-a8fa063ae44fn%40googlegroups.com.

Reply via email to