aboutsummaryrefslogtreecommitdiff
path: root/gold/layout.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2011-06-18 22:53:23 +0000
committerIan Lance Taylor <ian@airs.com>2011-06-18 22:53:23 +0000
commit766f91bb8935561d61b89b67bc90320f24ce8d95 (patch)
tree333f05c20825899e0b95a18bf16dab860371e38e /gold/layout.cc
parent0d212c3a03ea54828ee620dcdb74294af2f43504 (diff)
downloadgdb-766f91bb8935561d61b89b67bc90320f24ce8d95.zip
gdb-766f91bb8935561d61b89b67bc90320f24ce8d95.tar.gz
gdb-766f91bb8935561d61b89b67bc90320f24ce8d95.tar.bz2
* layout.cc (Layout::finish_dynamic_section): Don't set DT_TEXTREL
merely because a non-PT_LOAD segment has a dynamic reloc.
Diffstat (limited to 'gold/layout.cc')
-rw-r--r--gold/layout.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/gold/layout.cc b/gold/layout.cc
index f74c626..6e69a92 100644
--- a/gold/layout.cc
+++ b/gold/layout.cc
@@ -4107,7 +4107,8 @@ Layout::finish_dynamic_section(const Input_objects* input_objects,
p != this->segment_list_.end();
++p)
{
- if (((*p)->flags() & elfcpp::PF_W) == 0
+ if ((*p)->type() == elfcpp::PT_LOAD
+ && ((*p)->flags() & elfcpp::PF_W) == 0
&& (*p)->has_dynamic_reloc())
{
have_textrel = true;
@@ -4127,7 +4128,7 @@ Layout::finish_dynamic_section(const Input_objects* input_objects,
{
if (((*p)->flags() & elfcpp::SHF_ALLOC) != 0
&& ((*p)->flags() & elfcpp::SHF_WRITE) == 0
- && ((*p)->has_dynamic_reloc()))
+ && (*p)->has_dynamic_reloc())
{
have_textrel = true;
break;