Hi,
i'm thinking about %subj%...
what if i have no resources in my app, don't want to have section where all imports reside(can't remember name...), i will get all import myself, don't want any data seg, probably wins won't let me not to have data section, i want to have only text section i.e code section, what about that ?is that possible....? still haven't tried this at home :-(, will try some time :-) really :-)
Posted on 2002-02-15 04:29:03 by me8
Your problem is that PE files are a specification and for an operating system to load one, it needs to conform to that standard. The minimum PE file that runs on the range of windows versions has one section that has the MZ and PE header plus section data, and the other is a merged collection of others.

Two sections is 1024 bytes and it does not have much in it. The various "PE" files that get smaller with things like miniature MZ headers do not run on all versions.

Good Luck.

hutch@movsd.com
Posted on 2002-02-15 04:47:14 by hutch--
sure why not... you can throw everything you need in
the code section but you have to mark it writable and
readable with the linker options, i'm not sure, i think
it was like /SECTION:.text,rw ... but why do you want
to exclude the import section? i think you meant the
ressource sec... you can get rid of your imports, too
(but you need atleast ONE entry for nt compatiblity)
this msg-board is FULL of informations... just do a
search...
Posted on 2002-02-15 04:51:03 by mob
.586

.MMX
.K3D
.XMM
OPTION CASEMAP:NONE,LANGUAGE:STDCALL,DOTNAME

; Set Default Segment order and options
_TEXT SEGMENT READONLY PAGE PUBLIC USE32 'CODE'
_TEXT ENDS
CONST SEGMENT READONLY PUBLIC USE32 'CONST'
CONST ENDS
_DATA SEGMENT PUBLIC USE32 'DATA'
_DATA ENDS
_BSS SEGMENT PUBLIC USE32 'BSS'
_BSS ENDS
ASSUME CS: FLAT, DS:FLAT, SS:FLAT, ES:FLAT
Why bother with all the linker settings? Code it like you want it.
Posted on 2002-02-15 05:33:21 by bitRAKE
Ricky,

But what do you end up with if you build something this way ?

Regards,

hutch@movsd.com
Posted on 2002-02-15 05:48:20 by hutch--
Ricky,

But what do you end up with if you build something this way ?

Regards,


A ragdoll :)

Latigo
Posted on 2002-02-15 07:56:53 by latigo
Don't forget that 1 section apps only run under 9x. If you really dig that though, FAsm can create those without the use of a linker. Look at the Beer.exe example.
Posted on 2002-02-16 04:41:18 by eet_1024
1section apps run fine under win2k as well. And I can't see any
reason why they should fail anywhere, as long as the pe header
and section table information is 100% correct.

There might or might not be problems with resources... but that's
a different story. Resources are tricky stuff ;).
Posted on 2002-02-16 06:36:59 by f0dder