is_static() const
{ return this->is_static_; }
- // --statis: Print resource usage statistics.
+ // --stats: Print resource usage statistics.
bool
print_stats() const
{ return this->print_stats_; }
sysroot() const
{ return this->sysroot_; }
+ // -Ttext: The address of the .text section
+ uint64_t
+ text_segment_address() const
+ { return this->text_segment_address_; }
+
+ // Whether -Ttext was used.
+ bool
+ user_set_text_segment_address() const
+ { return this->text_segment_address_ != -1U; }
+
private:
// Don't copy this structure.
General_options(const General_options&);
set_sysroot(const char* arg)
{ this->sysroot_ = arg; }
+ void
+ set_text_segment_address(const char* arg)
+ {
+ char* endptr;
+ this->text_segment_address_ = strtoull(arg, &endptr, 0);
+ if (*endptr != '\0'
+ || this->text_segment_address_ == -1U)
+ {
+ fprintf(stderr, _("%s: invalid argument to -Ttext: %s\n"),
+ program_name, arg);
+ ::exit(1);
+ }
+ }
+
void
ignore(const char*)
{ }
bool is_static_;
bool print_stats_;
std::string sysroot_;
+ uint64_t text_segment_address_;
};
// The current state of the position dependent options.