gold/
* script-sections.cc (Orphan_output_section): Reset address to zero after each orphaned section for relocatable links.
This commit is contained in:
parent
502e8a8430
commit
2199fbe773
2 changed files with 15 additions and 4 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2013-04-15 Cary Coutant <ccoutant@google.com>
|
||||||
|
|
||||||
|
* script-sections.cc (Orphan_output_section): Reset address
|
||||||
|
to zero after each orphaned section for relocatable links.
|
||||||
|
|
||||||
2013-04-15 Cary Coutant <ccoutant@google.com>
|
2013-04-15 Cary Coutant <ccoutant@google.com>
|
||||||
|
|
||||||
* symtab.cc (Symbol_table::sized_write_globals): Subtract
|
* symtab.cc (Symbol_table::sized_write_globals): Subtract
|
||||||
|
|
|
@ -2918,11 +2918,17 @@ Orphan_output_section::set_section_addresses(Symbol_table*, Layout*,
|
||||||
address += size;
|
address += size;
|
||||||
}
|
}
|
||||||
|
|
||||||
// An SHF_TLS/SHT_NOBITS section does not take up any address space.
|
if (parameters->options().relocatable())
|
||||||
if (this->os_ == NULL
|
|
||||||
|| (this->os_->flags() & elfcpp::SHF_TLS) == 0
|
|
||||||
|| this->os_->type() != elfcpp::SHT_NOBITS)
|
|
||||||
{
|
{
|
||||||
|
// For a relocatable link, reset DOT_VALUE to 0.
|
||||||
|
*dot_value = 0;
|
||||||
|
*load_address = 0;
|
||||||
|
}
|
||||||
|
else if (this->os_ == NULL
|
||||||
|
|| (this->os_->flags() & elfcpp::SHF_TLS) == 0
|
||||||
|
|| this->os_->type() != elfcpp::SHT_NOBITS)
|
||||||
|
{
|
||||||
|
// An SHF_TLS/SHT_NOBITS section does not take up any address space.
|
||||||
if (!have_load_address)
|
if (!have_load_address)
|
||||||
*load_address = address;
|
*load_address = address;
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue