• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签
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

修订版2bc56d66132a8d4a06520b0531b8708108197c9b (tree)
时间2013-11-06 12:13:04
作者DJ Delorie <dj@redh...>
CommiterDJ Delorie

Log Message

* elf32-rl78.c (elf32_rl78_relax_delete_bytes): Make sure relocs
are loaded before trying to use them.

更改概述

差异

--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
1+2013-11-05 DJ Delorie <dj@redhat.com>
2+
3+ * elf32-rl78.c (elf32_rl78_relax_delete_bytes): Make sure relocs
4+ are loaded before trying to use them.
5+
16 2013-11-05 H.J. Lu <hongjiu.lu@intel.com>
27 Bernhard Rosenkränzer <bernhard.rosenkranzer@linaro.org>
38
--- a/bfd/elf32-rl78.c
+++ b/bfd/elf32-rl78.c
@@ -1481,6 +1481,12 @@ elf32_rl78_relax_delete_bytes (bfd *abfd, asection *sec, bfd_vma addr, int count
14811481 toaddr = alignment_rel->r_offset;
14821482
14831483 irel = elf_section_data (sec)->relocs;
1484+ if (irel == NULL)
1485+ {
1486+ _bfd_elf_link_read_relocs (sec->owner, sec, NULL, NULL, TRUE);
1487+ irel = elf_section_data (sec)->relocs;
1488+ }
1489+
14841490 irelend = irel + sec->reloc_count;
14851491
14861492 /* Actually delete the bytes. */
@@ -1496,7 +1502,7 @@ elf32_rl78_relax_delete_bytes (bfd *abfd, asection *sec, bfd_vma addr, int count
14961502 memset (contents + toaddr - count, 0x03, count);
14971503
14981504 /* Adjust all the relocs. */
1499- for (irel = elf_section_data (sec)->relocs; irel < irelend; irel++)
1505+ for (; irel && irel < irelend; irel++)
15001506 {
15011507 /* Get the new reloc address. */
15021508 if (irel->r_offset > addr