[PATCH][GOLD] Fix two bugs in arm.cc
Doug Kwan (關振德)
dougkwan@google.com
Mon Mar 8 22:04:00 GMT 2010
Hi,
This patch fixes two bugs in arm.cc. The first is a build
breakage due to conversion from -1 to unsigned type. The second
problem is in the check for discarded local symbol. The patch was
tested on an ARM Linux system and all tests passed.
-Doug
010-03-08 Doug Kwan <dougkwan@google.com>
* gold/arm.cc (Arm_exidx_fixup::update_offset_map): Fix build breakage
due to a conversion warning.
(Arm_relobj::update_output_local_symbol_count): Check for local
symbol with unset output index.
-------------- next part --------------
Index: gold/arm.cc
===================================================================
RCS file: /cvs/src/src/gold/arm.cc,v
retrieving revision 1.91
diff -u -u -p -r1.91 arm.cc
--- gold/arm.cc 3 Mar 2010 19:31:54 -0000 1.91
+++ gold/arm.cc 8 Mar 2010 21:21:22 -0000
@@ -5194,9 +5194,10 @@ Arm_exidx_fixup::update_offset_map(
{
if (this->section_offset_map_ == NULL)
this->section_offset_map_ = new Arm_exidx_section_offset_map();
- section_offset_type output_offset = (delete_entry
- ? -1
- : input_offset - deleted_bytes);
+ section_offset_type output_offset =
+ (delete_entry
+ ? Arm_exidx_input_section::invalid_offset
+ : input_offset - deleted_bytes);
(*this->section_offset_map_)[input_offset] = output_offset;
}
@@ -6506,7 +6507,7 @@ Arm_relobj<big_endian>::update_output_lo
Symbol_value<32>& lv((*this->local_values())[i]);
// This local symbol was already discarded by do_count_local_symbols.
- if (!lv.is_output_symtab_index_set())
+ if (lv.is_output_symtab_index_set() && !lv.has_output_symtab_entry())
continue;
bool is_ordinary;
More information about the Binutils
mailing list