From: reig@dcs.gla.ac.uk
To: axp-list@redhat.com
Subject: 32-bit binaries (howto?)
Date: Wed, 29 Nov 2000 16:49:00 +0000 (GMT) [thread overview]
Message-ID: <200011291649.QAA21789@crab.dcs.gla.ac.uk> (raw)
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)
next reply other threads:[~2000-11-29 16:49 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-11-29 16:49 reig [this message]
2000-11-29 17:00 ` 32-bit binaries (howto?) 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
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