mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-27 03:54:41 +08:00
2008-09-11 Chris Demetriou <cgd@google.com>
* options.h (origin): New -z option. * layout.cc (Layout:finish_dynamic_section): If "-z origin" is specified, set DF_ORIGIN in DT_FLAGS and set DF_1_ORIGIN in DT_FLAGS_1.
This commit is contained in:
parent
d140ac6b03
commit
7be8330a59
@ -1,3 +1,10 @@
|
|||||||
|
2008-09-11 Chris Demetriou <cgd@google.com>
|
||||||
|
|
||||||
|
* options.h (origin): New -z option.
|
||||||
|
* layout.cc (Layout:finish_dynamic_section): If "-z origin"
|
||||||
|
is specified, set DF_ORIGIN in DT_FLAGS and set DF_1_ORIGIN
|
||||||
|
in DT_FLAGS_1.
|
||||||
|
|
||||||
2008-09-05 Cary Coutant <ccoutant@google.com>
|
2008-09-05 Cary Coutant <ccoutant@google.com>
|
||||||
|
|
||||||
* fileread.cc (File_read::make_view): Add check for attempt to map
|
* fileread.cc (File_read::make_view): Add check for attempt to map
|
||||||
|
@ -2753,6 +2753,8 @@ Layout::finish_dynamic_section(const Input_objects* input_objects,
|
|||||||
}
|
}
|
||||||
if (parameters->options().shared() && this->has_static_tls())
|
if (parameters->options().shared() && this->has_static_tls())
|
||||||
flags |= elfcpp::DF_STATIC_TLS;
|
flags |= elfcpp::DF_STATIC_TLS;
|
||||||
|
if (parameters->options().origin())
|
||||||
|
flags |= elfcpp::DF_ORIGIN;
|
||||||
odyn->add_constant(elfcpp::DT_FLAGS, flags);
|
odyn->add_constant(elfcpp::DT_FLAGS, flags);
|
||||||
|
|
||||||
flags = 0;
|
flags = 0;
|
||||||
@ -2774,6 +2776,8 @@ Layout::finish_dynamic_section(const Input_objects* input_objects,
|
|||||||
flags &= ~(elfcpp::DF_1_INITFIRST
|
flags &= ~(elfcpp::DF_1_INITFIRST
|
||||||
| elfcpp::DF_1_NODELETE
|
| elfcpp::DF_1_NODELETE
|
||||||
| elfcpp::DF_1_NOOPEN);
|
| elfcpp::DF_1_NOOPEN);
|
||||||
|
if (parameters->options().origin())
|
||||||
|
flags |= elfcpp::DF_1_ORIGIN;
|
||||||
if (flags)
|
if (flags)
|
||||||
odyn->add_constant(elfcpp::DT_FLAGS_1, flags);
|
odyn->add_constant(elfcpp::DT_FLAGS_1, flags);
|
||||||
}
|
}
|
||||||
|
@ -837,6 +837,9 @@ class General_options
|
|||||||
DEFINE_bool(relro, options::DASH_Z, '\0', false,
|
DEFINE_bool(relro, options::DASH_Z, '\0', false,
|
||||||
N_("Where possible mark variables read-only after relocation"),
|
N_("Where possible mark variables read-only after relocation"),
|
||||||
N_("Don't mark variables read-only after relocation"));
|
N_("Don't mark variables read-only after relocation"));
|
||||||
|
DEFINE_bool(origin, options::DASH_Z, '\0', false,
|
||||||
|
N_("Mark DSO to indicate that needs immediate $ORIGIN "
|
||||||
|
"processing at runtime"), NULL);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef options::Dir_list Dir_list;
|
typedef options::Dir_list Dir_list;
|
||||||
|
Loading…
Reference in New Issue
Block a user