• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GNU Binutils with patches for OS216


Commit MetaInfo

Revisión84a86c64e04791b62dc41da99dfe17ae97176652 (tree)
Tiempo2012-11-17 03:44:06
AutorYufeng Zhang <yufeng.zhang@arm....>
CommiterYufeng Zhang

Log Message

bfd/ChangeLog

2012-11-16 Joey Ye <joey.ye@arm.com>

* elf32-arm.c (elf32_arm_final_link_relocate,
case R_ARM_THM_ALU_PREL_11_0, case R_ARM_THM_PC12): Align address of
the place being relocated.
(elf32_arm_final_link_relocate, case R_ARM_THM_PC8): Align address
of the place being relocated and truncate addend.
(Pa): New macro.

Cambiar Resumen

Diferencia incremental

--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,12 @@
1+2012-11-16 Joey Ye <joey.ye@arm.com>
2+
3+ * elf32-arm.c (elf32_arm_final_link_relocate,
4+ case R_ARM_THM_ALU_PREL_11_0, case R_ARM_THM_PC12): Align address of
5+ the place being relocated.
6+ (elf32_arm_final_link_relocate, case R_ARM_THM_PC8): Align address
7+ of the place being relocated and truncate addend.
8+ (Pa): New macro.
9+
110 2012-05-11 Ralf Corsépius <ralf.corsepius@rtems.org>
211
312 Backport from mainline:
--- a/bfd/elf32-arm.c
+++ b/bfd/elf32-arm.c
@@ -1,6 +1,6 @@
11 /* 32-bit ELF support for ARM
22 Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
3- 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
3+ 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
44
55 This file is part of BFD, the Binary File Descriptor library.
66
@@ -61,6 +61,9 @@
6161 #define ARM_ELF_ABI_VERSION 0
6262 #define ARM_ELF_OS_ABI_VERSION ELFOSABI_ARM
6363
64+/* The Adjusted Place, as defined by AAELF. */
65+#define Pa(X) ((X) & 0xfffffffc)
66+
6467 static bfd_boolean elf32_arm_write_section (bfd *output_bfd,
6568 struct bfd_link_info *link_info,
6669 asection *sec,
@@ -8441,9 +8444,9 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto,
84418444 }
84428445
84438446 relocation = value + signed_addend;
8444- relocation -= (input_section->output_section->vma
8445- + input_section->output_offset
8446- + rel->r_offset);
8447+ relocation -= Pa (input_section->output_section->vma
8448+ + input_section->output_offset
8449+ + rel->r_offset);
84478450
84488451 value = abs (relocation);
84498452
@@ -8473,12 +8476,12 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto,
84738476 insn = bfd_get_16 (input_bfd, hit_data);
84748477
84758478 if (globals->use_rel)
8476- addend = (insn & 0x00ff) << 2;
8479+ addend = ((((insn & 0x00ff) << 2) + 4) & 0x3ff) -4;
84778480
84788481 relocation = value + addend;
8479- relocation -= (input_section->output_section->vma
8480- + input_section->output_offset
8481- + rel->r_offset);
8482+ relocation -= Pa (input_section->output_section->vma
8483+ + input_section->output_offset
8484+ + rel->r_offset);
84828485
84838486 value = abs (relocation);
84848487
@@ -8513,9 +8516,9 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto,
85138516 }
85148517
85158518 relocation = value + signed_addend;
8516- relocation -= (input_section->output_section->vma
8517- + input_section->output_offset
8518- + rel->r_offset);
8519+ relocation -= Pa (input_section->output_section->vma
8520+ + input_section->output_offset
8521+ + rel->r_offset);
85198522
85208523 value = abs (relocation);
85218524