February 25, 2007
On Sun, 25 Feb 2007 19:27:00 +0100, Frits van Bommel wrote: Or a bit of other (standard?) library support.
> 
>> Strangely finding information  like this online is extremely difficult.
> 
> About ELF or about linking it to PE?


About linking it to PE and about executing ELF on Windows..


> There's plenty of information about ELF available. Just google for "executable linkable format" instead of "ELF", since Google isn't case-sensitive ;)


Yes, I realize that.  I had no difficulty googling for ELF, thankyou. Fortunately, I've experienced Google enough to figure out how to use it. :P


> There might be no info about linking ELF to PE, but that could just be because nobody has been crazy enough to try it yet :P.
> 


Yes, this is the information that is very difficult to find.  But of more interest, actually using ELF executables on windows (not embedded in PE) would be of more interest to me.  I found very little information on that beyond the cross-elf reference I mentioned in another post.  The reference to that was made in another forum by a person asking a similar question as mine.


-JJR
February 25, 2007
Frits van Bommel wrote:
> John Reimer wrote:
>> On Mon, 26 Feb 2007 02:27:26 +0900, 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/ .
>>
>> 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. :)  
> 
> The link he posted doesn't use Cygwin. That project compiled native ..exes for several traditional Unix utilities, depending only on msvcrt.dll (distributed with windows).
> Apparently the .zip containing them is a dead link now, though. It used to be a quite compact download with lots of stand-alone utils though. I just re-zipped my install on another computer and it was only 137k.

The download is still available, but the project seems to have been abandoned.  I switched to GnuWin32 recently and think it's much better, if a tad unwieldy.  An accompanying download app called GetGnuWin32 is the best way to deal with installing those tools.


Sean
February 25, 2007
Sean Kelly wrote:
> Frits van Bommel wrote:
>> John Reimer wrote:
>>> On Mon, 26 Feb 2007 02:27:26 +0900, Bill Baxter wrote:
>>>
>>>> http://unxutils.sourceforge.net/ .
[snip]
>> Apparently the .zip containing them is a dead link now, though.
[snip]
> 
> The download is still available,

I just tried again:
---
Forbidden
You don't have permission to access /UnxUtils.zip on this server.

Apache/1.3.33 Server at unxutils.sourceforge.net Port 80
---
and:
---
Forbidden
You don't have permission to access /UnxUpdates.zip on this server.

Apache/1.3.33 Server at unxutils.sourceforge.net Port 80
---

And the downloads section of the project page at sourceforge is empty...


Not that I particularly care now that I'm running Linux.
February 25, 2007
Walter Bright wrote:
> Why does Mingw do coff on Win32, while the gcc tools everywhere else do elf? This makes no sense to me.

BFD (the binary format library for binutils, the linker and utilities that GCC uses), supports at least: a.out, b.out, COFF, ECOFF, ELF32, ELF64, Mach-O, NLM32, PE, PEF, PEI, VAX, EVAX, and several other binary formats.

It uses whichever one is appropriate for the OS.

 - Gregor Richards
February 25, 2007
Frits van Bommel wrote:
> 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.

I'm sorry. I meant:

The same reason the Linux kernel is free and the Windows Kernel is closed-source.

Damn dyslexia. ;)
February 25, 2007
Sean Kelly wrote:
> Frits van Bommel wrote:
>> John Reimer wrote:
>>> On Mon, 26 Feb 2007 02:27:26 +0900, 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/ .
>>>
>>> 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. :)  
>>
>> The link he posted doesn't use Cygwin. That project compiled native ..exes for several traditional Unix utilities, depending only on msvcrt.dll (distributed with windows).
>> Apparently the .zip containing them is a dead link now, though. It used to be a quite compact download with lots of stand-alone utils though. I just re-zipped my install on another computer and it was only 137k.

Too bad.  I downloaded it for the first time only a month or so ago.

> 
> The download is still available, but the project seems to have been abandoned.  

Yeh, last update is 2003.  But heck that's ok by me, grep and ls haven't changed all that much in the intervening 4 years.



> I switched to GnuWin32 recently and think it's much better, if a tad unwieldy.  An accompanying download app called GetGnuWin32 is the best way to deal with installing those tools.

I was hoping GetGnuWin32 was going to be a thing that let me click a box to select "Executables only", but it turns out it's just a batch script that wgets everything indiscriminately.

--bb
February 25, 2007

Frits van Bommel wrote:
> John Reimer wrote:
>> On Sun, 25 Feb 2007 18:28:04 +0100, Frits van Bommel wrote:
>>
>>> Julio César Carrascal Urquijo wrote:
>>>> 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...
> 
> What I meant was "I'm pretty sure it works already :)".
> I don't see any reason why it wouldn't work, but if there was one I'm
> pretty sure it would be noted on the site. Instead, there's mention of
> the possibility of OS-independent dynamic libraries.

I'm certainly no expert but from what I do know, the container the code is kept in is largely irrelevant.  All that really matters is that it's for the right CPU (hopefully the one you're using) and that a few other things are done the same way (like exceptions).

I think it's kind of like the difference between a text file stored in an archive.  Whether you use ZIP, RAR or 7z is beside the point: it's more important that the text file is in a language you understand :P

Finally, I believe the mention of OS-independent libraries was referring
to the possibility of writing shims that, providing the code was for the
right CPU, would resolve the other differences like exception handling.
 But then, I could be wrong :P

	-- Daniel

-- 
Unlike Knuth, I have neither proven or tried the above; it may not even make sense.

v2sw5+8Yhw5ln4+5pr6OFPma8u6+7Lw4Tm6+7l6+7D i28a2Xs3MSr2e4/6+7t4TNSMb6HTOp5en5g6RAHCP  http://hackerkey.com/
February 26, 2007
Bill Baxter wrote:
> 
> I was hoping GetGnuWin32 was going to be a thing that let me click a box to select "Executables only", but it turns out it's just a batch script that wgets everything indiscriminately.

Sadly, yes.  But once it's created the directory tree for you it's easy enough to just delete contrib, include, lib, etc.


Sean
February 26, 2007
Frits van Bommel wrote:
> Sean Kelly wrote:
>> Frits van Bommel wrote:
>>> John Reimer wrote:
>>>> On Mon, 26 Feb 2007 02:27:26 +0900, Bill Baxter wrote:
>>>>
>>>>> http://unxutils.sourceforge.net/ .
> [snip]
>>> Apparently the .zip containing them is a dead link now, though.
> [snip]
>>
>> The download is still available,
> 
> I just tried again:
> ---
> Forbidden
> You don't have permission to access /UnxUtils.zip on this server.
> 
> Apache/1.3.33 Server at unxutils.sourceforge.net Port 80

Ah well.  I haven't tried downloading this for a few months.  I guess the link has died since then.


Sean
February 26, 2007
Daniel Keep wrote:
> 
> I'm certainly no expert but from what I do know, the container the code
> is kept in is largely irrelevant.  All that really matters is that it's
> for the right CPU (hopefully the one you're using) and that a few other
> things are done the same way (like exceptions).
> 
> I think it's kind of like the difference between a text file stored in
> an archive.  Whether you use ZIP, RAR or 7z is beside the point: it's
> more important that the text file is in a language you understand :P

Where do calling conventions fit into that picture?  Doesn't it vary from platform to platform which of caller or callee pushes and pops arguments, or if some number of them are passed by registers instead of stack?

--bb