Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* 32-bit binaries (howto?)
@ 2000-11-29 16:49 reig
  2000-11-29 17:00 ` Ron Farrer
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: reig @ 2000-11-29 16:49 UTC (permalink / raw)
  To: axp-list

Hi,
 
I need to build a 32 bit binary on an alpha. I've searched the
archives and I've found the following suggestions:
 
1. a patched ld with -taso flag
 
        This is not an option, since I cannot expect everyone who
        builds from sources to have this patched ld.
 
2. Create linker script with `ld --verbose > script', edit script like this:
 
    -  . = 0x120000000 + SIZEOF_HEADERS;
    +  . = 0x10000 + SIZEOF_HEADERS;
 
   link with it like this:
     ld -T script -static
 
   set 1 at file offset 0x30 in the executable
 
I could use some help for this last step. Someone said in the mailing
list that this can be done like this:
 
        #include <linux/personality.h>
 
        add this line at the beginning of main:
 
        personality(0x800000);
 
However, I prefer not to alter the sources, but it's OK to tweak the
executable directly during the build process. Can anyone tell me an
easy way to set the bit at offset 0x30, so that this can be done from
the makefile? Any simpler alternative would do as well, of course.
 
Thanks in advance,
 
Fermin Reig
 
----
Useful info:
 
uname -a
Linux <machine name> 2.2.13-0.9 #1 Thu Dec 9 17:03:57 EST 1999 alpha unknown
 
gcc -v
Reading specs from /usr/lib/gcc-lib/alpha-redhat-linux/egcs-2.91.66/specs
gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)




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

end of thread, other threads:[~2000-12-14 16:38 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-11-29 16:49 32-bit binaries (howto?) reig
2000-11-29 17:00 ` Ron Farrer
2000-11-29 17:08 ` Ross A Knepper
2000-11-29 17:36   ` reig
2000-11-30  3:07     ` Greg Lindahl
2000-11-30 11:05       ` reig
2000-12-01  6:27         ` Greg Lindahl
2000-12-02 21:39           ` Ivan Kokshaysky
2000-12-14 12:56           ` reig
2000-12-14 16:13             ` Greg Lindahl
2000-12-14 16:38               ` reig
2000-11-30  3:05 ` Greg Lindahl

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