projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[AARCH64] Positively emit symbols for alignment
[deliverable/binutils-gdb.git]
/
gold
/
reduced_debug_output.cc
diff --git
a/gold/reduced_debug_output.cc
b/gold/reduced_debug_output.cc
index d2b0e3d0ab0a739816af65bf5e1a1d4041378c4f..d182870c70711dfe3e60d95de80e2ebb72feb83b 100644
(file)
--- a/
gold/reduced_debug_output.cc
+++ b/
gold/reduced_debug_output.cc
@@
-1,6
+1,6
@@
// reduced_debug_output.cc -- output reduced debugging information to save space
// reduced_debug_output.cc -- output reduced debugging information to save space
-// Copyright
2008, 2009
Free Software Foundation, Inc.
+// Copyright
(C) 2008-2015
Free Software Foundation, Inc.
// Written by Caleb Howe <cshowe@google.com>.
// This file is part of gold.
// Written by Caleb Howe <cshowe@google.com>.
// This file is part of gold.
@@
-60,9
+60,10
@@
Output_reduced_debug_info_section::get_die_end(
return false;
switch(form)
{
return false;
switch(form)
{
- case elfcpp::DW_FORM_
null
:
+ case elfcpp::DW_FORM_
flag_present
:
break;
case elfcpp::DW_FORM_strp:
break;
case elfcpp::DW_FORM_strp:
+ case elfcpp::DW_FORM_sec_offset:
die += is64 ? 8 : 4;
break;
case elfcpp::DW_FORM_addr:
die += is64 ? 8 : 4;
break;
case elfcpp::DW_FORM_addr:
@@
-88,6
+89,7
@@
Output_reduced_debug_info_section::get_die_end(
break;
}
case elfcpp::DW_FORM_block:
break;
}
case elfcpp::DW_FORM_block:
+ case elfcpp::DW_FORM_exprloc:
LEB_decoded = read_unsigned_LEB_128(die, &LEB_size);
die += (LEB_decoded + LEB_size);
break;
LEB_decoded = read_unsigned_LEB_128(die, &LEB_size);
die += (LEB_decoded + LEB_size);
break;
@@
-106,6
+108,7
@@
Output_reduced_debug_info_section::get_die_end(
break;
case elfcpp::DW_FORM_data8:
case elfcpp::DW_FORM_ref8:
break;
case elfcpp::DW_FORM_data8:
case elfcpp::DW_FORM_ref8:
+ case elfcpp::DW_FORM_ref_sig8:
die += 8;
break;
case elfcpp::DW_FORM_ref_udata:
die += 8;
break;
case elfcpp::DW_FORM_ref_udata:
@@
-113,14
+116,20
@@
Output_reduced_debug_info_section::get_die_end(
read_unsigned_LEB_128(die, &LEB_size);
die += LEB_size;
break;
read_unsigned_LEB_128(die, &LEB_size);
die += LEB_size;
break;
+ case elfcpp::DW_FORM_sdata:
+ read_signed_LEB_128(die, &LEB_size);
+ die += LEB_size;
+ break;
case elfcpp::DW_FORM_string:
{
size_t length = strlen(reinterpret_cast<char*>(die));
die += length + 1;
break;
}
case elfcpp::DW_FORM_string:
{
size_t length = strlen(reinterpret_cast<char*>(die));
die += length + 1;
break;
}
- case elfcpp::DW_FORM_sdata:
case elfcpp::DW_FORM_indirect:
case elfcpp::DW_FORM_indirect:
+ case elfcpp::DW_FORM_GNU_addr_index:
+ case elfcpp::DW_FORM_GNU_str_index:
+ default:
return false;
}
}
return false;
}
}
@@
-154,20
+163,20
@@
Output_reduced_debug_abbrev_section::set_final_data_size()
abbrev_data += LEB_size;
// Together with the abbreviation number these fields make up
abbrev_data += LEB_size;
// Together with the abbreviation number these fields make up
- // the header for each abbreviation
+ // the header for each abbreviation
.
uint64_t abbrev_type = read_unsigned_LEB_128(abbrev_data, &LEB_size);
abbrev_data += LEB_size;
// This would ordinarily be the has_children field of the
uint64_t abbrev_type = read_unsigned_LEB_128(abbrev_data, &LEB_size);
abbrev_data += LEB_size;
// This would ordinarily be the has_children field of the
- // abbreviation. But it's going to be false after reduc
t
ing the
- // information, so there's no point in storing it
+ // abbreviation. But it's going to be false after reducing the
+ // information, so there's no point in storing it
.
abbrev_data++;
abbrev_data++;
- // Read to the end of the current abbreviation
+ // Read to the end of the current abbreviation
.
// This is indicated by two zero unsigned LEBs in a row. We don't
// need to parse the data yet, so we just scan through the data
// looking for two consecutive 0 bytes indicating the end of the
// This is indicated by two zero unsigned LEBs in a row. We don't
// need to parse the data yet, so we just scan through the data
// looking for two consecutive 0 bytes indicating the end of the
- // abbreviation
+ // abbreviation
.
unsigned char* current_abbrev;
for (current_abbrev = abbrev_data;
current_abbrev[0] || current_abbrev[1];
unsigned char* current_abbrev;
for (current_abbrev = abbrev_data;
current_abbrev[0] || current_abbrev[1];
@@
-213,15
+222,15
@@
Output_reduced_debug_abbrev_section::set_final_data_size()
void
Output_reduced_debug_abbrev_section::do_write(Output_file* of)
{
void
Output_reduced_debug_abbrev_section::do_write(Output_file* of)
{
- off_t off = this->offset();
- off_t datasize = this->data_size();
- unsigned char* view = of->get_output_view(off
, data
size);
+ off_t off
set
= this->offset();
+ off_t data
_
size = this->data_size();
+ unsigned char* view = of->get_output_view(off
set, data_
size);
if (this->failed_)
memcpy(view, this->postprocessing_buffer(),
this->postprocessing_buffer_size());
else
if (this->failed_)
memcpy(view, this->postprocessing_buffer(),
this->postprocessing_buffer_size());
else
- memcpy(view, &this->data_.front(), datasize);
- of->write_output_view(off
, data
size, view);
+ memcpy(view, &this->data_.front(), data
_
size);
+ of->write_output_view(off
set, data_
size, view);
}
// Locates the abbreviation with abbreviation_number abbrev_number in the
}
// Locates the abbreviation with abbreviation_number abbrev_number in the
@@
-353,15
+362,15
@@
void Output_reduced_debug_info_section::set_final_data_size()
void Output_reduced_debug_info_section::do_write(Output_file* of)
{
void Output_reduced_debug_info_section::do_write(Output_file* of)
{
- off_t off = this->offset();
- off_t datasize = this->data_size();
- unsigned char* view = of->get_output_view(off
, data
size);
+ off_t off
set
= this->offset();
+ off_t data
_
size = this->data_size();
+ unsigned char* view = of->get_output_view(off
set, data_
size);
if (this->failed_)
memcpy(view, this->postprocessing_buffer(),
this->postprocessing_buffer_size());
else
if (this->failed_)
memcpy(view, this->postprocessing_buffer(),
this->postprocessing_buffer_size());
else
- memcpy(view, &this->data_.front(), datasize);
- of->write_output_view(off
, data
size, view);
+ memcpy(view, &this->data_.front(), data
_
size);
+ of->write_output_view(off
set, data_
size, view);
}
} // End namespace gold.
}
} // End namespace gold.
This page took
0.025318 seconds
and
4
git commands to generate.