flat assembler
Message board for the users of flat assembler.

Index > Windows > Converting COFF to OMF

Author
Thread Post new topic Reply to topic
wyvern



Joined: 08 Dec 2011
Posts: 27
wyvern
Hi, im using the Agner's OBJCONV tool to convert the .obj generated by FASM into OMF so i can link with TLINK32.

>fasm app.asm
>objconv -fomf app.obj appOMF.obj
>tlink32 /TPe /aa /c appOMF.obj,,,import32.lib
-"Warning: no program entry point"

So im getting that warning, and the .exe generated cant run without entry point.

With the TASM32 assembler you write something like:

Code:
start:
   ;code
end start
    

to specifiy where is the entry point, since TLINK32 doesnt have a switch to do this.

So mi question is what i need to write in mi FASM source to be considered as entry point even after being converted to OMF?.
[/code]

_________________
Thanks
Post 15 Dec 2011, 21:57
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17287
Location: In your JS exploiting you and your system
revolution
Code:
format coff
entry start
start:
  ;...    
Post 15 Dec 2011, 23:44
View user's profile Send private message Visit poster's website Reply with quote
wyvern



Joined: 08 Dec 2011
Posts: 27
wyvern
I tryed with "format coff" or "format ms coff" both with "entry start", but i still getting the same "Warning: no program entry point" message after linking.
Post 16 Dec 2011, 00:10
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17287
Location: In your JS exploiting you and your system
revolution
Maybe you need to tell your linker which label to use for the entry point?
Post 16 Dec 2011, 00:33
View user's profile Send private message Visit poster's website Reply with quote
wyvern



Joined: 08 Dec 2011
Posts: 27
wyvern
thats the thing about TLINK32... it doesnt have a switch for that.
Post 16 Dec 2011, 00:49
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17287
Location: In your JS exploiting you and your system
revolution
Maybe you need to tell OBJCONV which label to use for the entry point?
Post 16 Dec 2011, 00:53
View user's profile Send private message Visit poster's website Reply with quote
wyvern



Joined: 08 Dec 2011
Posts: 27
wyvern
Well... that could be a chance, the usage info says:
Quote:

Object file converter version 2.12 for x86 and x86-64 platforms.
Copyright (c) 2011 by Agner Fog. Gnu General Public License.

Usage: objconv options inputfile [outputfile]

Options:
-fXXX[SS] Output file format XXX, word size SS. Supported formats:
PE, COFF, ELF, OMF, MACHO

-fasm Disassemble file (-fmasm, -fnasm, -fyasm, -fgasm)

-dXXX Dump file contents to console.
Values of XXX (can be combined):
f: File header, h: section Headers, s: Symbol table,
r: Relocation table, n: string table.

-xs Strip exception handling info and other incompatible info.
-xp Preserve exception handling info and other incompatible info.

-nu change symbol Name Underscores to the default for the target format.
-nu- remove Underscores from symbol Names.
-nu+ add Underscores to symbol Names.
-nd replace Dot/underscore in section names.
-nr:N1:N2 Replace symbol Name N1 with N2.
-ar:N1:N2 make Alias N2 for existing public name N1.
-np:N1:N2 Replace symbol Prefix N1 with N2.
-nw:N1 make public symbol Name N1 Weak (ELF and MAC64 only).
-nl:N1 make public symbol Name N1 Local (invisible).

-lx eXtract all members from Library.
-lx:N1:N2 eXtract member N1 from Library to file N2.
-ld:N1 Delete member N1 from Library.
-la:N1:N2 Add object file N1 to Library as member N2.
Alternative: -lib LIBRARYNAME OBJECTFILENAMES.

-vN Verbose options. Values of N:
0: Silent, 1: Print file names and types, 2: Tell about conversions.

-wdNNN Disable Warning NNN.
-weNNN treat Warning NNN as Error. -wex: treat all warnings as errors.
-edNNN Disable Error number NNN.
-ewNNN treat Error number NNN as Warning.

-h Print this help screen.

@RFILE Read additional options from response file RFILE.


Example:
objconv -felf32 -nu filename.obj filename.o


But really, i dont know what can be usefull from here.
Post 16 Dec 2011, 02:03
View user's profile Send private message Reply with quote
Yardman



Joined: 12 Apr 2005
Posts: 245
Location: US
Yardman
[ Post removed by author. ]


Last edited by Yardman on 04 Apr 2012, 03:44; edited 2 times in total
Post 16 Dec 2011, 03:57
View user's profile Send private message Reply with quote
wyvern



Joined: 08 Dec 2011
Posts: 27
wyvern
Ok, thank you, i will check that. And what you think about write the "End" directive by hand? would be difficult?
Post 16 Dec 2011, 20:25
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.