Re: Application Compilation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


On 10/1/06, Giles, Rick <Rick.Giles@xxxxxxxxxxxxxxx> wrote:


-----Original Message-----
From: linux-arm-bounces@xxxxxxxxxxxxxxxxxxxxxx on behalf of
Sambu
Sent: Sat 9/30/2006 1:54 PM
To: ARM-Linux
Subject: Application Compilation

Hi,
     I am a newbie to Arm-Linux. For my arm9 (s3c2410) I have compiled
a simple C program using arm-elf-gcc (3.4.3). The problem is I am
getting a huge size of executable code even a 6 lines of code without
using any system library I am getting a size of 132kb. And this code
when run using the busybox in my board shows segmentation fault
....

Please help me...I am totally lost.

--------------------------------
Since there are only 6 lines of code, maybe you could include those in your
post next time.

Try using the arm version of the strip utility on the target executable and
that should make it smaller. Also if your application includes floating
point operations, and your compiler is using hard float, and your platform
cannot support it, then that can cause a seg fault.

Run the file utility on the target executable and make sure it say's it's an
ARM ELF executable with the correct endianess.

Hope this helps.

Rick Giles



The lines I wrote is a simple main() func without any floating point.
Just initialise two integer, add two and exit. When I used the hexedit
utility to view the executable its showing a huge space filled with 00
. What possibly is the reason??

when I used $arm-elf-gcc -o test -save-temps test.c

I am getting proper intermediate file and when I used the arm-elf-as
against test.s the same thing happened.

-------------------------------------------------------------------
List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm
FAQ:        http://www.arm.linux.org.uk/mailinglists/faq.php
Etiquette:  http://www.arm.linux.org.uk/mailinglists/etiquette.php

[Linux ARM]     [Linux ARM MSM]     [Linux ARM Kernel]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

Add to Google Follow linuxarm on Twitter