mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-05 23:26:51 +08:00
PR 10450
* output.cc (Output_segment::Output_segment): If PT_TLS, set the flags to PF_R. (Output_segment::add_output_section): Don't change the flags if the type is PT_TLS.
This commit is contained in:
@ -1,5 +1,11 @@
|
|||||||
2009-12-30 Ian Lance Taylor <iant@google.com>
|
2009-12-30 Ian Lance Taylor <iant@google.com>
|
||||||
|
|
||||||
|
PR 10450
|
||||||
|
* output.cc (Output_segment::Output_segment): If PT_TLS, set the
|
||||||
|
flags to PF_R.
|
||||||
|
(Output_segment::add_output_section): Don't change the flags if
|
||||||
|
the type is PT_TLS.
|
||||||
|
|
||||||
PR 10450
|
PR 10450
|
||||||
* dynobj.cc (Dynobj::create_gnu_hash_table): Add symbols to the
|
* dynobj.cc (Dynobj::create_gnu_hash_table): Add symbols to the
|
||||||
GNU hash table if they need a dynamic value. Otherwise, don't add
|
GNU hash table if they need a dynamic value. Otherwise, don't add
|
||||||
|
@ -3063,6 +3063,10 @@ Output_segment::Output_segment(elfcpp::Elf_Word type, elfcpp::Elf_Word flags)
|
|||||||
are_addresses_set_(false),
|
are_addresses_set_(false),
|
||||||
is_large_data_segment_(false)
|
is_large_data_segment_(false)
|
||||||
{
|
{
|
||||||
|
// The ELF ABI specifies that a PT_TLS segment always has PF_R as
|
||||||
|
// the flags.
|
||||||
|
if (type == elfcpp::PT_TLS)
|
||||||
|
this->flags_ = elfcpp::PF_R;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add an Output_section to an Output_segment.
|
// Add an Output_section to an Output_segment.
|
||||||
@ -3077,8 +3081,11 @@ Output_segment::add_output_section(Output_section* os,
|
|||||||
gold_assert(os->is_large_data_section() == this->is_large_data_segment());
|
gold_assert(os->is_large_data_section() == this->is_large_data_segment());
|
||||||
gold_assert(this->type() == elfcpp::PT_LOAD || !do_sort);
|
gold_assert(this->type() == elfcpp::PT_LOAD || !do_sort);
|
||||||
|
|
||||||
// Update the segment flags.
|
// Update the segment flags. The ELF ABI specifies that a PT_TLS
|
||||||
this->flags_ |= seg_flags;
|
// segment should always have PF_R as the flags, regardless of the
|
||||||
|
// associated sections.
|
||||||
|
if (this->type() != elfcpp::PT_TLS)
|
||||||
|
this->flags_ |= seg_flags;
|
||||||
|
|
||||||
Output_segment::Output_data_list* pdl;
|
Output_segment::Output_data_list* pdl;
|
||||||
if (os->type() == elfcpp::SHT_NOBITS)
|
if (os->type() == elfcpp::SHT_NOBITS)
|
||||||
|
Reference in New Issue
Block a user