This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [gold patch RFC] implement suppotr for -z origin


"Chris Demetriou" <cgd@google.com> writes:

> 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_1_ORIGIN in DT_FLAGS_1, and if
>        --enable-new-dtags was also specified set DF_ORIGIN in DT_FLAGS.



> Index: layout.cc
> ===================================================================
> RCS file: /cvs/src/src/gold/layout.cc,v
> retrieving revision 1.112
> diff -u -u -p -r1.112 layout.cc
> --- layout.cc	13 Aug 2008 07:37:46 -0000	1.112
> +++ layout.cc	12 Sep 2008 05:02:04 -0000
> @@ -2753,6 +2753,9 @@ Layout::finish_dynamic_section(const Inp
>      }
>    if (parameters->options().shared() && this->has_static_tls())
>      flags |= elfcpp::DF_STATIC_TLS;
> +  if (parameters->options().origin()
> +      && parameters->options().enable_new_dtags())
> +    flags |= elfcpp::DF_ORIGIN;
>    odyn->add_constant(elfcpp::DT_FLAGS, flags);

Don't check enable_new_dtags.  That only controls whether gold emits
DT_RUNPATH as well as DT_RPATH.  The name is terrible, but it came
from GNU ld.  It's true that GNU ld uses --enable-new-dtags to control
whether to emit some other flags, but that really makes no sense.

OK with that change.

Thanks.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]