We found a simple solution (workaround?) to make this application perform well under WINE. Typical running time of the linking process is down from 30min to 15sec (!).
A short explanation: The TI linker allocates and frees a lot of small buffers, typical size 24-32 bytes - but we have not seen allocation of buffers smaller than 24 bytes. Due to fragmentation of the heap in WINE, the number of free buffers smaller than 24 bytes gradually increases. Since the free buffers are organized in 4 lists based on their size, the small (<24 bytes) buffers will go in the first list (which in the current version holds buffers of size <= 32), and each new allocation will have to search past these small buffers. After a while this consumes all processor time, due to the large number of allocations done by the linker.
A sufficient fix for this particular application is to introduce a new free list for buffers smaller than 24 bytes. In this way the small buffers will simply be skipped for each allocation, keeping allocation time relatively constant.
Note that this is a custom fix for this application, but maybe introducing more free list for small buffers can help other applications which allocate a lot of small buffers. I guess one has to collect data from a lot of apps to make a good tradeoff here. Anyway it was a good thing for us that the heap is "tunable".
The diff is with respect to Wine-20050211.tar.gz dlls/ntdll/heap.c