summaryrefslogtreecommitdiff
path: root/gold/gdb-index.cc
diff options
context:
space:
mode:
authorDavid S. Miller <davem@redhat.com>2012-04-17 02:10:39 +0000
committerDavid S. Miller <davem@redhat.com>2012-04-17 02:10:39 +0000
commit0bc964fc7982793fd7d54dd6017774db1a19e3c6 (patch)
tree82bdb11a2ee9d0d89950d39ca80ba12ba266d0a5 /gold/gdb-index.cc
parent661d7a80a2bcfc452a9355e6b474673ae48c61a8 (diff)
gold: Fix 64-bit sparc GOLD crash in gdb-index code.
gold/ * gdb-index.cc (Gdb_index::do_write): Use Swap_unaligned when writing out 64-bit part of ranges.
Diffstat (limited to 'gold/gdb-index.cc')
-rw-r--r--gold/gdb-index.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/gold/gdb-index.cc b/gold/gdb-index.cc
index 16e387180f..07ba2ab542 100644
--- a/gold/gdb-index.cc
+++ b/gold/gdb-index.cc
@@ -1166,8 +1166,8 @@ Gdb_index::do_write(Output_file* of)
base = (os->address()
+ object->output_section_offset(range.shndx));
}
- elfcpp::Swap<64, false>::writeval(pov, base + range.start);
- elfcpp::Swap<64, false>::writeval(pov + 8, base + range.end);
+ elfcpp::Swap_unaligned<64, false>::writeval(pov, base + range.start);
+ elfcpp::Swap_unaligned<64, false>::writeval(pov + 8, base + range.end);
elfcpp::Swap<32, false>::writeval(pov + 16, cu_index);
pov += 20;
}