- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: 64-bit Shared Library
Categories
Company
Local Language
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
04-10-2006 05:55 AM
04-10-2006 05:55 AM
We're trying to determine if a Shared Library we've
compiled is 64-bit code. When we test an executable
compiled with the "cc +DA2.0W" option, we get the
following result from the "file" command:
# file /usr/local/bin/cpuperf
/usr/local/bin/cpuperf: ELF-64 executable object file - PA-RISC 2.0 (LP64)
It explicitly says that the file contains 64-bit code.
One of our developers is compiling a shared library. She
is not using the "+DA2.0W" option, and she's linking it
with the following "ld" command:
ld -b +s -o libcsiunx.sl csiunx.o
If we execute "file" on the resultant library:
# file libcsiunx.sl
libcsiunx.sl: PA-RISC2.0 shared library -not stripped
It says it is "2.0" code, but not 64-bit code. I thought
the PA-RISC2.0 CPUs were all 64-bit. Have I got that wrong?
The man page for ld talks about SHLIB_PATH and LD_LIBRARY_PATH
for the "+s" option to ld, but it says nothing about the LPATH
environment variable. We do have /usr/lib/pa20_64 at the
beginning of LPATH.
I'm just trying to determine if we have more work to do to
get us to all 64-bit code. Any help appreciated. i.e. Is
this PA-RISC2.0 file 64-bit or not?
Thanks,
Tom
Solved! Go to Solution.
- Tags:
- shlib
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2006 07:55 AM
04-10-2006 07:55 AM
SolutionTry this:
cc +DA2.0 -c csiunx.c
and then "file csiunx.o".
That will result in "PA-RISC2.0 object"
next:
cc +DA2.0W -c csiunx.c
and then "file csiunx.o".
That will display "ELF-64 object"
The ELF-64 means that this is true 64-bit code and does not, for example, have the 1GB quadrant boundaries that are characteristic of 32-bit PA-RISCXX code and greatly limit the size of data structures.
You need to change the flags in your makefiles (or set CCOPTS) to +DA2.0W if you want 64-bit code.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2006 08:48 AM
04-10-2006 08:48 AM
Re: 64-bit Shared Library
It will be more portable (to IPF) if you use +DD64 instead.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2006 09:15 AM
04-10-2006 09:15 AM
Re: 64-bit Shared Library
The "W" in PA-RISC2.0W stands for wide as in kernel width i.e. 64-bit as opposed to PA-RSC2.0 which defaults to 32-bit.
You can look inside your locally built shared library with ldd, if it references others, to confirm whether it's 64-bit or 32-bit. Look at the pathname to other libraries since it will contain "/usr/lib" if its 32-bit or "/usr/lib/pa20_64" if its 64-bit on PA-RISC architecture machines.
cheers!
- Tags:
- ldd
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2006 11:37 AM
04-10-2006 11:37 AM
Re: 64-bit Shared Library
Thanks for the explanation.
Tom
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2006 11:38 AM
04-10-2006 11:38 AM