objdiff icon indicating copy to clipboard operation
objdiff copied to clipboard

Support OMF object format

Open tomsons26 opened this issue 1 year ago • 3 comments

Supporting OMF would also open objdiff to being used with Borland, really old MSVC, and Watcom targets There are probably a lot of other lesser used compilers that use OMF, probably everything very old aimed for dos uses OMF https://web.archive.org/web/20200207210113/https://pierrelib.pagesperso-orange.fr/exec_formats/OMF_v1.1.pdf is the specs OmniBlade had to do support for it in a binutils fork so decompme has a usable objdump https://github.com/OmniBlade/binutils-gdb/tree/omf-binutils-2_22-branch

another reference point can be https://github.com/tomsons26/objconv/commits/omf_fixes/ which is my fork that sort of fixes objconv to handle 32 bit OMF records properly, its a bit of a ugly hack tho as it can only output core c/cpp functions, it strips away inlines/comdats/anything compiler generated

tomsons26 avatar Aug 19 '24 18:08 tomsons26

Someone has ported the OMF support to a newer binutils and improved it at https://github.com/sillyc0n/binutils-gdb/tree/binutils-2_42-branch-omf-with-thread-support though I haven't tested it. Might be worth seeing if the upstream objects library that is being used is interested in adding omf support?

OmniBlade avatar Aug 29 '24 10:08 OmniBlade

Upstream repo looks like its https://github.com/gimli-rs/object though it was annoyingly hard to find given the generic name of the library?

OmniBlade avatar Aug 29 '24 11:08 OmniBlade

Added an upstream request at https://github.com/gimli-rs/object/issues/736.

OmniBlade avatar Oct 10 '24 09:10 OmniBlade