summaryrefslogtreecommitdiff
path: root/gold/layout.h
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2009-12-31 03:48:46 +0000
committerIan Lance Taylor <ian@airs.com>2009-12-31 03:48:46 +0000
commitd7bb5745008bb111becc3dc87e7ce243f59b7170 (patch)
tree90278a6e9c9daca6652c0e8c90ddfc77ef9accee /gold/layout.h
parentfc59c57250878209dbcacd68712643d88b1c7adc (diff)
downloadbinutils-gdb-d7bb5745008bb111becc3dc87e7ce243f59b7170.tar.gz
PR 10979
* script.cc (read_input_script): If we see a new SECTIONS clause, and we have added an input section, give an error. * layout.h (class Layout): Add have_added_input_section function. Add have_added_input_section_ field. * layout.cc (Layout::Layout): Initialize have_added_input_section_. (Layout::layout): Set have_added_input_section_. (Layout::layout_eh_frame): Likewise.
Diffstat (limited to 'gold/layout.h')
-rw-r--r--gold/layout.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/gold/layout.h b/gold/layout.h
index 06060effda9..604f19b1fdf 100644
--- a/gold/layout.h
+++ b/gold/layout.h
@@ -433,6 +433,11 @@ class Layout
is_linkonce(const char* name)
{ return strncmp(name, ".gnu.linkonce", sizeof(".gnu.linkonce") - 1) == 0; }
+ // Whether we have added an input section.
+ bool
+ have_added_input_section() const
+ { return this->have_added_input_section_; }
+
// Return true if a section is a debugging section.
static inline bool
is_debug_info_section(const char* name)
@@ -990,6 +995,8 @@ class Layout
Group_signatures group_signatures_;
// The size of the output file.
off_t output_file_size_;
+ // Whether we have added an input section to an output section.
+ bool have_added_input_section_;
// Whether we have attached the sections to the segments.
bool sections_are_attached_;
// Whether we have seen an object file marked to require an