|
|
|
|
|
|
| Author |
Message |
Bujji *nix forums beginner
Joined: 29 Mar 2006
Posts: 8
|
Posted: Fri Jul 14, 2006 6:18 pm Post subject:
aCC option to load all the symbols during linking
|
|
|
Hi,
Is there any option for aCC compiler to load all the symbols during
linking (with +O2 option enable)?
When I create an executable with +O2 option, it is not loading all the
functions into the executable (Not loading functions that are not
called in the execution).
But I want to have all the functions(symbols) loaded during the
creation of the executable.
Thanks,
Bujji |
|
| Back to top |
|
 |
Paul Pluzhnikov *nix forums Guru
Joined: 25 Mar 2005
Posts: 512
|
Posted: Fri Jul 14, 2006 8:55 pm Post subject:
Re: aCC option to load all the symbols during linking
|
|
|
"Bujji" <bujji55555@yahoo.com> writes:
| Quote: | Is there any option for aCC compiler to load all the symbols during
linking (with +O2 option enable)?
|
No: aCC doesn't *do* linking; the system linker does that.
| Quote: | When I create an executable with +O2 option, it is not loading all the
functions into the executable (Not loading functions that are not
called in the execution).
|
Presumably you are linking with archive libraries, and you want
the equivalent of the GNU-ld --whole-archive ...
AFAICT, there is no matching HP ld flag.
One way to achive that is to list all symbols you want to be included
in the link with '-u sym1 -u sym2 ...'
Another option is to "blow up" the archive:
mkdir tmp.$$ && cd tmp.$$ &&
ar x /path/to/archive.a &&
cd .. && aCC -o foo.exe main.o tmp.$$/*.o &&
rm -rf tmp.$$
Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email. |
|
| Back to top |
|
 |
Dennis Handly *nix forums beginner
Joined: 28 Jun 2005
Posts: 38
|
Posted: Sat Jul 15, 2006 8:25 am Post subject:
Re: aCC option to load all the symbols during linking
|
|
|
Paul Pluzhnikov wrote:
: AFAICT, there is no matching HP ld flag.
There is +[no]forceload for IPF and PA64. And -Fl for PA32.
: ... included in the link with '-u sym1 -u sym2 ...'
: Another option is to "blow up" the archive:
Yes.
"Bujji" got some answers in CXX-DEV.
http://h21007.www2.hp.com/dspp/comm/comm_Community_Home_IDX/1,1273,,00.html |
|
| Back to top |
|
 |
Google
|
|
| Back to top |
|
 |
|
|
The time now is Mon Dec 01, 2008 10:15 pm | All times are GMT
|
|
Credit Cards | Personal Loans | Web Advertising | Project cars for sale | Secured Loans
|
|
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
|
|