From: ron@topaz.sensor.com (Ron Natalie)
Subject: Re: ALPHA SLOWER THAN PENTIUM !!!!
Date: 1995/12/15 [thread overview]
Message-ID: <4asgvl$2mq@topaz.sensor.com> (raw)
In-Reply-To: danpop.819045506@rscernix
Dan Pop (danpop@mail.cern.ch) wrote:
: In <4aq03t$ksv@topaz.sensor.com> ron@topaz.sensor.com (Ron Natalie) writes:
: >Dan Pop (danpop@mail.cern.ch) wrote:
: >
: >
: >: >It would be the nice to be able to use 32 bit pointers on the Alpha and
: >: >the system supports it, but there is no compatibility with the system
: >: >libraries if you run in this mode.
: >
: >: Of course there is. RTFM.
: >
: >You want to be a little less explicit. I've got a whole stack of
: >manuals here. Which one tells me how to fix the library issue?
: I already covered this issue when I followed up your article with the
: subject "Compiler flags of dubious utility", in this very newsgroup.
: Since you seem to have missed it, here we go again:
: The cc man page is enough:
: -xtaso
: Cause the compiler to respond to the #pragma pointer_size preprocessor
: directives which control pointer size allocations. This flag allows
: you to specify 32-bit pointers when used in conjunction with the pragma
: pointer_size directive. You must place pragmas where appropriate in
: your program to use 32-bit pointers. Images built with this flag must
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
: be linked with the -taso flag in order to run correctly. See the
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
: Programmer's Guide for information on #pragma pointer_size.
: -xtaso_short
: Force the compiler to allocate 32-bit pointers by default. You can
: still use 64-bit pointers, but only by the use of pragmas.
: So, compile with -xtaso_short and link with -taso.
: ues5:~/tmp 11> cat test.c
: #include <stdio.h>
: int main()
: {
: char *msg = "Hello, world!";
: printf("%ld\n", (long)sizeof msg);
: puts(msg);
: return 0;
: }
: ues5:~/tmp 12> cc -c -xtaso_short test.c
: ues5:~/tmp 13> cc -taso test.o
: ues5:~/tmp 14> ./a.out
: 4
: Hello, world!
: ues5:~/tmp 15> cc test.o
: ues5:~/tmp 16> ./a.out
: 4
: Segmentation fault (core dumped)
: Looks like -taso fixes the library issue.
It looks like you have an odd idea what corresponds to a conclusive
test. Your application succceeds only because your pointer is passed
in a register to the library function. Anything not so trivial will
bomb... try this...
#include <stdio.h>
int main() {
fprintf(stdout, "Hello world!\n");
}
-xtaso_short does make 32bit pointers, but all -taso does is force
everything to be loaded blow the 4gig mark. The problem is that the
libraries themselves, still use 32bit pointers and any structures
that are used in your 32bit version that are used in the library
functions will have severe disagreement as to the location and size
of the various elements.
-Ron
next prev parent reply other threads:[~1995-12-15 5:00 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
1995-12-06 5:00 ALPHA SLOWER THAN PENTIUM !!!! Emiliano Stesinach
1995-12-07 5:00 ` Javier Henderson
1995-12-08 5:00 ` michael
1995-12-07 5:00 ` Rob Young
1995-12-07 5:00 ` Yan-Song Chen
1995-12-07 5:00 ` Dan Pop
1995-12-07 5:00 ` Gromit
1995-12-08 5:00 ` John Hascall
1995-12-07 5:00 ` Andrew Armstrong
1995-12-08 5:00 ` Yan-Song Chen
1995-12-09 5:00 ` Thumper!
1995-12-11 5:00 ` Dan Pop
1995-12-11 5:00 ` Robin.Fairbairns
1995-12-12 5:00 ` Michael Brodeur
1995-12-13 5:00 ` Dan Pop
1995-12-12 5:00 ` Dirk Grunwald
1995-12-13 5:00 ` Dan Pop
1995-12-13 5:00 ` Ron Natalie
1995-12-14 5:00 ` Dan Pop
1995-12-14 5:00 ` Ron Natalie
[not found] ` <danpop.819045506@rscernix>
1995-12-15 5:00 ` Ron Natalie [this message]
1995-12-16 5:00 ` Larry Kilgallen
1995-12-17 5:00 ` Dave Cherkus
1995-12-12 5:00 ` Richard Ingram
1995-12-13 5:00 ` Mike Weber
1995-12-13 5:00 ` Dirk Grunwald
1995-12-14 5:00 ` Ron Natalie
1995-12-15 5:00 ` Dan Pop
1995-12-16 5:00 ` a little more about -xtaso and -taso in Digital UNIX Jeffrey Mogul
1995-12-22 5:00 ` ALPHA SLOWER THAN PENTIUM !!!! Alan H. Martin
1995-12-13 5:00 ` Dirk Grunwald
1995-12-14 5:00 ` Dan Pop
1995-12-14 5:00 ` Joseph Vigneau
1995-12-14 5:00 ` Ron Natalie
1995-12-14 5:00 ` Gromit
1995-12-13 5:00 ` Mike Weber
1995-12-14 5:00 ` Dirk Grunwald
1995-12-14 5:00 ` David Mosberger-Tang
1995-12-15 5:00 ` Dirk Grunwald
1995-12-07 5:00 ` Ron Fox
1995-12-08 5:00 ` Yan-Song Chen
1995-12-12 5:00 ` dave pierson
[not found] <199512110641.WAA20124@helix.net>
1995-12-12 5:00 ` michael
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox