flat assembler
Message board for the users of flat assembler.
Index
> Compiler Internals > Hilighting problem? |
Author |
|
Tomasz Grysztar 18 Nov 2003, 06:26
Everything that start with a decimal digit is considered a number - and using such symbols as labels is illegal.
|
|||
18 Nov 2003, 06:26 |
|
BiDark 18 Nov 2003, 07:39
I have compiled it and allowed me to compile.
so what is illegal? |
|||
18 Nov 2003, 07:39 |
|
BiDark 18 Nov 2003, 08:05
What about resource-only dll that need entry to be 0?
|
|||
18 Nov 2003, 08:05 |
|
Tomasz Grysztar 18 Nov 2003, 09:38
Of course you can do even:
Code: 31 equ ebx mov eax, 31 and get "mov eax,ebx", as it is preprocessor's matter. But you can't do: Code: 31: nor: Code: 31 = 23 Last edited by Tomasz Grysztar on 18 Nov 2003, 09:39; edited 1 time in total |
|||
18 Nov 2003, 09:38 |
|
Tomasz Grysztar 18 Nov 2003, 09:39
BiDark wrote: What about resource-only dll that need entry to be 0? What do you mean? |
|||
18 Nov 2003, 09:39 |
|
BiDark 18 Nov 2003, 10:31
I can't do.
Code:
format PE DLL
entry 0
I want to create the resource-only dll that doesn't has entry point (must be 0). How do I do? |
|||
18 Nov 2003, 10:31 |
|
scientica 18 Nov 2003, 11:12
Don't specify an entry point, but IMO should should create the LibMain stub, IIRC windows calls it to verify that the DLL was propperly loaded.
_________________ ... a professor saying: "use this proprietary software to learn computer science" is the same as English professor handing you a copy of Shakespeare and saying: "use this book to learn Shakespeare without opening the book itself. - Bradley Kuhn |
|||
18 Nov 2003, 11:12 |
|
BiDark 18 Nov 2003, 12:12
scientica wrote: Don't specify an entry point, but IMO should should create the LibMain stub, IIRC windows calls it to verify that the DLL was propperly loaded. Didn't work, It set to the first section's rva. I will try. |
|||
18 Nov 2003, 12:12 |
|
BiDark 18 Nov 2003, 13:27
I did a small resource dll in VC with /noentry switch (set entry point to 0) and use with LoadLibrary,FreeLibrary. It works fine.
But Fasm I have edit the entry point later using PEditor. When loaded, It says "Invalid Window image format...". Gotta find this out why... |
|||
18 Nov 2003, 13:27 |
|
comrade 19 Nov 2003, 04:59
DLL entry point is always called on LoadLibrary(). There is no way not to call it.
|
|||
19 Nov 2003, 04:59 |
|
BiDark 19 Nov 2003, 05:50
comrade wrote: DLL entry point is always called on LoadLibrary(). There is no way not to call it. Ok you guys, see youself, I want to fool noone, use OllyDbg and see (this dll was built using VC 6.0). I'm on Xp SP1.
|
|||||||||||
19 Nov 2003, 05:50 |
|
scientica 19 Nov 2003, 09:00
From what I can see now (in school - no access to anything but notepad) there are two sections, .rsrc and .reloc, so it's not just a resource section in it. Maybe there is some code too (like a simple ret at rva 0), but I don't know now.
_________________ ... a professor saying: "use this proprietary software to learn computer science" is the same as English professor handing you a copy of Shakespeare and saying: "use this book to learn Shakespeare without opening the book itself. - Bradley Kuhn |
|||
19 Nov 2003, 09:00 |
|
BiDark 19 Nov 2003, 09:32
I don't think so,
There is no code in the resource section, It's just a resouce headers at offset 200h. What the difference beetween Fasm's dll and VC's dll I have right now is the 'relocation' section (It should be most neccesary, right?). I don't know what is put but Fasm'dll doesn't has. May be at rva 0. |
|||
19 Nov 2003, 09:32 |
|
BiDark 19 Nov 2003, 10:39
I got it, got it.
This is the magic bytes from reloc section. db 0,0,0,0,0,0,0,0,8,0,0,0 It won't load if the reloc section size (virtual size) is 0 or these bytes doesn't exist. Any idea? |
|||
19 Nov 2003, 10:39 |
|
pelaillo 19 Nov 2003, 16:31
comrade wrote: DLL entry point is always called on LoadLibrary(). There is no way not to call it. If you use LoadLibraryEx, you can specifiy LOAD_LIBRARY_AS_DATAFILE flag and the loader does not call your entry point nor do relocations. |
|||
19 Nov 2003, 16:31 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.