From patchwork Wed Jan 27 17:06:24 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John David Anglin X-Patchwork-Id: 75488 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id o0RH6RbI030096 for ; Wed, 27 Jan 2010 17:06:27 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754286Ab0A0RG1 (ORCPT ); Wed, 27 Jan 2010 12:06:27 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753027Ab0A0RG1 (ORCPT ); Wed, 27 Jan 2010 12:06:27 -0500 Received: from hiauly1.hia.nrc.ca ([132.246.100.193]:2352 "EHLO hiauly1.hia.nrc.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754286Ab0A0RG0 (ORCPT ); Wed, 27 Jan 2010 12:06:26 -0500 Received: by hiauly1.hia.nrc.ca (Postfix, from userid 1000) id 0E6F54EA9; Wed, 27 Jan 2010 12:06:24 -0500 (EST) Subject: Segmentation fault in __libc_start_main with -static To: linux-parisc@vger.kernel.org Date: Wed, 27 Jan 2010 12:06:24 -0500 (EST) From: "John David Anglin" Cc: carlos@systemhalted.org X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Message-Id: <20100127170625.0E6F54EA9@hiauly1.hia.nrc.ca> Sender: linux-parisc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org Index: elf32-hppa.c =================================================================== RCS file: /cvs/src/src/bfd/elf32-hppa.c,v retrieving revision 1.169 diff -u -3 -p -r1.169 elf32-hppa.c --- elf32-hppa.c 8 Nov 2009 20:47:24 -0000 1.169 +++ elf32-hppa.c 26 Jan 2010 02:52:02 -0000 @@ -3388,12 +3388,19 @@ final_link_relocate (asection *input_sec case R_PARISC_DPREL21L: case R_PARISC_DPREL14R: case R_PARISC_DPREL14F: + case R_PARISC_TLS_GD21L: + case R_PARISC_TLS_LDM21L: + case R_PARISC_TLS_IE21L: /* Convert instructions that use the linkage table pointer (r19) to instructions that use the global data pointer (dp). This is the most efficient way of using PIC code in an incomplete executable, but the user must follow the standard runtime conventions for accessing data for this to work. */ - if (orig_r_type == R_PARISC_DLTIND21L) + if (orig_r_type == R_PARISC_DLTIND21L + || (!info->shared + && (r_type == R_PARISC_TLS_GD21L + || r_type == R_PARISC_TLS_LDM21L + || r_type == R_PARISC_TLS_IE21L))) { /* Convert addil instructions if the original reloc was a DLTIND21L. GCC sometimes uses a register other than r19 for @@ -3444,11 +3451,8 @@ final_link_relocate (asection *input_sec case R_PARISC_DLTIND21L: case R_PARISC_DLTIND14R: case R_PARISC_DLTIND14F: - case R_PARISC_TLS_GD21L: case R_PARISC_TLS_GD14R: - case R_PARISC_TLS_LDM21L: case R_PARISC_TLS_LDM14R: - case R_PARISC_TLS_IE21L: case R_PARISC_TLS_IE14R: value -= elf_gp (input_section->output_section->owner); break;