From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7603 invoked by alias); 11 Aug 2008 06:37:15 -0000 Received: (qmail 7594 invoked by uid 22791); 11 Aug 2008 06:37:14 -0000 X-Spam-Check-By: sourceware.org Received: from rv-out-0708.google.com (HELO rv-out-0708.google.com) (209.85.198.249) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 11 Aug 2008 06:36:37 +0000 Received: by rv-out-0708.google.com with SMTP id c5so1755825rvf.56 for ; Sun, 10 Aug 2008 23:36:35 -0700 (PDT) Received: by 10.114.153.18 with SMTP id a18mr3101535wae.161.1218436595857; Sun, 10 Aug 2008 23:36:35 -0700 (PDT) Received: by 10.114.204.19 with HTTP; Sun, 10 Aug 2008 23:36:35 -0700 (PDT) Message-ID: Date: Mon, 11 Aug 2008 16:32:00 -0000 From: "Pan ruochen" To: gcc-help@gcc.gnu.org Subject: how to create a self-relocatable raw binary with gcc? MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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: 2008-08/txt/msg00101.txt.bz2 Hi All, I want to create a raw binary excutable for MIPS arch, which can relocate itself to any load address at runtime without an externel loader. How should I compile the sources and write the linker script for this purpose? Best Regards, PRC Apr 11, 2008