diff options
author | David S. Miller <davem@redhat.com> | 2008-04-03 04:18:53 +0000 |
---|---|---|
committer | David S. Miller <davem@redhat.com> | 2008-04-03 04:18:53 +0000 |
commit | deae2a14a03a8cae07817ae03e4517fe4983d94e (patch) | |
tree | 38995c0a14706c507a597588d1672252f5624f58 | |
parent | 70752818b006aa0a0758f076f7a0a24288e37676 (diff) | |
download | fsf-binutils-gdb-deae2a14a03a8cae07817ae03e4517fe4983d94e.zip fsf-binutils-gdb-deae2a14a03a8cae07817ae03e4517fe4983d94e.tar.gz fsf-binutils-gdb-deae2a14a03a8cae07817ae03e4517fe4983d94e.tar.bz2 |
* dwarf_reader.cc (Sized_dwarf_line_info::read_header_prolog,
Sized_dwarf_line_info::process_one_opcode): Use Swap_unaligned.
-rw-r--r-- | gold/ChangeLog | 5 | ||||
-rw-r--r-- | gold/dwarf_reader.cc | 14 |
2 files changed, 12 insertions, 7 deletions
diff --git a/gold/ChangeLog b/gold/ChangeLog index 5bdf106..53b055f 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,8 @@ +2008-04-02 David S. Miller <davem@davemloft.net> + + * dwarf_reader.cc (Sized_dwarf_line_info::read_header_prolog, + Sized_dwarf_line_info::process_one_opcode): Use Swap_unaligned. + 2008-04-02 Craig Silverstein <csilvers@google.com> * TODO: New file. diff --git a/gold/dwarf_reader.cc b/gold/dwarf_reader.cc index 7ce6c7e..e345ff8 100644 --- a/gold/dwarf_reader.cc +++ b/gold/dwarf_reader.cc @@ -185,7 +185,7 @@ const unsigned char* Sized_dwarf_line_info<size, big_endian>::read_header_prolog( const unsigned char* lineptr) { - uint32_t initial_length = elfcpp::Swap<32, big_endian>::readval(lineptr); + uint32_t initial_length = elfcpp::Swap_unaligned<32, big_endian>::readval(lineptr); lineptr += 4; // In DWARF2/3, if the initial length is all 1 bits, then the offset @@ -193,7 +193,7 @@ Sized_dwarf_line_info<size, big_endian>::read_header_prolog( if (initial_length == 0xffffffff) { header_.offset_size = 8; - initial_length = elfcpp::Swap<64, big_endian>::readval(lineptr); + initial_length = elfcpp::Swap_unaligned<64, big_endian>::readval(lineptr); lineptr += 8; } else @@ -203,13 +203,13 @@ Sized_dwarf_line_info<size, big_endian>::read_header_prolog( gold_assert(lineptr + header_.total_length <= buffer_end_); - header_.version = elfcpp::Swap<16, big_endian>::readval(lineptr); + header_.version = elfcpp::Swap_unaligned<16, big_endian>::readval(lineptr); lineptr += 2; if (header_.offset_size == 4) - header_.prologue_length = elfcpp::Swap<32, big_endian>::readval(lineptr); + header_.prologue_length = elfcpp::Swap_unaligned<32, big_endian>::readval(lineptr); else - header_.prologue_length = elfcpp::Swap<64, big_endian>::readval(lineptr); + header_.prologue_length = elfcpp::Swap_unaligned<64, big_endian>::readval(lineptr); lineptr += header_.offset_size; header_.min_insn_length = *lineptr; @@ -394,7 +394,7 @@ Sized_dwarf_line_info<size, big_endian>::process_one_opcode( case elfcpp::DW_LNS_fixed_advance_pc: { int advance_address; - advance_address = elfcpp::Swap<16, big_endian>::readval(start); + advance_address = elfcpp::Swap_unaligned<16, big_endian>::readval(start); oplen += 2; lsm->address += advance_address; } @@ -432,7 +432,7 @@ Sized_dwarf_line_info<size, big_endian>::process_one_opcode( case elfcpp::DW_LNE_set_address: { - lsm->address = elfcpp::Swap<size, big_endian>::readval(start); + lsm->address = elfcpp::Swap_unaligned<size, big_endian>::readval(start); typename Reloc_map::const_iterator it = reloc_map_.find(start - this->buffer_); if (it != reloc_map_.end()) |