niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
·  nixdoc.net ·  man pages ·  Linux HOWTOs ·  FreeBSD Tips ·  Forums
navigation Forum index » *nix » Linux » embedded
Linux on GlobalPC with 8M ram
Post new topic   Reply to topic Page 7 of 7 [97 Posts] View previous topic :: View next topic
Goto page:  Previous  1, 2, 3, 4, 5, 6, 7
Author Message
tomviolin
*nix forums beginner


Joined: 06 Oct 2005
Posts: 10

PostPosted: Tue Apr 11, 2006 10:14 am    Post subject: Re: Building a PHP-lite like Axis Reply with quote

I have found, so far, that to begin to reduce the executable size, it
is necessary to go into the Makefile and eliminate references to
specific .c files. However, some files, such as functions/info.c,
which provides the phpinfo() function, contain functions that are used
elsewhere, and require modifications to other files. I've spent
several hours and only got the executable down to around 1.6 meg.

There doesn't seem to be a "magic" way to do this, one apparently just
has to dig in.

I wonder if later releases of PHP might have been written in a more
modular fashion, and thus be easier to reduce. If I can get a version
of PHP, that at least has some basic functionality, with an exectuable
under 1 MB, I'll be happy.
Back to top
Peter Dickerson
*nix forums beginner


Joined: 11 Apr 2006
Posts: 2

PostPosted: Tue Apr 11, 2006 11:31 am    Post subject: Re: Building a PHP-lite like Axis Reply with quote

"tomviolin" <rock_spambust_violin@yahoo.com> wrote in message
news:1144750498.881803.19980@u72g2000cwu.googlegroups.com...
Quote:
I have found, so far, that to begin to reduce the executable size, it
is necessary to go into the Makefile and eliminate references to
specific .c files. However, some files, such as functions/info.c,
which provides the phpinfo() function, contain functions that are used
elsewhere, and require modifications to other files. I've spent
several hours and only got the executable down to around 1.6 meg.

There doesn't seem to be a "magic" way to do this, one apparently just
has to dig in.

I wonder if later releases of PHP might have been written in a more
modular fashion, and thus be easier to reduce. If I can get a version
of PHP, that at least has some basic functionality, with an exectuable
under 1 MB, I'll be happy.

gcc has the (non-default) ability to compile each function and data
declaration into a separate section. Combining that with linking that
removes unreferenced sections can reduce your workload. I doesn't matter if
the code is in the same file - if it isn't referenced then it doesn't get
pulled in, and if it doesn't get pulled in it does pull other stuff in. This
has worked well for me on a few embedded projects.

Look up -ffunction-sections -fdata-sections for compiling and
-Wl,--gc-sections for linking.

Peter
Back to top
noone
*nix forums Guru Wannabe


Joined: 20 Feb 2005
Posts: 126

PostPosted: Sat Apr 15, 2006 4:48 pm    Post subject: Re: 1st DigitalTutor.info Tutorial Contest! Reply with quote

On Sat, 15 Apr 2006 07:53:23 -0700, info wrote:

Quote:
Prizes:

1st) 12 MegaPixel Digital Camera
2nd) 1 GB Mp4 Video/MP3 Player
3rd) Flexible keyboard

Go to http://www.digitaltutor.info & send us your tutorial to participate!

We are looking for Programming, Linux, 3D and Video Editing Tutorials.

hmmm.

and I wonder who gets the rights to your tutorial once it is submitted?
Sounds like someone is preparing a book and is looking for material.
Back to top
Moe Trin
*nix forums Guru


Joined: 20 Feb 2005
Posts: 972

PostPosted: Sun Apr 16, 2006 8:49 pm    Post subject: Re: 1st DigitalTutor.info Tutorial Contest! Reply with quote

On Sat, 15 Apr 2006, in the Usenet newsgroup comp.os.linux.embedded, in article
<pan.2006.04.15.16.48.06.280351@all.com>, noone wrote:

Quote:
On Sat, 15 Apr 2006 07:53:23 -0700, info wrote:

Go to http://www.digitaltutor.info & send us your tutorial to participate!

We are looking for Programming, Linux, 3D and Video Editing Tutorials.

hmmm.

and I wonder who gets the rights to your tutorial once it is submitted?
Sounds like someone is preparing a book and is looking for material.

either that or harvesting addresses. The idiot posted the same crap to
linux.redhat, comp.os.linux.misc, comp.os.linux.networking,
comp.os.linux.setup, and comp.os.linux.security, before posting it here in
comp.os.linux.embedded. I suppose the spammer is to st00pid to realize
that it might be acceptable in comp.os.linux.announce (but then, the
moderator may have just tossed it as spam seeing as how the idiot is
posting from google instead of his ISP's news server). The domain was only
registered on the 11th with GoDaddy, and is hosted on hostnoc - that ought
to be enough clues.

Old guy
Back to top
Daniel Kabs
*nix forums beginner


Joined: 19 Feb 2005
Posts: 14

PostPosted: Thu Apr 20, 2006 10:05 am    Post subject: [HowTo] Getting rid of libstdc++.so (was: g++: minimizing size of libstdc++.so) Reply with quote

Daniel Kabs wrote:
Quote:
Is there a way I can use
g++ with a small libstdc++ which includes new() and maybe even exceptions?

Good news: there's already a small auxiliary library shipping with
gcc/g++ called "libsupc++.a" which contains important C++ features
like new/delete operator, RTTI and exceptions. If can do without STL,
this is the library for you.

Replacing libstdc++.so by libsupc++.so involves two steps:
1. Converting libsupc++.a into a shared library.
2. Recompiling binaries using libsupc++.so


Step one:
'cd' into an empty directory and execute these commands:
$ LIB=$(g++ -print-file-name=libsupc++.a)
$ ar x $LIB
$ g++ -shared -fPIC -nodefaultlibs -lgcc_s *.o -o libsupc++.so
You just created libsupc++.so. The stripped ARM version is
only 67 KByte in size compared to 900 KByte of libstdc++.so Smile
Copy this library into the directory containing $LIB.
I recommend to move away all static versions of $LIB to make
sure the shared one is used.

Step two:
Compile your programs using the options -nodefaultlibs and -lsupc++
Example:
$ g++ -nodefaultlibs -lsupc++ -lc test.cpp

Cheers
Daniel Kabs
Germany

[x'post & f'up set]
Back to top
Michael Schnell
*nix forums Guru Wannabe


Joined: 21 Feb 2005
Posts: 110

PostPosted: Mon Jul 10, 2006 7:31 am    Post subject: Re: All new exams added in Testking.co.uk with latest updates and passing guarantee Reply with quote

???
Back to top
Moe Trin
*nix forums Guru


Joined: 20 Feb 2005
Posts: 972

PostPosted: Tue Jul 11, 2006 1:22 am    Post subject: Re: All new exams added in Testking.co.uk with latest updates and passing guarantee Reply with quote

On Mon, 10 Jul 2006, in the Usenet newsgroup comp.os.linux.embedded, in article
<e8svua$kbk$1@murphy.mediascape.de>, Michael Schnell wrote:

]All new exams added in Wankers.Website with latest updates and passing
]guarantee

Quote:
???

It's just some st00pid spammer crapping in various newsgroups (I saw the
spam in four Linux groups as well as a security newsgroup) trying to rip
off fools. Passing some certification test might help getting past the
HR idiots, but will not help much in any job interview - where the
applicant won't have the first clue how to answer technical questions
posed by the interviewer. That's also why we don't put a certification
requirement in job postings, and rank down applicants who claim such
certification. At best, they've memorized the material needed to pass
some test which generally has no relevance to real world job needs.

Old guy
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 7 of 7 [97 Posts] Goto page:  Previous  1, 2, 3, 4, 5, 6, 7
View previous topic :: View next topic
The time now is Wed Dec 03, 2008 11:51 pm | All times are GMT
navigation Forum index » *nix » Linux » embedded
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts Help required for configuring the VPN Server in Linux SHERDIL security 0 Sun Nov 19, 2006 2:22 pm
No new posts 2 USB webcams on Linux 2.6.15.4 produce a hang Suyog hardware 1 Fri Jul 21, 2006 7:27 am
No new posts Is there C/C++ corresponding function in Linux for Java's... xiebopublic@gmail.com apps 4 Fri Jul 21, 2006 3:22 am
No new posts Is there C/C++ corresponding function in Linux for Java's... xiebopublic@gmail.com C++ 1 Fri Jul 21, 2006 2:44 am
No new posts Why Redhat Linux has no RPM for PHP 5?! RC PHP 3 Thu Jul 20, 2006 7:20 pm

Home Loan | Loans | Electricity Suppliers | Free Advertising | Mortgage Calculator
Copyright © 2004-2005 DeniX Solutions SRL
 
Other DeniX Solutions sites: Unix/Linux blog |  electronics forum |  medicine forum |  science forum | 
Privacy Policy


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 1.1680s ][ Queries: 16 (1.0247s) ][ GZIP on - Debug on ]