diff options
Diffstat (limited to 'binutils-2.22/gold/incremental-dump.cc')
-rw-r--r-- | binutils-2.22/gold/incremental-dump.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/binutils-2.22/gold/incremental-dump.cc b/binutils-2.22/gold/incremental-dump.cc index fb3d25f..5365265 100644 --- a/binutils-2.22/gold/incremental-dump.cc +++ b/binutils-2.22/gold/incremental-dump.cc @@ -52,6 +52,9 @@ find_input_containing_global( unsigned int* symndx) { typedef Incremental_inputs_reader<size, big_endian> Inputs_reader; + static const unsigned int global_sym_entry_size = + Incremental_inputs_reader<size, big_endian>::global_sym_entry_size; + for (unsigned int i = 0; i < incremental_inputs.input_file_count(); ++i) { typename Inputs_reader::Incremental_input_entry_reader input_file = @@ -63,7 +66,8 @@ find_input_containing_global( if (offset >= input_file.get_symbol_offset(0) && offset < input_file.get_symbol_offset(nsyms)) { - *symndx = (offset - input_file.get_symbol_offset(0)) / 20; + *symndx = ((offset - input_file.get_symbol_offset(0)) + / global_sym_entry_size); return input_file; } } @@ -92,7 +96,7 @@ dump_incremental_inputs(const char* argv0, const char* filename, Incremental_inputs_reader<size, big_endian> incremental_inputs(inc->inputs_reader()); - if (incremental_inputs.version() != 1) + if (incremental_inputs.version() != 2) { fprintf(stderr, "%s: %s: unknown incremental version %d\n", argv0, filename, incremental_inputs.version()); |