aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorAndrew Haley <aph@redhat.com>2010-04-21 16:32:31 +0000
committerAndrew Haley <aph@redhat.com>2010-04-21 16:32:31 +0000
commit85fdf9067facc06446531798a158b53c03c1373c (patch)
tree812878934b79e19dd3c22fd67069c92f9c2c3900 /bfd
parenta8ae7dc0fb885e983d813eec04a6a4d67e454baf (diff)
downloadfsf-binutils-gdb-85fdf9067facc06446531798a158b53c03c1373c.zip
fsf-binutils-gdb-85fdf9067facc06446531798a158b53c03c1373c.tar.gz
fsf-binutils-gdb-85fdf9067facc06446531798a158b53c03c1373c.tar.bz2
2010-04-15 Andrew Haley <aph@redhat.com>
* emultempl/armelf.em (merge_exidx_entries): New variable. (OPTION_NO_MERGE_EXIDX_ENTRIES): New definition. ("no-merge-exidx-entries"): New option. * ld.texinfo (merge-exidx-entries): Document this option. 2010-04-15 Andrew Haley <aph@redhat.com> * bfd-in.h (elf32_arm_fix_exidx_coverage): Add new flag: merge_exidx_entries. * bfd-in2.h: Likewise. * elf32-arm.c (elf32_arm_fix_exidx_coverage): Likewise. Use it to control merging of exidx entries. 2010-04-15 Andrew Haley <aph@redhat.com> * options.h (merge_exidx_entries): New option. * arm.cc (class Arm_exidx_fixup): Add new arg, merge_exidx_entries. (class Arm_exidx_fixup::merge_exidx_entries_): New member. (Output_section::fix_exidx_coverage): Add new arg, merge_exidx_entries. (Target_arm::merge_exidx_entries): New function. (process_exidx_entry): Don't merge if merge_exidx_entries_ is false. (Arm_output_section::fix_exidx_coverage): Pass merge_exidx_entries to Arm_exidx_fixup constructor. Add new arg, merge_exidx_entries. (Target_arm::fix_exidx_coverage): pass merge_exidx_entries to Arm_output_section::fix_exidx_coverage.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog8
-rw-r--r--bfd/bfd-in.h2
-rw-r--r--bfd/bfd-in2.h2
-rw-r--r--bfd/elf32-arm.c8
4 files changed, 16 insertions, 4 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 7c1aa05..5cd8289 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,11 @@
+2010-04-15 Andrew Haley <aph@redhat.com>
+
+ * bfd-in.h (elf32_arm_fix_exidx_coverage): Add new flag:
+ merge_exidx_entries.
+ * bfd-in2.h: Likewise.
+ * elf32-arm.c (elf32_arm_fix_exidx_coverage): Likewise. Use it to
+ control merging of exidx entries.
+
2010-04-20 Joseph Myers <joseph@codesourcery.com>
* elf32-tic6x.h: New.
diff --git a/bfd/bfd-in.h b/bfd/bfd-in.h
index 07f2fae..cfa5225 100644
--- a/bfd/bfd-in.h
+++ b/bfd/bfd-in.h
@@ -906,7 +906,7 @@ extern bfd_boolean elf32_arm_build_stubs
/* ARM unwind section editing support. */
extern bfd_boolean elf32_arm_fix_exidx_coverage
- (struct bfd_section **, unsigned int, struct bfd_link_info *);
+(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean);
/* PowerPC @tls opcode transform/validate. */
extern unsigned int _bfd_elf_ppc_at_tls_transform
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index 9cf4f64..a3f8ccc 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -913,7 +913,7 @@ extern bfd_boolean elf32_arm_build_stubs
/* ARM unwind section editing support. */
extern bfd_boolean elf32_arm_fix_exidx_coverage
- (struct bfd_section **, unsigned int, struct bfd_link_info *);
+ (struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean);
/* PowerPC @tls opcode transform/validate. */
extern unsigned int _bfd_elf_ppc_at_tls_transform
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c
index 2ebbb79..2c24bdd 100644
--- a/bfd/elf32-arm.c
+++ b/bfd/elf32-arm.c
@@ -9215,6 +9215,8 @@ insert_cantunwind_after(asection *text_sec, asection *exidx_sec)
2. Duplicate entries are merged together (EXIDX_CANTUNWIND, or unwind
codes which have been inlined into the index).
+ If MERGE_EXIDX_ENTRIES is false, duplicate entries are not merged.
+
The edits are applied when the tables are written
(in elf32_arm_write_section).
*/
@@ -9222,7 +9224,8 @@ insert_cantunwind_after(asection *text_sec, asection *exidx_sec)
bfd_boolean
elf32_arm_fix_exidx_coverage (asection **text_section_order,
unsigned int num_text_sections,
- struct bfd_link_info *info)
+ struct bfd_link_info *info,
+ bfd_boolean merge_exidx_entries)
{
bfd *inp;
unsigned int last_second_word = 0, i;
@@ -9334,7 +9337,8 @@ elf32_arm_fix_exidx_coverage (asection **text_section_order,
/* Inlined unwinding data. Merge if equal to previous. */
else if ((second_word & 0x80000000) != 0)
{
- if (last_second_word == second_word && last_unwind_type == 1)
+ if (merge_exidx_entries
+ && last_second_word == second_word && last_unwind_type == 1)
elide = 1;
unwind_type = 1;
last_second_word = second_word;