https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93278
--- Comment #5 from doug mcilroy <doug at cs dot dartmouth.edu> --- The waste of time and space happens in the assembler, but the assembler only does what it is told to do. There must be a way for gcc to tell it to put array a in a partially filled ELF section. $ cat junk.c char a[10000000] = "x"; int main(){ return 0; } $ bin/gcc --version bin/gcc (GCC) 7.4.0 Copyright (C) 2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ time /bin/gcc junk.c real 0m3.864s user 0m2.919s sys 0m0.326s $ ls -l a.exe -rwxr-xr-x 1 DOUG DOUG 10158440 Jan 17 14:43 a.exe