Re: Common Porting Problem

Jim Nance (
Fri, 29 Nov 1996 19:24:52 -0500 (EST)

> I know I'm going to be raked over the coals for asking this, as it's
> probably been rehashed any number of times; here it goes anyway.

I see you have been.

> My question; is there a compiler switch I can use to make the pointers 4
> bytes or the integers 8, so this stuff will work without major surgery?

The Digital Unix compiler has a switch (-taso) which tries to do this.
What it does is link everything in the lower 2G of address space so that
if something tries to stuff a pointer into an integer the pointer will
fit. Gcc does not have this option, but you may be able to use the
-Tbss -Tdata and -Ttext flags to achieve the same effect. These flags
allow you to set the location of the bss, data, and text sections of
the executables. Unfortunatly I have no idea where you should locate
them :-(. You may also have to hack up malloc() and friends to ensure
that you only get memory in the lower 31 bits of address space.

Hope this helps.


To unsubscribe: send e-mail to with
'unsubscribe' as the subject.  Do not send it to

Feedback | Store | News | Support | Product Errata | About Us | Linux Info | Search | JumpWords
No Frames | Show Frames

Copyright © 1995-1997 Red Hat Software. Legal notices