From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.redhat.com (mail.redhat.com [199.183.24.239]) by listman.redhat.com (Postfix) with ESMTP id 9D77A2F2A2 for ; Wed, 29 Nov 2000 11:49:03 -0500 (EST) Received: (from mail@localhost) by mail.redhat.com (8.11.0/8.8.7) id eATGn3125585 for axp-list@listman.redhat.com; Wed, 29 Nov 2000 11:49:03 -0500 Received: from iona.dcs.gla.ac.uk (iona.dcs.gla.ac.uk [130.209.240.35]) by mail.redhat.com (8.11.0/8.8.7) with ESMTP id eATGn2D25577 for ; Wed, 29 Nov 2000 11:49:03 -0500 Received: from crab.dcs.gla.ac.uk ([130.209.241.150]) by iona.dcs.gla.ac.uk with esmtp (Exim 3.13 #1) id 141APl-0003Qz-00 for axp-list@redhat.com; Wed, 29 Nov 2000 16:49:01 +0000 Received: by crab.dcs.gla.ac.uk (8.8.8+Sun/Dumb) id QAA21789; Wed, 29 Nov 2000 16:49:00 GMT From: reig@dcs.gla.ac.uk Message-Id: <200011291649.QAA21789@crab.dcs.gla.ac.uk> Subject: 32-bit binaries (howto?) To: axp-list@redhat.com Date: Wed, 29 Nov 2000 16:49:00 +0000 (GMT) X-Mailer: ELM [version 2.5 PL3] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Loop: axp-list@redhat.com Sender: axp-list-admin@redhat.com Errors-To: axp-list-admin@redhat.com X-BeenThere: axp-list@redhat.com X-Mailman-Version: 2.0beta4 Precedence: bulk Reply-To: axp-list@redhat.com List-Id: Linux and Red Hat on Alpha processors 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 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 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)