[RFC][PATCH v12 4/8] Add DT_GNU_FLAGS_1/DF_GNU_1_UNIQUE to glibc DSOs (bug 22745)

H.J. Lu hjl.tools@gmail.com
Tue Aug 10 13:32:32 GMT 2021


On Tue, Aug 10, 2021 at 6:21 AM Adhemerval Zanella via Libc-alpha
<libc-alpha@sourceware.org> wrote:
>
> There are a couple of minor issues that prevent the -Wl,-z,unique usage.
> It does not change the build outcome because the the unique GNU_FLAGS_1
> will be added by elf/dynamic-notes.os anyway.
>
> > On 08/07/2021 13:32, Vivek Das Mohapatra via Libc-alpha wrote:
> >> diff --git a/config.make.in b/config.make.in
> >> index cbf59114b0..8755490c13 100644
> >> --- a/config.make.in
> >> +++ b/config.make.in
> >> @@ -72,6 +72,7 @@ have-cc-with-libunwind = @libc_cv_cc_with_libunwind@
> >>  fno-unit-at-a-time = @fno_unit_at_a_time@
> >>  bind-now = @bindnow@
> >>  have-hash-style = @libc_cv_hashstyle@
> >> +ld-zunique = @ld_zunique@

No need for this.  Please use LIBC_CONFIG_VAR.

> This is wrong, it should be '@libc_cv_ld_zunique@'
>
> >> diff --git a/configure.ac b/configure.ac
> >> index 34ecbba540..9369bcbebe 100644
> >> --- a/configure.ac
> >> +++ b/configure.ac
> >> @@ -1372,9 +1372,28 @@ fi
> >>  rm -f conftest*])
> >>  AC_SUBST(libc_cv_hashstyle)
> >>
> >> +AC_CACHE_CHECK([for linker DT_GNU_FLAGS_1/ DF_GNU_1_UNIQUE support],
> >
> > Maybe a space before ' /'.
> >
> >> +                libc_cv_ld_zunique, [dnl
> >> +cat > conftest.ld.c <<\EOF
> >> +int x (void) { return 0; }
> >> +EOF
> >> +
> >> +libc_cv_ld_zunique=no;
> >> +
> >> +if AC_TRY_COMMAND([dnl
> >> +${CC-cc} -Wl,--fatal-warnings -Wl,-z,unique -shared -o conftest.ld.so conftest.ld.c])
> >> +then
> >> +  libc_cv_ld_zunique=yes
> >> +fi;
> >> +ld_zunique=$libc_cv_ld_zunique
> >> +rm -f conftest*])
> >> +AC_SUBST(ld_zunique)
>
> This is wrong, it should be AC_SUBST(libc_cv_ld_zunique).



-- 
H.J.


More information about the Libc-alpha mailing list