Re: Problem with 64-bit Postgres - Mailing list pgsql-general

From Peter Alberer
Subject Re: Problem with 64-bit Postgres
Date
Msg-id 200509151605.j8FG5a0a062248@obelix.wu-wien.ac.at
Whole thread Raw
In response to Re: Problem with 64-bit Postgres  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Problem with 64-bit Postgres
List pgsql-general
Hmm, i just tried to do the same thing (ppc64 sh, ...) but it seems to me
that the result is a 32bit executable:

[root@testxx pg803]# ldd bin/psql
        libpq.so.4 => /opt/learn-bench/pg803/lib/libpq.so.4 (0x0ff95000)
        libz.so.1 => /usr/lib/libz.so.1 (0x0fbf0000)
        libreadline.so.4 => /usr/lib/libreadline.so.4 (0x000e0000)
        libtermcap.so.2 => /lib/libtermcap.so.2 (0x0fc30000)
        libcrypt.so.1 => /lib/libcrypt.so.1 (0x00040000)
        libresolv.so.2 => /lib/libresolv.so.2 (0x0fa00000)
        libnsl.so.1 => /lib/libnsl.so.1 (0x00080000)
        libdl.so.2 => /lib/libdl.so.2 (0x0fe60000)
        libm.so.6 => /lib/tls/libm.so.6 (0x0fdd0000)
        libc.so.6 => /lib/tls/libc.so.6 (0xf7e97000)
        /lib/ld.so.1 (0x0ffd0000)

[root@testxx pg803]# readelf -h bin/psql
ELF Header:
  Magic:   7f 45 4c 46 01 02 01 00 00 00 00 00 00 00 00 00
  Class:                             ELF32
  Data:                              2's complement, big endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - System V
  ABI Version:                       0
  Type:                              EXEC (Executable file)
  Machine:                           PowerPC


When i compiled with the -m64 switch the result was an ELF64 file, and all
of the library references were going to /lib64/ ...

[root@testxx pg803]# ldd bin/psql
        libpq.so.4 => /opt/learn-bench/pg803/lib/libpq.so.4
(0x0000008000001000)
        libz.so.1 => /usr/lib64/libz.so.1 (0x000000802bcb0000)
        libreadline.so.4 => /usr/lib64/libreadline.so.4 (0x000000802bdb0000)
        libtermcap.so.2 => /lib64/libtermcap.so.2 (0x000000802bc80000)
        libcrypt.so.1 => /lib64/libcrypt.so.1 (0x0000008000052000)
        libresolv.so.2 => /lib64/libresolv.so.2 (0x000000802c200000)
        libnsl.so.1 => /lib64/libnsl.so.1 (0x000000802de20000)
        libdl.so.2 => /lib64/libdl.so.2 (0x000000802bc60000)
        libm.so.6 => /lib64/tls/libm.so.6 (0x000000802bbd0000)
        libc.so.6 => /lib64/tls/libc.so.6 (0x000000802ba40000)
        /lib64/ld64.so.1 (0x000000802ba00000)

[root@testxx pg803]# readelf -h bin/psql
ELF Header:
  Magic:   7f 45 4c 46 02 02 01 00 00 00 00 00 00 00 00 00
  Class:                             ELF64
  Data:                              2's complement, big endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - System V
  ABI Version:                       0
  Type:                              EXEC (Executable file)
  Machine:                           PowerPC64

What elf-class did your compilation produce? Is my assumption, that it
should be elf64 for a 64-bit executable correct?

Regards, peter



pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Strange Bug in exim4 postgresql lookup code or libpq?
Next
From: Tom Lane
Date:
Subject: Re: Problem with 64-bit Postgres