> I just want to make sure that programs that check for the presence
> of a DLL file by means of OpenFile() find what they want.
> And I think adding a small NE/PE header is good, too.
> But don't let this get out of hand...
> (sorry for not really explaining it before...)

Do many programs do that? I must admit I'm a bit suprised...

I had an idea of subverting OpenFile() to mask the contents of an ELF DLL by
pretending to return a PE header, but I'm not sure that that's a good idea.

> The GetFileVersion*() thing will have to wait a bit, as it will require
> massive support in the loader to figure out the loadorder correctly.
> But maybe I'll forget about the loadorder for the beginning and try to
> always parse the builtin DLL first and if that fails I branch to the old
> NE/PE parser.
> Of course that'll need a big FIXME "loadorder stuff missing" then ;-)

Yuk.

What about non-builtin elfdlls? Like libshell32.so.1.0... ELF parsing is
fairly straight forward, so you could divert the DLL parser from, say,
shell32.dll to libshell32.so where appropriate, and read the resource block
out of there. Of course, this'd be easier if the resources were contained in a
special section (called .rsrc probably) and padded out with the bits of fluff
that MSDEV's RC program puts in.

David

Reply via email to