This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

-xtaso_short option on DEC Alpha Linux ?


I am attempting to build (on Alpha) a software package written for PC Linux
(and other 32-bit unix flavors), and encountering numerous gcc compiler
warnings about cast of pointer to integer of different size, which I
interpret as due to 64-bit addresses (pointers) on Alpha.

Investigating to see how this is handled on Tru64 unix (i.e., consulting the
man page for the Compaq C Compiler, ccc, also available for Alpha Linux), I
find compiler options -taso, -xtaso, and -xtaso_short (see below).  The
first is simply passed to the linker (and on DEC Alpha, my 'ld' appears to
accept -taso).  The last, -xtaso_short, would certainly solve my 64-bit
problem as far as the compiler is concerned ... but switching to ccc is not
an option because ccc only supports the -taso switches on Tru64, not Linux.

Given that the GNU linker supports the -taso switch, I am curious to know if
gcc support for -xtaso and especially -xtaso_short on DEC Alpha Linux is far
behind ?

Thanks very much for any information.

      -- Jim McCarthy
         Los Angeles, CA
         jkmccarthy@pacbell.net


% man ccc
...
Options That Affect the Linker or Loader
...
[Linux] This section describes the linker options available
on Tru64 UNIX.  For each, the equivalent GNU linker option
on Linux Alpha (if any) is identified, as well as the effect
of specifying the Tru64 UNIX option on the ccc command line.
...
[Tru64] -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
    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 that
    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).

    [Linux]  There is no equivalent option on Linux Alpha.

    [Linux]  This option is not passed to ld and generates
    a warning.
...
Stack-handling and Pointer-handling Options
...
[Tru64] -xtaso

    Causes the compiler to respect "#pragma pointer_size"
    directives, which control the size of pointers.  These
    directives are ignored otherwise.  Also, causes the
    -taso option to be passed to the linker (if linking).

    Pointers are 64-bits by default.  This option, when
    used in conjunction with the pointer_size pragmas,
    allows applications to use 32-bit pointers. [...]

[Tru64] -xtaso_short

    Same as the -xtaso option, except -xtaso_short also
    directs the compiler to allocate 32-bit pointers by
    default.  You can still use 64-bit pointers, but only
    by use of pointer_size pragmas.

    The use of the -xtaso_short option can cause conflicts
    between the compiler's assumptions about pointer sizes
    and data layouts and the default values that were in
    effect when the system libraries were created.  See
    protect_headers_setup(8) for details on how to avoid
    this conflict.
...


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]