OBJ/LIB packer plugin

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
aziemer
Junior Member
Junior Member
Posts: 53
Joined: 2003-06-11, 06:56 UTC
Location: near Bremen, Germany
Contact:

OBJ/LIB packer plugin

Post by *aziemer »

Is there a need for a LIB file packer plugin for TC?

As I work a lot with 8051 microcontrollers and a C-compiler for them, I wrote a packer plugin for the OMF-51 format - which is not nearly finished yet, but if there is interest, maybe I can spend a bit more time on it :D

Your answers are welcome

Andreas
Geoffrey
Junior Member
Junior Member
Posts: 73
Joined: 2003-02-11, 10:53 UTC
Location: France/Belgium
Contact:

Post by *Geoffrey »

Do you mean library files, created under Un*ces ?
If so, I would be interested. I had personally thought of a lister plugin similar to SymbolView by Enrico Frumento (aka Nigurrath), based on GNU nm routines.

How do you view it as a packer plugin ?

Regards,
Geoffrey
Last edited by Geoffrey on 2003-06-12, 07:12 UTC, edited 1 time in total.
User avatar
aziemer
Junior Member
Junior Member
Posts: 53
Joined: 2003-06-11, 06:56 UTC
Location: near Bremen, Germany
Contact:

Post by *aziemer »

Geoffrey wrote:Do you mean library files, created under Un*ces ?
If so, I would be interested.
Yes, I mean library files and no, not under Un*x. My compiler is a console program under DOS/Windows. These libraries contain a collection of OBJ files just like those under Un*x, but with a special format called OMF-51.(infos: http://www.keil.com/download/docs/omf51.zip.asp)

Geoffrey wrote:How do you view it as a packer plugin ?
I go a unconventional way: I create something like a tree from the LIB.
Each objectmodule inside is represented as file which can be extracted.

Now, each (extracted) module (program block) within an objectfile is represented as a directory. This directory then contains files representing the symbols the module exports. The filesize is the actual symbolsize.

This approach does not cover things like externals or symbol types (for this I though of subdirectories under the module named CODE, DATA etc. to sort things up, but this is still only in my mind).

I used this plugin simply to inject and extract OBJ files into/from libraries.

Andreas
Geoffrey
Junior Member
Junior Member
Posts: 73
Joined: 2003-02-11, 10:53 UTC
Location: France/Belgium
Contact:

Post by *Geoffrey »

It sure is somewhat unconventional ;)

Anyway, I think this would be a very useful tool, and I'm volunteer to beta-test it anytime

Regards,
Geoffrey
User avatar
aziemer
Junior Member
Junior Member
Posts: 53
Joined: 2003-06-11, 06:56 UTC
Location: near Bremen, Germany
Contact:

Post by *aziemer »

I just thought about your first posting, and you're absolutely right :roll:
I split the whole thing up into
A) a packer type plugin, that can extract and add/replace/delete objects within a library, and
B) a viewer plugin that shows the content in a more readable form than as file entries...

But when I wrote this, I think there was no viewer plugin yet, :?: .
On the other hand, looking at the content of an object was never very useful except when I was searching in which module some buggy function or variable was.

Andreas

P.S: What library format would make sense for you?
*** Don't panic ***
Geoffrey
Junior Member
Junior Member
Posts: 73
Joined: 2003-02-11, 10:53 UTC
Location: France/Belgium
Contact:

Post by *Geoffrey »

Your packer plugin is a very good idea too ! I hadn't thought of that one.

I had at first the same idea of using a packer plugin, since there was no lister plugins by that time, but didn't have time/patience enough to implement such a plugin.

The format of library that would make more sense for me is the GNU format (I can compile either under Linux or under Windows, using Cygwin).
I don't know about OMF-51, nor about compatibility between this and GNU formats, but if the compiler is easy enough to use, I might try it as well.

Regards,
Geoffrey
User avatar
aziemer
Junior Member
Junior Member
Posts: 53
Joined: 2003-06-11, 06:56 UTC
Location: near Bremen, Germany
Contact:

Post by *aziemer »

After a while looking at this hermaphrodite plugin I decided to divide them again. There are more disadvantages than gains - to be honest, the only gain are some 10 kB in memory...

So here is the LIB plugin again - and enhanced a bit. It now
- lists/extracts/injects/deletes objects from OMF-51 (8051) libraries.
- lists/extracts objects from OMF-86 80x86 libraries (!ARCH type not yet supported)

Get it here: http://totalcommander.a-z-e.de/LIBv11.ZIP

Andreas
*** Don't panic ***
Post Reply