This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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: [PATCH][BZ #15337] Fix static build when configured with --disable-hidden-plt


On 04/04/2013 12:08 AM, Siddhesh Poyarekar wrote:
> Hi,
> 
> Static builds fail with the following warning:
> 
> /home/tools/glibc/glibc/nptl/../nptl/sysdeps/unix/sysv/linux/x86_64/cancellation.S:80:
> undefined reference to `__GI___pthread_unwind'
> 
> When the source is configured with --disable-hidden-plt.  This is
> because the preprocessor conditional in cancellation.S only checks if
> the build is for SHARED, whereas hidden_def is defined appropriately
> only for a SHARED build that will have symbol versioning *and* hidden
> defs are enabled.  The last case is false here.
> 
> Attached patch matches up the condition with that in libc-symbols.h.
> Tested x86_64 and x86_64 static builds to verify that this works fine.
> OK to commit?
> 
> 	[BZ #15337]
> 	* nptl/sysdeps/unix/sysv/linux/x86_64/cancellation.S
> 	[IS_IN_libpthread]
> 	[SHARED && defined DO_VERSIONING && !defined NO_HIDDEN]: Mark
> 	__pthread_unwind hidden.
> 
> diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/cancellation.S b/nptl/sysdeps/unix/sysv/linux/x86_64/cancellation.S
> index b284572..2cc84c1 100644
> --- a/nptl/sysdeps/unix/sysv/linux/x86_64/cancellation.S
> +++ b/nptl/sysdeps/unix/sysv/linux/x86_64/cancellation.S
> @@ -22,7 +22,7 @@
>  #include "lowlevellock.h"
>  
>  #ifdef IS_IN_libpthread
> -# ifdef SHARED
> +# if defined SHARED && defined DO_VERSIONING && !defined NO_HIDDEN
>  #  define __pthread_unwind __GI___pthread_unwind
>  # endif
>  #else

Looks good to me.

Cheers,
Carlos.


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