flat assembler
Message board for the users of flat assembler.

Index > Main > link win32coff -> bin

Author
Thread Post new topic Reply to topic
maslan



Joined: 08 Sep 2003
Posts: 54
maslan
Question
is there is a linker that can output Binary form Win32 PE COFF

_________________
Maslan
I'm searching for perfection so, even if u need portability u 've to use Assembly
---
http://www.maslanlab.org
---
http://libosdk.berlios.de
http://maslanedit.sf.net
http://maslancms.sf.net
Post 16 Jul 2004, 06:59
View user's profile Send private message Reply with quote
Vortex



Joined: 17 Jun 2003
Posts: 318
Vortex
Why should be necessary such a tool?

_________________
Code it... That's all...
Post 16 Jul 2004, 09:55
View user's profile Send private message Visit poster's website Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3170
Location: Denmark
f0dder
you can use the GNU ld linker to output binary from COFF object modules - however, if you use MS coff format there will be some relocation problems (unless you can find a GNU ld with ms-coff rather than dj/gnu-coff support).

If you want to convert a PE executable to binary form, you'll have to write some code of your own. In case you don't need resources, imports, exports (etc) it's pretty easy, allocate a memory buffer the size PEheader.SizeOfImage, then read all sections physical data into that buffer, offset by their memory RVA.
Post 16 Jul 2004, 14:13
View user's profile Send private message Visit poster's website Reply with quote
fasm9



Joined: 19 Jun 2003
Posts: 439
fasm9
debian:~#sr debpackages mingw
Post 16 Jul 2004, 21:55
View user's profile Send private message Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3170
Location: Denmark
f0dder
does mingw use ms-coff or "regular" coff?
Post 17 Jul 2004, 02:14
View user's profile Send private message Visit poster's website Reply with quote
maslan



Joined: 08 Sep 2003
Posts: 54
maslan
thnx but can u send me a sample code to convert pe to bin

_________________
Maslan
I'm searching for perfection so, even if u need portability u 've to use Assembly
---
http://www.maslanlab.org
---
http://libosdk.berlios.de
http://maslanedit.sf.net
http://maslancms.sf.net
Post 17 Jul 2004, 05:09
View user's profile Send private message Reply with quote
maslan



Joined: 08 Sep 2003
Posts: 54
maslan
ok if u don't have code then do any 1 knows a program that do so (extract bin code from pe ignoring the resources)

_________________
Maslan
I'm searching for perfection so, even if u need portability u 've to use Assembly
---
http://www.maslanlab.org
---
http://libosdk.berlios.de
http://maslanedit.sf.net
http://maslancms.sf.net
Post 20 Jul 2004, 19:07
View user's profile Send private message Reply with quote
pelaillo
Missing in inaction


Joined: 19 Jun 2003
Posts: 878
Location: Colombia
pelaillo
If I understand you correctly, you need to extract the ".code" section on PE. You can use OllyDbg or any hex editor or a pe editor/viewer such as LordPE.

What I don't understand is why you need it. You can't do nothing with it alone.
Post 20 Jul 2004, 19:31
View user's profile Send private message Yahoo Messenger Reply with quote
maslan



Joined: 08 Sep 2003
Posts: 54
maslan
pelaillo wrote:
If I understand you correctly, you need to extract the ".code" section on PE. You can use OllyDbg or any hex editor or a pe editor/viewer such as LordPE.

What I don't understand is why you need it. You can't do nothing with it alone.


F0dder said:
If you want to convert a PE executable to binary form, you'll have to write some code of your own. In case you don't need resources, imports, exports (etc) it's pretty easy, allocate a memory buffer the size PEheader.SizeOfImage, then read all sections physical data into that buffer, offset by their memory RVA.

i need a program that does what he said

_________________
Maslan
I'm searching for perfection so, even if u need portability u 've to use Assembly
---
http://www.maslanlab.org
---
http://libosdk.berlios.de
http://maslanedit.sf.net
http://maslancms.sf.net
Post 21 Jul 2004, 19:02
View user's profile Send private message Reply with quote
pelaillo
Missing in inaction


Joined: 19 Jun 2003
Posts: 878
Location: Colombia
pelaillo
All you need to do this is inside imports.asm that you could find here:
http://board.flatassembler.net/topic.php?t=1068

But then, what do you expect to do with this?
Post 21 Jul 2004, 21:13
View user's profile Send private message Yahoo Messenger Reply with quote
maslan



Joined: 08 Sep 2003
Posts: 54
maslan
i wanna to play with pe generated by most windows compilers as os toy
coz i played with elf and it's perfect while i do know nothing about pe exe
so i just wanna create pe exe with no imports from any dlls and boot it using grub so i think grub don't run pe exe so i wanna convert it to binary without any dlls imports.
any other comments ,or solutions ????

_________________
Maslan
I'm searching for perfection so, even if u need portability u 've to use Assembly
---
http://www.maslanlab.org
---
http://libosdk.berlios.de
http://maslanedit.sf.net
http://maslancms.sf.net
Post 22 Jul 2004, 20:03
View user's profile Send private message Reply with quote
pelaillo
Missing in inaction


Joined: 19 Jun 2003
Posts: 878
Location: Colombia
pelaillo
PE with imported functions will not work at all without import section.

You will need at least to grab the code from inside dlls for all used functions, producing a plain binary file. A sort of statically link your program.

But you should use dlls from wine project, because doing this on windows' dlls is considered a crime Very HappyLaughingVery Happy

And don't forget to relocate the data and to replace resources for a similar method. Keep a look at for near all PEs you will risk to redo whole wine project.
Post 22 Jul 2004, 20:57
View user's profile Send private message Yahoo Messenger Reply with quote
fasm9



Joined: 19 Jun 2003
Posts: 439
fasm9
also check reactos [to me :BAD_feeling]
Post 22 Jul 2004, 21:12
View user's profile Send private message Reply with quote
maslan



Joined: 08 Sep 2003
Posts: 54
maslan
i've found a program called pe2bin at http://ybx.narod.ru
which create grub mutliboot form pe but how can i tell HLL compiler to only use on section for all text,data,bss coz this program remove all section except the first 1 which is the code(text).?

_________________
Maslan
I'm searching for perfection so, even if u need portability u 've to use Assembly
---
http://www.maslanlab.org
---
http://libosdk.berlios.de
http://maslanedit.sf.net
http://maslancms.sf.net
Post 23 Jul 2004, 09:27
View user's profile Send private message Reply with quote
decard



Joined: 11 Sep 2003
Posts: 1092
Location: Poland
decard
using GCC proably editing linker scripts could help, you should ask on some GCC-related forum Confused
Post 23 Jul 2004, 10:03
View user's profile Send private message Visit poster's website Reply with quote
maslan



Joined: 08 Sep 2003
Posts: 54
maslan
can any body tell me how to adjust any HLL to generate pe with only 1 section Question

_________________
Maslan
I'm searching for perfection so, even if u need portability u 've to use Assembly
---
http://www.maslanlab.org
---
http://libosdk.berlios.de
http://maslanedit.sf.net
http://maslancms.sf.net
Post 23 Jul 2004, 12:30
View user's profile Send private message Reply with quote
fasm9



Joined: 19 Jun 2003
Posts: 439
fasm9
Again, i don't know what you want, but, Please, ask your question here.

http://reactos.com/en/content/view/full/64

that forum allows anonymous question.
Post 23 Jul 2004, 17:49
View user's profile Send private message Reply with quote
maslan



Joined: 08 Sep 2003
Posts: 54
maslan
fasm9 wrote:
Again, i don't know what you want, but, Please, ask your question here.

http://reactos.com/en/content/view/full/64

that forum allows anonymous question.


i said before i wanna generate binary from pe which can be loaded by a boot loader or generate multiboot to run with grub all of this using a HLL like C or Pascal i know elf is good and always use them but i wanna try os developement on win32 (just a toy) Idea

_________________
Maslan
I'm searching for perfection so, even if u need portability u 've to use Assembly
---
http://www.maslanlab.org
---
http://libosdk.berlios.de
http://maslanedit.sf.net
http://maslancms.sf.net
Post 24 Jul 2004, 10:51
View user's profile Send private message Reply with quote
fasm9



Joined: 19 Jun 2003
Posts: 439
fasm9
sorry me: simple noob.

if you think if i don't bug you,
can you look these kind of things?

http://mobius.sf.net
http://www2.skyos.org
http://dmoz.org/Computers/Software/Operating_Systems/x86/
Post 24 Jul 2004, 18:04
View user's profile Send private message Reply with quote
maslan



Joined: 08 Sep 2003
Posts: 54
maslan
hey i checked ur sites although the last 2 i knew before
but they didn't help here is what i decided now

i wanna write just helloworld kernel which can be loaded by any boot loader or multiboot kernel which can be loaded by grub

i wanna write the kernel by any compiler which works on windows and produce pe exe. (Pascal : FreePascal , C : Borland C)

so how can i use each one of them rto create that shit helloworld , i know it an adventure , please don't point for linux coz i already use it and love it more than any other OS but i need something new like what i said before .
Question Question Question

bye

_________________
Maslan
I'm searching for perfection so, even if u need portability u 've to use Assembly
---
http://www.maslanlab.org
---
http://libosdk.berlios.de
http://maslanedit.sf.net
http://maslancms.sf.net
Post 25 Jul 2004, 12:33
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.

Powered by rwasa.