i did use the -S option.. i got the output and i deleted things that i thought were irrelevant and reprogrammed the instruction i wanted: basically i ended up with:
.text .global main main: mov pc, #0 doing that compiles fine: [sbox-DEHTARGET: ~] > arm-linux-as doreset.s -o doreset.o [sbox-DEHTARGET: ~] > but linking raises a warning: [sbox-DEHTARGET: ~] > arm-linux-ld doreset.o -o doresetLD /scratchbox/compilers/arm-gcc-3.3.4-glibc-2.3.2/bin/sbox-arm-linux-ld: warning: cannot find entry symbol _start; defaulting to 00008074 [sbox-DEHTARGET: ~] > file doresetLD doresetLD: ELF 32-bit LSB executable, ARM, version 1 (ARM), statically linked, not stripped anyhow in the end i used what you just told me [sbox-DEHTARGET: ~] > arm-linux-gcc -Wall doreset.s -o doreset [sbox-DEHTARGET: ~] > file doreset doreset: ELF 32-bit LSB executable, ARM, version 1 (ARM), for GNU/Linux 2.0.0, dynamically linked (uses shared libs), not stripped [sbox-DEHTARGET: ~] > and it compiled / linked fine... when i try to run it though it produces a seg.fault. but thats beyond the scope of this list:) thank you once again for your help nass On 7/16/07, Lauri Leukkunen <[EMAIL PROTECTED]> wrote:
don't feed them to arm-linux-as, use arm-linux-gcc instead. It'll run it through the pre-processor. Try compiling a hello world with -S switch to see what it should look like. /lauri On 7/16/07, )(@sS <[EMAIL PROTECTED]> wrote: > hm ok so i did look into the kernel/arch/arm/lib directory and found some .S > assembler files. > i tried to compile a simple one strchr.S , the instructions and the whole > arm layout seem fairly different from the ones i had used in the past. > anyway the source doesn't seem like a main program, rather a low level > procedure that can be accessed from other codes.. > > by the assembler can't compile it (even as if - i didnt touch it) > > [sbox-DEHTARGET: ~/linux-2.6.12.2/arch/arm/lib] > arm-linux-as strchr.S > strchr.S: Assembler messages: > strchr.S:17: Error: bad instruction `entry(strchr)' > strchr.S:26: Error: bad instruction `retinstr(mov,pc,lr)' > > any ideas why? is there any tutorial page for the arm , because i haven't > found any... > nass > > > On 7/14/07, Lauri Leukkunen <[EMAIL PROTECTED]> wrote: > > > > On 13/07/07 13:23 +0300, )(@sS wrote: > > > i would like to know if there is an assembler for scrachbox, like armasm > or > > > whatever else.. > > > > You seem to have already found the assembler of the toolchain, now all you > > need to do is to find some example code, linux kernel definitely has some, > > look for .S files under arch/arm. Those should give you an idea what the > > assembler expects. Alternatively compile some C code with -S and look at > > the output. > > > > /lauri > > _______________________________________________ > > Scratchbox-users mailing list > > Scratchbox-users@lists.scratchbox.org > > > http://lists.scratchbox.org/cgi-bin/mailman/listinfo/scratchbox-users > > > > > _______________________________________________ > Scratchbox-users mailing list > Scratchbox-users@lists.scratchbox.org > http://lists.scratchbox.org/cgi-bin/mailman/listinfo/scratchbox-users > > _______________________________________________ Scratchbox-users mailing list Scratchbox-users@lists.scratchbox.org http://lists.scratchbox.org/cgi-bin/mailman/listinfo/scratchbox-users
_______________________________________________ Scratchbox-users mailing list Scratchbox-users@lists.scratchbox.org http://lists.scratchbox.org/cgi-bin/mailman/listinfo/scratchbox-users