From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15273 invoked by alias); 22 Apr 2009 11:57:14 -0000 Received: (qmail 15254 invoked by uid 22791); 22 Apr 2009 11:57:12 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-bw0-f224.google.com (HELO mail-bw0-f224.google.com) (209.85.218.224) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 22 Apr 2009 11:57:06 +0000 Received: by bwz24 with SMTP id 24so1869725bwz.8 for ; Wed, 22 Apr 2009 04:57:03 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.171.6 with SMTP id y6mr4453748muo.110.1240401423023; Wed, 22 Apr 2009 04:57:03 -0700 (PDT) Date: Wed, 22 Apr 2009 11:57:00 -0000 Message-ID: <74fef6df0904220457y5650ab4eq215fe274badf60f4@mail.gmail.com> Subject: building non-shared dynamic binaries on x86-64 linux-elf From: Mathieu Lacage To: gcc-help Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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: 2009-04/txt/msg00295.txt.bz2 hi, The title pretty much says what I am trying to do: this works fine on i386 but fails on x86-64. The compile-time error is: "relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC". What I am trying to do is generate a non-shared relocatable dynamic binary which means that I really don't want to use -fPIC and I was hoping that the dynamic linker would be able to finish relocating the final binary. Is this impossible on linux-elf-x86-64 ? Mathieu -- Mathieu Lacage