From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6427 invoked by alias); 16 Nov 2004 02:48:21 -0000 Mailing-List: contact binutils-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sources.redhat.com Received: (qmail 6392 invoked from network); 16 Nov 2004 02:48:14 -0000 Received: from unknown (HELO sirius.codesourcery.com) (65.74.133.4) by sourceware.org with SMTP; 16 Nov 2004 02:48:14 -0000 Received: from sirius.codesourcery.com (localhost.localdomain [127.0.0.1]) by sirius.codesourcery.com (8.12.8/8.12.5) with ESMTP id iAG2mEYE007735 for ; Mon, 15 Nov 2004 18:48:14 -0800 Received: (from mitchell@localhost) by sirius.codesourcery.com (8.12.8/8.12.8/Submit) id iAG2mEji007731; Mon, 15 Nov 2004 18:48:14 -0800 Date: Tue, 16 Nov 2004 02:48:00 -0000 Message-Id: <200411160248.iAG2mEji007731@sirius.codesourcery.com> From: Mark Mitchell To: binutils@sources.redhat.com Subject: PATCH: Correct handling of R_ARM_TARGET2 in elf32_arm_relocate_section Reply-to: mark@codesourcery.com X-SW-Source: 2004-11/txt/msg00233.txt.bz2 We got spurious warnings about uses of the R_ARM_TARGET2 relocation because we forgot to translate it into the real underlying relocation in elf32_arm_relocate_section. OK? -- Mark Mitchell CodeSourcery, LLC mark@codesourcery.com 2004-11-15 Mark Mitchell * elf32-arm.c (elf32_arm_relocate_section): Use arm_real_reloc_type. Index: elf32-arm.c =================================================================== RCS file: /cvs/src/src/bfd/elf32-arm.c,v retrieving revision 1.7 diff -c -5 -p -r1.7 elf32-arm.c *** elf32-arm.c 13 Nov 2004 13:38:15 -0000 1.7 --- elf32-arm.c 16 Nov 2004 02:46:27 -0000 *************** elf32_arm_relocate_section (bfd * *** 3062,3077 **** --- 3062,3079 ---- Elf_Internal_Shdr *symtab_hdr; struct elf_link_hash_entry **sym_hashes; Elf_Internal_Rela *rel; Elf_Internal_Rela *relend; const char *name; + struct elf32_arm_link_hash_table * globals; #if !USE_REL if (info->relocatable) return TRUE; #endif + globals = elf32_arm_hash_table (info); symtab_hdr = & elf_tdata (input_bfd)->symtab_hdr; sym_hashes = elf_sym_hashes (input_bfd); rel = relocs; relend = relocs + input_section->reloc_count; *************** elf32_arm_relocate_section (bfd * *** 3087,3102 **** bfd_reloc_status_type r; arelent bfd_reloc; r_symndx = ELF32_R_SYM (rel->r_info); r_type = ELF32_R_TYPE (rel->r_info); if ( r_type == R_ARM_GNU_VTENTRY || r_type == R_ARM_GNU_VTINHERIT) continue; ! elf32_arm_info_to_howto (input_bfd, & bfd_reloc, rel); howto = bfd_reloc.howto; #if USE_REL if (info->relocatable) { --- 3089,3107 ---- bfd_reloc_status_type r; arelent bfd_reloc; r_symndx = ELF32_R_SYM (rel->r_info); r_type = ELF32_R_TYPE (rel->r_info); + #ifndef OLD_ARM_ABI + r_type = arm_real_reloc_type (globals, r_type); + #endif if ( r_type == R_ARM_GNU_VTENTRY || r_type == R_ARM_GNU_VTINHERIT) continue; ! bfd_reloc.howto = elf32_arm_howto_from_type (r_type); howto = bfd_reloc.howto; #if USE_REL if (info->relocatable) {