From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27445 invoked by alias); 10 Nov 2011 00:19:39 -0000 Received: (qmail 27420 invoked by uid 22791); 10 Nov 2011 00:19:38 -0000 X-SWARE-Spam-Status: No, hits=-3.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,TW_BJ X-Spam-Check-By: sourceware.org Received: from mail-yw0-f47.google.com (HELO mail-yw0-f47.google.com) (209.85.213.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 10 Nov 2011 00:19:24 +0000 Received: by ywf9 with SMTP id 9so2541871ywf.20 for ; Wed, 09 Nov 2011 16:19:24 -0800 (PST) Received: by 10.68.41.161 with SMTP id g1mr9249040pbl.67.1320884363694; Wed, 09 Nov 2011 16:19:23 -0800 (PST) Received: by 10.68.41.161 with SMTP id g1mr9248996pbl.67.1320884363468; Wed, 09 Nov 2011 16:19:23 -0800 (PST) Received: from coign.google.com ([2620:0:1000:2404:224:d7ff:fe8f:f634]) by mx.google.com with ESMTPS id lk8sm16869270pbb.4.2011.11.09.16.19.22 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 09 Nov 2011 16:19:23 -0800 (PST) From: Ian Lance Taylor To: Kerrick Staley Cc: gcc-help@gcc.gnu.org Subject: Re: Issues with gcc -S output format References: Date: Thu, 10 Nov 2011 13:19:00 -0000 In-Reply-To: (Kerrick Staley's message of "Wed, 9 Nov 2011 17:58:17 -0600") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2011-11/txt/msg00105.txt.bz2 Kerrick Staley writes: > I can successfully compile the programs and convert them into a raw > binary format for use with the processor I designed, but I now need to > also run the programs on the MARS simulator in order to check the > accuracy of my processor implementation.=C2=A0 The MARS simulator will on= ly > accept assembly source code as input (and not raw binary or object > files), so I tried using -S to produce the assembly code for the > programs. The problem is that MARS does not understand macros such as > %lo and %hi (although it does have basic support for directives), so > the code won't run. I also tried using objdump to disassemble the > object file, but it inserts a bunch of extra junk such as instruction > addresses. > > How can I get the raw assembly code in a simple format (that MARS can par= se)? I suppose you could try -mno-explicit-relocs. I would not be at all surprised if it no longer works, though, as I doubt anybody tests it. Ian