1

I found this for a vanilla case of Bash on GNU/Linux, but what about other shells, other operating systems and other compilers?

1737973
  • 159
  • 18
  • 42

1 Answers1

1

How many object files can I pass to a linking task?

Depends on the linker you use.

When using binutils gnu-ld or gold, you can use Windows-style response file, which allows you to bypass command line length limits and pass as many arguments as you need:

echo "foo.o bar.o baz.o ... -lc" > args
gcc main.o -Wl,@args  # there is no limit on how big args file is.
Employed Russian
  • 199,314
  • 34
  • 295
  • 362