This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH 4/5] Solaris2/LD: Fix anonymous version script acceptance bug
- From: Alan Modra <amodra at gmail dot com>
- To: "Maciej W. Rozycki" <macro at imgtec dot com>
- Cc: Nick Clifton <nickc at redhat dot com>, Tristan Gingold <gingold at adacore dot com>, James Cowgill <James dot Cowgill at imgtec dot com>, "Maciej W. Rozycki" <macro at linux-mips dot org>, binutils at sourceware dot org
- Date: Tue, 24 Jan 2017 11:26:25 +1030
- Subject: Re: [PATCH 4/5] Solaris2/LD: Fix anonymous version script acceptance bug
- Authentication-results: sourceware.org; auth=none
- References: <bug-20828-70@http.sourceware.org/bugzilla/> <bug-20828-70-QMcZ2LkAaY@http.sourceware.org/bugzilla/> <e6ca2026-eead-8e4a-b99b-dba27c41ac0d@redhat.com> <alpine.DEB.2.00.1701191811170.6936@tp.orcam.me.uk> <alpine.DEB.2.00.1701202112480.6936@tp.orcam.me.uk> <alpine.DEB.2.00.1701221451170.13564@tp.orcam.me.uk>
On Mon, Jan 23, 2017 at 11:37:19AM +0000, Maciej W. Rozycki wrote:
> * emultempl/solaris2.em (elf_solaris2_before_allocation): Do not
> add implicit version nodes if any existing version information
> has no name.
OK, but suggest you change the above to "..nodes if anonymous version
tag is being used". "any existing version information has no name"
implies a search over all tags to me (which of course isn't needed due
to the restriction in lang_register_vers_node).
> ---
> No regressions in `x86_64-solaris2' testing, OK to apply and backport to
> 2.28?
>
> Maciej
>
> binutils-solaris2-ld-register-vers-node.diff
> Index: binutils/ld/emultempl/solaris2.em
> ===================================================================
> --- binutils.orig/ld/emultempl/solaris2.em 2017-01-16 19:12:50.000000000 +0000
> +++ binutils/ld/emultempl/solaris2.em 2017-01-20 14:02:15.617924483 +0000
> @@ -76,7 +76,8 @@ elf_solaris2_before_allocation (void)
>
> /* Only do this if emitting a shared object and versioning is in place. */
> if (bfd_link_dll (&link_info)
> - && (link_info.version_info != NULL
> + && ((link_info.version_info != NULL
> + && link_info.version_info->name[0] != '\0')
> || link_info.create_default_symver))
> {
> struct bfd_elf_version_expr *globals = NULL, *locals = NULL;
--
Alan Modra
Australia Development Lab, IBM