View mode: basic / threaded / horizontal-split · Log in · Help
June 21, 2009
Re: The proper case for D.
Steve Teale wrote:
>>>> What's up with all the negativity lately? Impatience?
>>> Some people think D2 tries too much, and neglects the really important
>>> things at the same time. For example, D2 tries to solve the concurrency
>>> issue (which is a hot topic which makes D look good at sites like
>>> stackoverflow), while still relying on a 20 years old linker written in
>>> assembler.
>> So the better direction according to some is to stagnate language design for 
>> D2 so Walter Bright can reinvent the linker? So that years later when asked 
>> why D didn't do more for concurrency when it was needed, you'd have to 
>> reply: "well there wasn't any time to deal with such trivial issues, the 
>> language designer had to work on the toolchain."
>>
> You are of course completely correct in this, but the question is,
> can you do a new linker? I can't. There must be someone out there who can - please, please.
> 
> 
http://www.gnu.org/software/binutils/ ?

		Jerome
-- 
mailto:jeberger@free.fr
http://jeberger.free.fr
Jabber: jeberger@jabber.fr
June 21, 2009
Re: The proper case for D.
Walter Bright Wrote:

> Robert Fraser wrote:
> > Your explanation sounds likely, however it seems VS is discriminating on 
> > the per-symbol level...?
> 
> Let's say the C++ source file looks like:
> 
> ----------------------------
> int foo() { ... }
> int bar() { ... }
> ----------------------------
> 
> it is compiled and put into a library. Your program references foo(). 
> Pulling in the object module from the library that contains foo() also 
> pulls in bar(), because bar() is in the same object module. If bar() 
> references a bunch of other stuff, that gets pulled in, too.
> 
> VS may contain some scheme to split a source file into multiple object 
> modules which prevents this.
> 
> Note that dmd will split a single source file into multiple object 
> modules when you compile with -lib.

Ah, thanks for the explanation. I didn't understand it pulled in whole object files at once, though given that libraries are just archives of object files, I should have assumed.
June 22, 2009
Re: The proper case for D.
robert fraser wrote:
> Ah, thanks for the explanation. I didn't understand it pulled in
> whole object files at once, though given that libraries are just
> archives of object files, I should have assumed.

The linker can eliminate some unused COMDATs from the object file, but 
in general this isn't very effective because most of the semantic 
information is gone.

That's what makes the -lib switch so nifty, it does the splitting up 
with full knowledge of the semantic info, so it does a proper job of it.
Next ›   Last »
1 2 3
Top | Discussion index | About this forum | D home