From: Gags Grewal Subject: Generating 32 bit flat assembly with GNU tools Date: Fri, 6 Dec 2002 19:32:40 +0530 Sender: linux-assembly-owner@vger.kernel.org Message-ID: <200212061932.40641.gagan_grewal@vsnl.net> Reply-To: gagan_grewal@vsnl.net Mime-Version: 1.0 Content-Transfer-Encoding: 8BIT Return-path: List-Id: Content-Type: text/plain; charset="us-ascii" To: linux-assembly@vger.kernel.org Hi folks! Am having some problems generating 32bit flat binary using GNU tools. I assemble the code using 'as' ... the code is just fine ... i.e. 32 bit ... but when I change the format from 'elf32-i386' to 'binary' using 'objcopy' ... the code that I get is 16 bit and not 32 bit. Using operand overrides solves the problem to some extent .... but not fully ... ( talk abt inserting override bytes after each instruction in long programs ! ) I dont want to use NASM as it'll be difficult to integrate the code with GCC later on .... ( and examining the code generated by NASM reveals that it uses override bytes to generate 32 bit code ... ??? ) Anybody have a solution ? Thanks in advance .... Regards, Gags. -- Ken Rules, Unix Liberates, Linux Unites.