Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* gcc/egcs flags to turn off 64bit code generation?
@ 1999-01-14 12:52 Sanjay Lal
  1999-01-14 17:30 ` Richard Henderson
  0 siblings, 1 reply; 7+ messages in thread
From: Sanjay Lal @ 1999-01-14 12:52 UTC (permalink / raw)
  To: axp-list

I have several large pieces of code that are not 64 bit clean.
Unfortunately, I do not have
the time to do a proper port.  I was wondering if gcc or egcs supported a 32
bit mode similar to Digital's C/C++ compilers?

Regards and thanks
Sanjay
sanjayl@home.com



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: gcc/egcs flags to turn off 64bit code generation?
  1999-01-14 12:52 gcc/egcs flags to turn off 64bit code generation? Sanjay Lal
@ 1999-01-14 17:30 ` Richard Henderson
  1999-01-14 17:46   ` Greg Lindahl
  0 siblings, 1 reply; 7+ messages in thread
From: Richard Henderson @ 1999-01-14 17:30 UTC (permalink / raw)
  To: axp-list

On Thu, Jan 14, 1999 at 07:52:09AM -0500, Sanjay Lal wrote:
> I was wondering if gcc or egcs supported a 32
> bit mode similar to Digital's C/C++ compilers?

No, sorry.


r~


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: gcc/egcs flags to turn off 64bit code generation?
  1999-01-14 17:30 ` Richard Henderson
@ 1999-01-14 17:46   ` Greg Lindahl
  1999-01-16  1:50     ` Richard Henderson
  0 siblings, 1 reply; 7+ messages in thread
From: Greg Lindahl @ 1999-01-14 17:46 UTC (permalink / raw)
  To: axp-list

> > I was wondering if gcc or egcs supported a 32
> > bit mode similar to Digital's C/C++ compilers?
> 
> No, sorry.

How about the suggested abuse of -Tbss, -Tdata, and -Ttext, coupled
with a kernel hack that moves the start addresses of the stack and
heap? Wouldn't that get the desired result with minimal effort? Or is
there other stuff mapped down there?

-- g


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: gcc/egcs flags to turn off 64bit code generation?
@ 1999-01-15  3:57 Sanjay Lal
  1999-01-16  3:28 ` Richard Henderson
  0 siblings, 1 reply; 7+ messages in thread
From: Sanjay Lal @ 1999-01-15  3:57 UTC (permalink / raw)
  To: axp-list

I am not sure what addresses to use for the various segments?

Any ideas?

Regards and thanks
Sanjay

----- Original Message ----- 
From: Greg Lindahl <lindahl@cs.virginia.edu>
To: <axp-list@redhat.com>
Sent: Thursday, January 14, 1999 12:46 PM
Subject: Re: gcc/egcs flags to turn off 64bit code generation?


>> > I was wondering if gcc or egcs supported a 32
>> > bit mode similar to Digital's C/C++ compilers?
>> 
>> No, sorry.
>
>How about the suggested abuse of -Tbss, -Tdata, and -Ttext, coupled
>with a kernel hack that moves the start addresses of the stack and
>heap? Wouldn't that get the desired result with minimal effort? Or is
>there other stuff mapped down there?
>
>-- g
>
>-- 
>To unsubscribe: send e-mail to axp-list-request@redhat.com with
>'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com
>


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: gcc/egcs flags to turn off 64bit code generation?
  1999-01-14 17:46   ` Greg Lindahl
@ 1999-01-16  1:50     ` Richard Henderson
  1999-01-16  2:03       ` Greg Lindahl
  0 siblings, 1 reply; 7+ messages in thread
From: Richard Henderson @ 1999-01-16  1:50 UTC (permalink / raw)
  To: axp-list

On Thu, Jan 14, 1999 at 12:46:39PM -0500, Greg Lindahl wrote:
> How about the suggested abuse of -Tbss, -Tdata, and -Ttext...

Linker scripts, please.  Those options only work properly for a.out. 
Other file formats are more complex than that.

> ... coupled
> with a kernel hack that moves the start addresses of the stack and
> heap?

That would be setting EF_ALPHA_32BIT in the e_flags field of the
ELF header -- em86 uses this.

> Wouldn't that get the desired result with minimal effort?

It doesn't get you 32-bit pointers -- sizeof(void*) is still 8. 
But it does make you tollerant of casting pointers through ints. 
I suppose there might be some application subset that would be
happy with this.

> Or is there other stuff mapped down there?

No, nothing is mapped below the stack (top at 6GB) by default.


r~


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: gcc/egcs flags to turn off 64bit code generation?
  1999-01-16  1:50     ` Richard Henderson
@ 1999-01-16  2:03       ` Greg Lindahl
  0 siblings, 0 replies; 7+ messages in thread
From: Greg Lindahl @ 1999-01-16  2:03 UTC (permalink / raw)
  To: axp-list

> > Wouldn't that get the desired result with minimal effort?
> 
> It doesn't get you 32-bit pointers -- sizeof(void*) is still 8. 
> But it does make you tollerant of casting pointers through ints. 
> I suppose there might be some application subset that would be
> happy with this.

There are so many apps like that that Digital's linker has the -taso
option to deal with them. That's what I'm aiming at -- I have
legacy Fortran codes which store addresses in integers.

-- g



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: gcc/egcs flags to turn off 64bit code generation?
  1999-01-15  3:57 Sanjay Lal
@ 1999-01-16  3:28 ` Richard Henderson
  0 siblings, 0 replies; 7+ messages in thread
From: Richard Henderson @ 1999-01-16  3:28 UTC (permalink / raw)
  To: axp-list

On Thu, Jan 14, 1999 at 10:57:19PM -0500, Sanjay Lal wrote:
> I am not sure what addresses to use for the various segments?

If you did go with Greg's suggestion -- modulo the comments
I just added in another message -- I'd suggest copying the
standard linker script from /usr/lib/ldscripts/elf64alpha.x
and modifying 

  . = 0x120000000 + SIZEOF_HEADERS;

at the top to read

  . = 0x100000 + SIZEOF_HEADERS;

which gives you a program base of 1MB.  That makes sure that you
can still trap NULL pointer errors.  In addition, some versions
of binutils chose 1MB as the maximum alpha architectural page
size and will pad the binary appropriately.  (The correct number
is 64k, and has been fixed in, i believe, binutils 2.9.0.) 


r~


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~1999-01-16  3:50 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-01-14 12:52 gcc/egcs flags to turn off 64bit code generation? Sanjay Lal
1999-01-14 17:30 ` Richard Henderson
1999-01-14 17:46   ` Greg Lindahl
1999-01-16  1:50     ` Richard Henderson
1999-01-16  2:03       ` Greg Lindahl
  -- strict thread matches above, loose matches on Subject: below --
1999-01-15  3:57 Sanjay Lal
1999-01-16  3:28 ` Richard Henderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox