February 25, 2007
On Sun, 25 Feb 2007 15:08:56 +0100, Jascha Wetzel wrote:

> Bill Baxter wrote:
>> Thinking about it, it might actually seem like a better deal if you said it was $15 for coff2omf and obj2asm, and the rest of the stuff is thrown in for free.  As it is the web page seems to imply that coff2omf is about equal to chmod in terms of programming effort and is contributing equally to the cost.
> 
> or let's say you support walter's multi-year effort for D by buying the
> package, no matter it's content. i'd buy a megabyte of white noise for
> that matter ;)
> but i found that EUP's grep tool is even more useful than white noise...


Right.  Oh and I forgot about the grep tool.  It is good! :)

-JJR
February 25, 2007
Walter Bright wrote:
> Bill Baxter wrote:
>> Or if it is then maybe Walter should provide a web-based coff2omf service.  $2 a pop, and if it doesn't work you don't pay.  Or something like that.  I might give that a try.  :-)
> 
> It's only $15. And I've been known to give refunds to people it didn't work for, even though I think each of the utilities in the EUP are easily worth $15 by themselves. OBJ2ASM in particular!

In the case of the D version of AllegroGL, I need a free tool that I can point people to.  Otherwise, it's not an option to use coff2omf.  A free library can't depend on people obtaining non-free tools.  Even if I could provide the needed binaries for linking with, it's a dead end, because anyone supposed to take over maintenance after me would need to buy coff2omf too.  Which isn't going to happen.


But I guess making AllegroGL compile to a dll is the better solution in the long run, since it doesn't depend on compiling to a specific version of the coff format.
February 25, 2007
John Reimer wrote:
> On Sun, 25 Feb 2007 15:08:56 +0100, Jascha Wetzel wrote:
> 
>> Bill Baxter wrote:
>>> Thinking about it, it might actually seem like a better deal if you said
>>> it was $15 for coff2omf and obj2asm, and the rest of the stuff is thrown
>>> in for free.  As it is the web page seems to imply that coff2omf is
>>> about equal to chmod in terms of programming effort and is contributing
>>> equally to the cost.
>> or let's say you support walter's multi-year effort for D by buying the
>> package, no matter it's content. i'd buy a megabyte of white noise for
>> that matter ;)
>> but i found that EUP's grep tool is even more useful than white noise...
> 
> 
> Right.  Oh and I forgot about the grep tool.  It is good! :)

There are number of free sources for unix-like tools for windows. There's Cygwin, of course.  Then there's also http://unxutils.sourceforge.net/ .

--bb
February 25, 2007
Julio César Carrascal Urquijo wrote:
> Walter Bright wrote:
>> Since I have to support Elf anyway, it still leaves me supporting two formats.
>>
> 
> I take from this that you plan on dumping OMF support on DMD for Windows and generate ELF .obj on both platforms. Right?
> 
> Wouldn't that defeat the purpose of:
> 
>  > Uses Existing Tools
>  >
>  > D produces code in standard object file format, enabling the use of
>  > standard assemblers, linkers, debuggers, profilers, exe compressors,
>  > and other analyzers, as well as linking to code written in other
>  > languages.
> 
> http://www.digitalmars.com/d/overview.html
> 
> I haven't seen any linker / librarian on windows that support ELF.

I have: Binutils (ld and friends) can easily be compiled on Windows with support for ELF.
Unfortunately, IIRC it can't support PE at the same time :(. It seems the MinGW patches break support for other file formats...

> Also, I think this change will adversely affect DDL (http://dsource.org/projects/ddl/) since it loads the .obj files and links them directly into the application.

DDL already supports ELF (as well as COFF/PE). I can't find any mention on the site that this feature is not available on Windows.
February 25, 2007
On Sun, 25 Feb 2007 10:48:36 +0100, Frits van Bommel wrote:

> John Reimer wrote:
>> On Sat, 24 Feb 2007 22:33:11 -0800, Walter Bright wrote:
>> 
>>> Why does Mingw do coff on Win32, while the gcc tools everywhere else do elf? This makes no sense to me.
>> 
>> 
>> It seems that elf is an object /and/ executable format, so it requires support from the OS somehow.
> 
> Only if you use the executable format. I don't see any reason it couldn't be used as an object format (unless PE executables need information ELF has no way to represent).
> 


Okay, thanks.  That clarifies things a little.  So elf must have two formats in one, and the object elf format is not dependentant on the elf executable format?  So really it comes down to whether the elf object format can embed in a PE?  Further, for elf shared libraries, I assume having an appropriate dynamic linker is still important.

Strangely finding information  like this online is extremely difficult.
All I know is that there was a project (several years ago ~1999)
that provided a elf-linker/loader for NT which now has fallen into
non-existance: it was called cross-elf.


>> Whereas coff is merely an object format and PE appears to be windows executable format.
>> 
>> That may be the reason that mingw went coff instead, even it it isn't compatible with MS coff objects.
> 
> IIRC mingw is compatible with *some* MS .lib files. It may be just
> import libraries, and/or just C libraries.
> I remember there being *-msvc and *-mingw .libs for one library (I think
> it was Allegro or SDL or some such) where the difference was _what they
> were compiled with_, not _what they could be used with_. In fact, IIRC
> it was recommended to use the *-msvc libs even for mingw...


Yes, this might be possible, but I'm not sure how it works, since I read
online somewhere that mingw uses a different naming convention for its
coff as well as other small changes (dss).  Maybe the mingw linker (ld)
understands more than its own coff variation, however.  That
makes mingw look even better in my eyes.  I know mingw ld.exe supports a
whole bunch of other linker formats including elf -- huge bonus.  The only
one it doesn't support is OMF! :)

-JJR
February 25, 2007
Julio César Carrascal Urquijo wrote:
> Jarrett Billingsley wrote:
>> Why is that free with the Linux distro, though?  :( 
> 
> The same reason the Linux kernel is free on Linux and closed-source on Windows.

The Linux kernel is closed-source on Windows? I don't think so. You may need a cross-compiler to compile it, but it's still open-source.
February 25, 2007
On Sun, 25 Feb 2007 18:28:04 +0100, Frits van Bommel wrote:

> Julio César Carrascal Urquijo wrote:
>> Walter Bright wrote:
>>> Since I have to support Elf anyway, it still leaves me supporting two formats.
>>>
>> 
>> I take from this that you plan on dumping OMF support on DMD for Windows and generate ELF .obj on both platforms. Right?
>> 
>> Wouldn't that defeat the purpose of:
>> 
>>  > Uses Existing Tools
>>  >
>>  > D produces code in standard object file format, enabling the use of
>>  > standard assemblers, linkers, debuggers, profilers, exe compressors,
>>  > and other analyzers, as well as linking to code written in other
>>  > languages.
>> 
>> http://www.digitalmars.com/d/overview.html
>> 
>> I haven't seen any linker / librarian on windows that support ELF.
> 
> I have: Binutils (ld and friends) can easily be compiled on Windows with
> support for ELF.
> Unfortunately, IIRC it can't support PE at the same time :(. It seems
> the MinGW patches break support for other file formats...
> 


Yes, I noticed that ld.exe supported several formats.  I had not idea whether it worked or not.  Thanks for clarifying :(.  Maybe there's a deeper reason for why PE and elf can't work together?


>> Also, I think this change will adversely affect DDL (http://dsource.org/projects/ddl/) since it loads the .obj files and links them directly into the application.
> 
> DDL already supports ELF (as well as COFF/PE). I can't find any mention on the site that this feature is not available on Windows.


Where, oh where is Pragma?  He could tell us... :)

Or I may just go try it out...

-JJR
February 25, 2007
John Reimer wrote:
> On Sun, 25 Feb 2007 15:08:56 +0100, Jascha Wetzel wrote:
> 
>> Bill Baxter wrote:
>>> Thinking about it, it might actually seem like a better deal if you said
>>> it was $15 for coff2omf and obj2asm, and the rest of the stuff is thrown
>>> in for free.  As it is the web page seems to imply that coff2omf is
>>> about equal to chmod in terms of programming effort and is contributing
>>> equally to the cost.
>> or let's say you support walter's multi-year effort for D by buying the
>> package, no matter it's content. i'd buy a megabyte of white noise for
>> that matter ;)
>> but i found that EUP's grep tool is even more useful than white noise...
> 
> Right.  Oh and I forgot about the grep tool.  It is good! :)

Why are you so excited about DM's grep?
Is it much better than the GNU version?[1]
Because that one is available for free, even on Windows.
From http://www.digitalmars.com/ctg/grep.html, the only features mentioned that the GNU version doesn't (or at least that I don't know how to turn on) are -v (verbose, woohoo ;) ), and wide character searching. That last one may be useful for some people, but AFAIK I don't even have any text files with wide characters on my computer.

Unless, of course, you're being sarcastic.



[1]: I can understand it being more useful than white noise ;).
February 25, 2007
On Mon, 26 Feb 2007 02:27:26 +0900, Bill Baxter wrote:

> John Reimer wrote:
>> On Sun, 25 Feb 2007 15:08:56 +0100, Jascha Wetzel wrote:
>> 
>>> Bill Baxter wrote:
>>>> Thinking about it, it might actually seem like a better deal if you said it was $15 for coff2omf and obj2asm, and the rest of the stuff is thrown in for free.  As it is the web page seems to imply that coff2omf is about equal to chmod in terms of programming effort and is contributing equally to the cost.
>>> or let's say you support walter's multi-year effort for D by buying the
>>> package, no matter it's content. i'd buy a megabyte of white noise for
>>> that matter ;)
>>> but i found that EUP's grep tool is even more useful than white noise...
>> 
>> 
>> Right.  Oh and I forgot about the grep tool.  It is good! :)
> 
> There are number of free sources for unix-like tools for windows. There's Cygwin, of course.  Then there's also http://unxutils.sourceforge.net/ .
> 
> --bb


Yes, I know.  In fact, you don't even need to get cygwin to get grep.  You can use MSYS instead, which I prefer.

But for those that don't want to download all the extras or go anywhere
near the unix compatibility layers, having access to a tool that
just works on the current OS without dependencies is a feature. :)

-JJR
February 25, 2007
Bill Baxter wrote:
> There are number of free sources for unix-like tools for windows. There's Cygwin, of course.  Then there's also http://unxutils.sourceforge.net/ .

More complete and up to date set of tools here:

http://gnuwin32.sourceforge.net/