From: "Ramkumar J" <ramkumarj2000@gmail.com>
To: linuxppc-embedded@ozlabs.org
Subject: Compiling applications using cross compiler packs libc
Date: Mon, 12 May 2008 17:12:42 +0800 [thread overview]
Message-ID: <4f8c3030805120212r730ded9dv23dfcc29119ebfe5@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1220 bytes --]
Hi All,
I am trying to execute a compiled simple stand-alone application (
TestApp_Memory.c compiled with gcc 4.1.0 cross compiler for ppc [ I have
installed this through crosstool on a Linux PC ] ) on the ML403 Board
instead of using the compiler-set provided by XPS. I tried many options (
like --static to gcc) to make the object file little as produced by the XPS
Compiler Set. I find that when static is provided, the glibc is also packed
up as a part of application though I never make any calls to the glibc
libraries. If I dont provide the --static, the gcc produces a code assuming
the library as shared and hence I get an interp section.
Is there any way to produce the code with only the application and NOT the
glibc ( As XPS compilers does). Am I missing out something. Is there any
specific flags. I find even nodefaultlib does not work.
For Eg: This is another example I tried
int main()
{
int a = 5;
int b = 10;
int c = 15;
c = a + b;
c += 12;
return 0;
}
With --static compilation, size is about 500K for the above code though the
useful content is too less. objdump reveals unneccessary calls to the libc.
Any suggestions would be helpful.
Thanks and Regards,
Ramkumar
[-- Attachment #2: Type: text/html, Size: 1415 bytes --]
next reply other threads:[~2008-05-12 9:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-12 9:12 Ramkumar J [this message]
2008-05-12 10:02 ` Compiling applications using cross compiler packs libc Marco Stornelli
2008-05-12 10:27 ` Alessandro Rubini
2008-05-14 5:57 ` David H. Lynch Jr.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4f8c3030805120212r730ded9dv23dfcc29119ebfe5@mail.gmail.com \
--to=ramkumarj2000@gmail.com \
--cc=linuxppc-embedded@ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).