From: Mark Mitchell <mark@codesourcery.com>
To: binutils@sources.redhat.com
Subject: PATCH: Correct handling of R_ARM_TARGET2 in elf32_arm_relocate_section
Date: Tue, 16 Nov 2004 02:48:00 -0000 [thread overview]
Message-ID: <200411160248.iAG2mEji007731@sirius.codesourcery.com> (raw)
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 <mark@codesourcery.com>
* 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)
{
next reply other threads:[~2004-11-16 2:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-16 2:48 Mark Mitchell [this message]
2004-11-16 3:32 ` Daniel Jacobowitz
2004-11-16 4:51 ` Mark Mitchell
2004-11-16 9:58 ` Richard Earnshaw
2004-11-16 10:09 ` Mark Mitchell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200411160248.iAG2mEji007731@sirius.codesourcery.com \
--to=mark@codesourcery.com \
--cc=binutils@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).