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 --export-dynamic-symbol option


Cary Coutant <ccoutant@google.com> writes:

> 2012-04-12  Cary Coutant  <ccoutant@google.com>
>
> 	* archive.cc (Library_base::should_include_member): Check for
> 	--export-dynamic-symbol.
> 	* options.h (class General_options): Add --export-dynamic-symbol.
> 	* symtab.cc (Symbol::should_add_dynsym_entry): Check for
> 	--export-dynamic-symbol.
> 	(Symbol_table::gc_mark_undef_symbols): Likewise.
> 	(Symbol_table::do_add_undefined_symbols_from_command_line): Likewise.


> +  // If the symbol was forced dynamic in a --dynamic-list file
> +  // or an --export-dynamic-symbol option, add it.
> +  if (parameters->options().in_dynamic_list(this->name())
> +      || parameters->options().is_export_dynamic_symbol(this->name()))
> +    {
> +      if (!this->is_forced_local())
> +        return true;
> +      gold_warning(_("Cannot export local symbol '%s'"),
> +		   this->demangled_name().c_str());
> +      return false;
> +    }

Gold warnings start with lower case letters, so s/Cannot/cannot/.

I wonder if it's really appropriate to call demangled_name here.  The
symbol names in --dynamic-list or --export-dynamic-symbol are not
mangled.  It will probably be clearer to simply print this->name().


This is OK with those changes.

Thanks.

Ian


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