Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TruUnix 5.1 - binaries 32 or 64 bit

Status
Not open for further replies.

SkiLift

Programmer
Dec 18, 2003
47
US
I understand that TruUnix5.1 is a true 64 bit machine. On other machines, like solaris 8 and Aix 5.1, I can compile and link in 32 bit or 64 bit mode. I can use the "file" command to see if binaries are 32 or 64 bit. For Ex:

Code:
$ file lib/libsqlplus.so
lib/libsqlplus.so:      ELF 64-bit MSB dynamic lib SPARCV9 Version 1, dynamicald
$ file lib32/libsqlplus.so
lib32/libsqlplus.so:    ELF 32-bit MSB dynamic lib SPARC Version 1, dynamicallyd
$

In Tru Unix 5.1, the file command does not say if it is 32 or 64 bit.

Can I compile and link to get 32 bit binaries?
Can I compile and link to get 64 bit binaries?
Do you only get 64 bit binaries when you compile and link?


 
I'm guessing here as I'm not a programmer but from man cc:

-taso
Directs the linker to load the executable file in the lower 31-bit addressable virtual address range. The -T and -D options to the ld command can also be used, respectively, to ensure that the text and data segments addresses are loaded into low memory. The -taso option, however, in addition to setting default addresses for text and data segments, also causes shared libraries linked outside the 31-bit address space to be appropriately relocated by the loader. If you specify -taso and also specify text and data segment addresses with -T and -D, those addresses override the -taso default addresses. The -taso option can be helpful when porting programs that assume address values can be stored in 32-bit variables (that is, programs that assume that pointers are the same length as int variables).

Other flags are xtaso and xtaso_short.

However I'm not sure having built an application with these flags that performing a file on the binary will display anything different to an application that was not built with these flags.

hth

I love deadlines. I like the whooshing sound they make as they fly by - Douglas Adams
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top