- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- How to get aCC & ld to use alternative crt0.o ?
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-21-2005 04:42 PM
тАО09-21-2005 04:42 PM
When aCC calls ld it does ...
/usr/ccs/bin/ld -o a.out /opt/langtools/lib/pa20_64/crt0.o -u___exit -umain -L ...
Does anyone know how to tell aCC to tell ld that crt0.o is in a different location?
I can do this manually with ld, but can't get aCC to tell ld.
Cheers
Solved! Go to Solution.
- Tags:
- aCC
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-21-2005 05:18 PM
тАО09-21-2005 05:18 PM
Re: How to get aCC & ld to use alternative crt0.o ?
chatr 'acc' will tell you what it uses. Make changes accordingly. May be you will have to set SHLIB_PATH variable.
- Tags:
- chatr
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-21-2005 06:05 PM
тАО09-21-2005 06:05 PM
Re: How to get aCC & ld to use alternative crt0.o ?
However I have already tried SHLIB_PATH, LD_LIBRARY_PATH, LPATH and explictly requiring the lib (using -l)
and unless I misread the chatr output ...
shared library dynamic path search:
SHLIB_PATH disabled second
embedded path disabled first
aCC doesn't look at SHLIB_PATH anyway.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-21-2005 06:13 PM
тАО09-21-2005 06:13 PM
Re: How to get aCC & ld to use alternative crt0.o ?
Changes if required.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-21-2005 06:17 PM
тАО09-21-2005 06:17 PM
Re: How to get aCC & ld to use alternative crt0.o ?
echo $SHLIB_PATH before building? Try to export and build it.
hth.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-21-2005 06:20 PM
тАО09-21-2005 06:20 PM
Re: How to get aCC & ld to use alternative crt0.o ?
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-21-2005 06:40 PM
тАО09-21-2005 06:40 PM
Re: How to get aCC & ld to use alternative crt0.o ?
/usr/ccs/bin/ldd:
shared executable
shared library dynamic path search:
SHLIB_PATH disabled second
embedded path disabled first
Neither ldd nor aCC appear to utilise SHLIB_PATH ...
However I have tried setting SHLIB_PATH, LD_LIBRARY_PATH and LPATH (and using -L for aCC) all to no avail.
Once I get it working it will go into the Makefiles, but until then ...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-21-2005 06:48 PM
тАО09-21-2005 06:48 PM
Re: How to get aCC & ld to use alternative crt0.o ?
check with make -p to know LDFLAGS more.
hth.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-21-2005 06:48 PM
тАО09-21-2005 06:48 PM
Re: How to get aCC & ld to use alternative crt0.o ?
Try in new session by changing the LDFALGS library orders:
LDFALGS="-L/usr/lib -L/usr/local/lib"
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-21-2005 06:49 PM
тАО09-21-2005 06:49 PM
Re: How to get aCC & ld to use alternative crt0.o ?
$ echo $SHLIB_PATH
$ echo $LD_LIBRARY_PATH
$
LPATH=/usr/lib/pa20_64:/opt/langtools/lib/pa20_64
/usr/ccs/bin/ld -o a.out /opt/langtools/lib/pa20_64/crt0.o -u___exit -umain -L
/usr/ccs/bin/ld: Can't open /opt/langtools/lib/pa20_64/crt0.o
/usr/ccs/bin/ld: No such file or directory
removing /var/tmp/AAAa11613
$
Setting LPATH appears to make no difference
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-21-2005 06:50 PM
тАО09-21-2005 06:50 PM
Re: How to get aCC & ld to use alternative crt0.o ?
# chatr `which ldd`
/usr/ccs/bin/ldd:
32-bit ELF executable
shared library dynamic path search:
LD_LIBRARY_PATH enabled first
SHLIB_PATH enabled second
embedded path enabled third Not Defined
All paths enabled. Do you have latest ldd patch?? you can also try enabling it. man chatr for details.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-21-2005 07:02 PM
тАО09-21-2005 07:02 PM
Solutionhttp://h21007.www2.hp.com/dspp/tech/tech_TechDocumentDetailPage_IDX/1,1701,2548,00.html
Try setting SDKROOT environment variable to
- Tags:
- SDKROOT
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-21-2005 09:37 PM
тАО09-21-2005 09:37 PM
Re: How to get aCC & ld to use alternative crt0.o ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-25-2005 08:53 PM
тАО09-25-2005 08:53 PM
Re: How to get aCC & ld to use alternative crt0.o ?
i guess you are aware that SDKROOT will make aCC look into $SDKROOT for everything (e.g. the linker it will invoke, etc), not just crt0.o.
any specific reason why you want to do this?
regards
ranga
--
ranga