projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
opcodes/
[deliverable/binutils-gdb.git]
/
gold
/
incremental-dump.cc
diff --git
a/gold/incremental-dump.cc
b/gold/incremental-dump.cc
index a727eb5038437072e1618fe0c02df8750ff8b66c..53652655d04e9c3c3520b147b9c7c1a5d71e2a31 100644
(file)
--- a/
gold/incremental-dump.cc
+++ b/
gold/incremental-dump.cc
@@
-52,6
+52,9
@@
find_input_containing_global(
unsigned int* symndx)
{
typedef Incremental_inputs_reader<size, big_endian> Inputs_reader;
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 =
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))
{
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;
}
}
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());
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());
{
fprintf(stderr, "%s: %s: unknown incremental version %d\n", argv0,
filename, incremental_inputs.version());
@@
-153,6
+157,8
@@
dump_incremental_inputs(const char* argv0, const char* filename,
input_file.get_first_dyn_reloc());
printf(" Dynamic reloc count: %d\n",
input_file.get_dyn_reloc_count());
input_file.get_first_dyn_reloc());
printf(" Dynamic reloc count: %d\n",
input_file.get_dyn_reloc_count());
+ printf(" COMDAT group count: %d\n",
+ input_file.get_comdat_group_count());
break;
case INCREMENTAL_INPUT_ARCHIVE:
printf("Archive\n");
break;
case INCREMENTAL_INPUT_ARCHIVE:
printf("Archive\n");
@@
-212,6
+218,11
@@
dump_incremental_inputs(const char* argv0, const char* filename,
static_cast<long long>(info.sh_size),
info.name);
}
static_cast<long long>(info.sh_size),
info.name);
}
+
+ unsigned int ncomdat = input_file.get_comdat_group_count();
+ for (unsigned int i = 0; i < ncomdat; ++i)
+ printf(" Comdat group: %s\n",
+ input_file.get_comdat_group_signature(i));
}
// Get a view of the .symtab section.
}
// Get a view of the .symtab section.
@@
-286,8
+297,9
@@
dump_incremental_inputs(const char* argv0, const char* filename,
for (unsigned int symndx = 0; symndx < nsyms; ++symndx)
{
bool is_def;
for (unsigned int symndx = 0; symndx < nsyms; ++symndx)
{
bool is_def;
+ bool is_copy;
unsigned int output_symndx =
unsigned int output_symndx =
- input_file.get_output_symbol_index(symndx, &is_def);
+ input_file.get_output_symbol_index(symndx, &is_def
, &is_copy
);
sym_p = symtab_view.data() + output_symndx * sym_size;
elfcpp::Sym<size, big_endian> sym(sym_p);
const char* symname;
sym_p = symtab_view.data() + output_symndx * sym_size;
elfcpp::Sym<size, big_endian> sym(sym_p);
const char* symname;
@@
-296,7
+308,7
@@
dump_incremental_inputs(const char* argv0, const char* filename,
printf(" %6d %6s %8s %8s %8s %8s %-5s %s\n",
output_symndx,
"", "", "", "", "",
printf(" %6d %6s %8s %8s %8s %8s %-5s %s\n",
output_symndx,
"", "", "", "", "",
- is_
def ? "DEF" : "UNDEF"
,
+ is_
copy ? "COPY" : (is_def ? "DEF" : "UNDEF")
,
symname);
}
}
symname);
}
}
@@
-314,12
+326,14
@@
dump_incremental_inputs(const char* argv0, const char* filename,
symname = "<unknown>";
printf(" %6d %6d %8d %8d %8d %8d %-5s %s\n",
output_symndx,
symname = "<unknown>";
printf(" %6d %6d %8d %8d %8d %8d %-5s %s\n",
output_symndx,
- info.shndx(),
+ info.shndx()
== -1U ? -1 : info.shndx()
,
input_file.get_symbol_offset(symndx),
info.next_offset(),
info.reloc_count(),
info.reloc_offset(),
input_file.get_symbol_offset(symndx),
info.next_offset(),
info.reloc_count(),
info.reloc_offset(),
- info.shndx() != elfcpp::SHN_UNDEF ? "DEF" : "UNDEF",
+ (info.shndx() == -1U
+ ? "BASE"
+ : info.shndx() == 0 ? "UNDEF" : "DEF"),
symname);
}
}
symname);
}
}
This page took
0.024229 seconds
and
4
git commands to generate.