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] Add .{fini,init,preinit}_array and add DT_BSYMBOLIC tags as needed.


"Doug Kwan (éæå)" <dougkwan@google.com> writes:

> 2009-10-15  Doug Kwan  <dougkwan@google.com>
>
>         * layout.cc (Layout::finish_dynamic_section): Generate tags
>         DT_FINI_ARRAY, DT_FINI_ARRAYSZ, DT_INIT_ARRAY, DT_INIT_ARRAYSZ,
>         DT_PREINIT_ARRAY, DT_PREINIT_ARRAYSZ and DT_BSYMBOLIC as needed.


> @@ -3186,6 +3207,8 @@ Layout::finish_dynamic_section(const Inp
>      flags |= elfcpp::DF_STATIC_TLS;
>    if (parameters->options().origin())
>      flags |= elfcpp::DF_ORIGIN;
> +  if (parameters->options().Bsymbolic())
> +    flags |= elfcpp::DF_SYMBOLIC;
>    if (parameters->options().now())
>      flags |= elfcpp::DF_BIND_NOW;
>    odyn->add_constant(elfcpp::DT_FLAGS, flags);

Besides setting DF_SYMBOLIC in flags, please also do
    // Add DT_SYMBOLIC for compatibility with older loaders.
    odyn->add_constant(elfcpp::DT_SYMBOLIC, 0);
as we do for DT_TEXTREL.

This is 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]