flat assembler
Message board for the users of flat assembler.
Index
> Non-x86 architectures > FASMARM v1.44 - Cross assembler for ARM CPUs Goto page Previous 1, 2, 3 ... 7, 8, 9 ... 31, 32, 33 Next |
Author |
|
vid 22 Jun 2006, 13:59
hi, please, is there some "int3" alternative in ARM? i am using GDB to debug WinCE app, and want nice way to stop at given offset.
also, there are more imports than we have in list in CE. For example there is also a ascii version of GetProcAddress (eg. GetProcAddressA). Also there are some undocumented (GetProcByPtr, GetProcName) here is another list: http://www.rainer-keuchel.de/wince/dllexports/j680-coredll.txt, but it also missess GetProcAddressA (maybe it is included only in newer CEs) |
|||
22 Jun 2006, 13:59 |
|
revolution 25 Jun 2006, 23:14
Quote: "int3" alternative in ARM Quote: ascii version of GetProcAddress |
|||
25 Jun 2006, 23:14 |
|
revolution 27 Jun 2006, 00:37
Quote: strings in PE structure are still ASCII |
|||
27 Jun 2006, 00:37 |
|
vid 28 Jun 2006, 10:21
you didn't get me, i meant that if you look into ROM images, at COREDLL.DLL exports, you can see "GetProcAddressA" export, and other ascii exports there. I already have working code using GetProcAddressA.
Sorry, can't post it, it's company stuff, which shouldn't be realeased - you can look at UPX sources for another example. Can be downloaded at http://upx.sourceforge.net/#download. It's file upx-2.01-src\src\stub\l_armpea.S btw, what is XOR equivalent in ARM? thanks. |
|||
28 Jun 2006, 10:21 |
|
vid 02 Jul 2006, 14:42
http://en.wikipedia.org/wiki/FASM
http://en.wikipedia.org/wiki/List_of_assemblers there should be a mention about FASMARM... it's quite big thing |
|||
02 Jul 2006, 14:42 |
|
revolution 03 Jul 2006, 09:03
Quote: what is XOR equivalent in ARM? |
|||
03 Jul 2006, 09:03 |
|
vid 04 Jul 2006, 04:28
revolution: there were too many pdfs on the site, and right now i am on very slow connection
could you please point few most needed (quick instruction reference, detailed instruction reference, something about protection mechanism)? |
|||
04 Jul 2006, 04:28 |
|
revolution 04 Jul 2006, 13:27
Quote: there were too many pdfs on the site, and right now i am on very slow connection Quote: could you please point few most needed (quick instruction reference, detailed instruction reference, something about protection mechanism)? |
|||
04 Jul 2006, 13:27 |
|
vid 14 Aug 2006, 12:31
hi, revolution
have you been thinking about ability to create ARM PE DLL file? It needs somewhat different relocations, i believe, otherwise it should be same. of course i will do the testing, i can give you some example DLLs if you want. they are from MS visual C, but they use only one type of relocations (number 3), i don't know nothing about others. btw: how about renaming this thread to "FASMARM"? It's FASMARM project anyway |
|||
14 Aug 2006, 12:31 |
|
vid 14 Aug 2006, 12:37
one more question: i need something like "bl r6", eg. call procedure whose address is in r6. best i could work out was this:
Code: bl $+4 add lr, lr, 8 mov pc, r6 any better idea? [edit]hehe, got it, solution by MazeGen (C) Code: mov lr, pc mov pc, r6 |
|||
14 Aug 2006, 12:37 |
|
revolution 14 Aug 2006, 14:18
vid wrote: i need something like "bl r6" Code: BLX R6 vid wrote: create ARM PE DLL |
|||
14 Aug 2006, 14:18 |
|
vid 14 Aug 2006, 15:47
i don't need it now, i just wanted to point this for completness.
Funny, it seems that current FASMARM's PE formater handles type-3 relocation properly. I don't know if there are some instructions that need to be relocated, seems. i will try to make my own helloworld DLL, and then post it here as example for your FASMARM package. Thanks for your willingness |
|||
14 Aug 2006, 15:47 |
|
vid 14 Aug 2006, 22:14
for some weird reason, the "relocation info stripped" flag is set even when it is present.
[edit] revolution: please, fix this |
|||
14 Aug 2006, 22:14 |
|
vid 24 Aug 2006, 16:34
my FASMARM generated DLL is not working even after clearing that flag by hand, reports "bad exe format", and i believe it's formatter's problem.
MSVC also does set "size of code", "size of init data", "size of uninit data", "base of code", "base of data". and MSVC-generated DLL contains unwind info (data 3), but i don't know how to create it. EXEs work without it. there are also more minor differences between MSVC generated file and FASMARM-generated file. |
|||
24 Aug 2006, 16:34 |
|
revolution 25 Aug 2006, 05:42
vid wrote: for some weird reason, the "relocation info stripped" flag is set even when it is present. vid wrote: MSVC-generated DLL contains unwind info (data 3) vid wrote: there are also more minor differences between MSVC generated file and FASMARM-generated file. |
|||
25 Aug 2006, 05:42 |
|
vid 25 Aug 2006, 10:38
"relocation info stripped" that flag should SET, when "fixups" data/section is NOT present.
oh, i forgot about those unwind data, yes, i recall they were there, thanks, i will try it. Quote: Do you know the important differences, that is, the diferences that make one file work and the other not work? More information needed. There are many of them, i can list them, but i think problem was in those i mentioned, when we fix all these and it still doesn't work, we can try these. Problem is i still didn't manage to create working DLL for WinCE, after that it would be easy. also don't forget to set "size of code", "size of init data", "size of uninit data", "base of code", "base of data" in optional header. thanks for help |
|||
25 Aug 2006, 10:38 |
|
revolution 25 Aug 2006, 12:37
vid wrote: "relocation info stripped" that flag should SET, when "fixups" data/section is NOT present. By the book the following flags should also be set: IMAGE_FILE_BYTES_REVERSED_LO and IMAGE_FILE_DEBUG_STRIPPED (0x0280). And for DLL of course the IMAGE_FILE_DLL flag needs to be set. Are these flags set for WinCE DLL files in the real world? vid wrote: don't forget to set "size of code", "size of init data", "size of uninit data", "base of code", "base of data" in optional header. One thing you might like to try is to place a "fake" relocation section (data fixups) and write the rest of the DLL using position independent code, clear the IMAGE_FILE_RELOCS_STRIPPED flag and test it. For certain Win32 doesn't use the 5 fields you mentioned. |
|||
25 Aug 2006, 12:37 |
|
vid 25 Aug 2006, 13:19
Quote: I strongly doubt that a standard EXE can be converted to a DLL without also including the relocation info. I think the above values can be easily done, but until the relocs are finalised they won't be much use to you. relocations WORK... they are setted correctly in current FASMARM. Probably because they are same as in win32/x86 world. But it still doesn't work even if i set this flag myself Quote: So that means that currently FASMARM does the correct thing by setting the flag, because relocs have been stripped from the file. Only when relocs are supported/included should the flag be cleared. Quote: By the book the following flags should also be set: IMAGE_FILE_BYTES_REVERSED_LO and IMAGE_FILE_DEBUG_STRIPPED (0x0280). And for DLL of course the IMAGE_FILE_DLL flag needs to be set. Are these flags set for WinCE DLL files in the real world? what book? in working dll i have from MS visual C, only these are set: executable image, 32bit machine expected, DLL. I don't know their names in C headers, sorry, but the value is 2102h so you can find easily. It has a 0x1C-sized tiny debug info... probably just an empty structure. |
|||
25 Aug 2006, 13:19 |
|
setrodox 26 Aug 2006, 23:03
i have a problem with using fasm-arm on linux, the assembling worked without problems, but when using fasm-arm i get a "error: illegal instruction." for every instruction.
i tried it with the prebuilt windows binary with wine, and that worked flawlessy. btw, nice work |
|||
26 Aug 2006, 23:03 |
|
Goto page Previous 1, 2, 3 ... 7, 8, 9 ... 31, 32, 33 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.