aboutsummaryrefslogtreecommitdiff
path: root/gold/output.h
diff options
context:
space:
mode:
authorRoland McGrath <mcgrathr@google.com>2016-08-23 16:43:33 -0700
committerRoland McGrath <mcgrathr@google.com>2016-08-23 17:15:53 -0700
commit1130c90ed7c8d1bc7b70c701b62cdbc23ac9fc01 (patch)
tree3f6a853a52a853553a008e273183dbb233613291 /gold/output.h
parent4ba25152ff03e835bbbb2512ea71b7fefe3b7e89 (diff)
downloadbinutils-1130c90ed7c8d1bc7b70c701b62cdbc23ac9fc01.zip
binutils-1130c90ed7c8d1bc7b70c701b62cdbc23ac9fc01.tar.gz
binutils-1130c90ed7c8d1bc7b70c701b62cdbc23ac9fc01.tar.bz2
[gold] Implement -z stack-size option
gold/ * options.h (General_options): Grok -z stack-size. * output.h (Output_segment::set_size): New method. * layout.cc (Layout::create_executable_stack_info): Renamed to ... (Layout::create_stack_segment): ... this. Always create the segment if -z stack-size was used. (Layout::set_segment_offsets): Don't call ->set_offset on the PT_GNU_STACK segment.
Diffstat (limited to 'gold/output.h')
-rw-r--r--gold/output.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/gold/output.h b/gold/output.h
index d8a8aaa..6b9186b 100644
--- a/gold/output.h
+++ b/gold/output.h
@@ -2499,7 +2499,7 @@ class Output_data_got : public Output_data_got_base
// entry.
bool
add_local(Relobj* object, unsigned int sym_index, unsigned int got_type,
- uint64_t addend);
+ uint64_t addend);
// Like add_local, but use the PLT offset of the local symbol if it
// has one.
@@ -2643,7 +2643,7 @@ class Output_data_got : public Output_data_got_base
// Create a local symbol entry plus addend.
Got_entry(Relobj* object, unsigned int local_sym_index,
- bool use_plt_or_tls_offset, uint64_t addend)
+ bool use_plt_or_tls_offset, uint64_t addend)
: local_sym_index_(local_sym_index),
use_plt_or_tls_offset_(use_plt_or_tls_offset), addend_(addend)
{
@@ -4796,6 +4796,13 @@ class Output_segment
this->min_p_align_ = align;
}
+ // Set the memory size of this segment.
+ void
+ set_size(uint64_t size)
+ {
+ this->memsz_ = size;
+ }
+
// Set the offset of this segment based on the section. This should
// only be called for a non-PT_LOAD segment.
void