Ticket #23 (closed defect: worksforme)

Opened 3 years ago

Last modified 3 years ago

OMF and implibs

Reported by: pragma Assigned to: pragma
Priority: major Milestone: Beta 1.1 - Refactoring
Component: OMF Loader Version: Beta 1
Keywords: Cc:

Description

OMF support is presently broken with supporting the 88H record type extensions for 32bit linking. Most notably among these is subrecord A0/01, which involves handling implib symbols and dll dependencies.

The problem with fixing this bug is more involved than merely parsing in the needed data. Since this creates a live dependency between the loaded lib and a DLL, a variety of support types become possible.

An architecture change may be needed to supply some kind of feedback from the low-level parsing and loading to the current linker or loader being used. The reason for this is that the loaded dll (either os or ddl loaded) needs some kind of resource tracking (for the os handle or the ddl equivalent thereof).

It should be noted that this is a distinctly Windows based problem, so the fix shouldn't impinge on any potential for porting to *nix.

Change History

12/28/05 22:37:13 changed by pragma

It would be nice to feedback into the LoaderRegistry? in order to upen the needed .dll file, but there's no way to distinguish the native loader from the COFF one at that level.

The handle(s) for the needed dlls can be loaded directly at the OMFBinary level and passed up to the OMFModule level as needed. The OMFModule class' destructor will then be responsible for handle cleanup. As long as the module remains in scope, the handle stays valid (which may be problematic - this needs more research).

01/15/06 07:16:18 changed by pragma

  • status changed from new to assigned.
  • version set to Beta 1.
  • milestone set to Beta 1.1 - Refactoring.

01/16/06 17:12:18 changed by pragma

The current solution is to have some Windows specific code in OMFBinary, that loads and interrogates a dll via the OS's loader. Any other solution would/could alter the behavior of the underlying library, so this is as good as it gets. The appropriate sections are versioned such that non-windows builds will throw if an implib is loaded.

Will keep ticket open until this looks completely finalized.

02/04/06 23:47:26 changed by pragma

Preliminary fix looks good, but Kris is still having huge problems getting things to link correctly. Will try to fix up during or after the 1.1b refactoring pass (oddly enough, is primarily for Mango compatibility).

04/14/06 13:57:42 changed by pragma

  • status changed from assigned to closed.
  • resolution set to worksforme.

Interim solution looks good.