public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Performance issue with GNU/ld and DLL
@ 2012-01-28 13:55 Pascal Obry
  2012-02-05  9:11 ` Pascal Obry
  0 siblings, 1 reply; 12+ messages in thread
From: Pascal Obry @ 2012-01-28 13:55 UTC (permalink / raw)
  To: binutils

[-- Attachment #1: Type: text/plain, Size: 968 bytes --]


Hello,

This is a performance issue report when building DLL on Windows. To
reproduce I have attached a python script (to generate C files).

The steps to reproduce are:

Run gen.py on an empty directory.

$ gcc -c *.c

$ time gcc -o main.exe *.o

takes 0.4 seconds.

$ time gcc -shared -o dll.dll *.o

takes 12 seconds.

It seems that the times goes exponentially. I had generated 1000 files
instead of 200 (N=1000 in gen.py) and I had to kill the linker command
after 10 minutes.

Is that a known problem?

Is there a workaround?

Thanks in advance.

Pascal.

-- 

--|------------------------------------------------------
--| Pascal Obry                           Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--|    http://www.obry.net  -  http://v2p.fr.eu.org
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver keys.gnupg.net --recv-key F949BD3B


[-- Attachment #2: gen.py --]
[-- Type: text/x-python, Size: 348 bytes --]

#! /usr/bin/python

m = open ("main.c", "w")
m.write ("void main ()\n");
m.write ("{\n")

N=200

for k in range(1,N):
    f = open ("file" + str(k) + ".c", "w")
    for n in range(1,N):
        f.write ("void call" + str(k) + "_" + str(n) + "() {}");
    f.close
    m.write ("   call" + str(k) + "_" + str(k) + " ();\n");

m.write ("}\n")
m.close

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2012-02-11 22:17 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-28 13:55 Performance issue with GNU/ld and DLL Pascal Obry
2012-02-05  9:11 ` Pascal Obry
2012-02-06 13:19   ` nick clifton
2012-02-09 18:31     ` Pascal Obry
2012-02-09 21:46       ` Pascal Obry
2012-02-10  6:46         ` Pascal Obry
2012-02-10  8:01     ` Pascal Obry
2012-02-10  9:27       ` Kai Tietz
2012-02-10 16:11         ` Pascal Obry
2012-02-10 16:16           ` Kai Tietz
2012-02-11 19:26       ` nick clifton
2012-02-11 22:17         ` Pascal Obry

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).