* [Bug libc/17841] Build failure if compiler defaults to PIE
2015-01-14 16:39 [Bug libc/17841] New: Build failure if compiler defaults to PIE hjl.tools at gmail dot com
@ 2015-03-02 11:08 ` schwab@linux-m68k.org
2015-03-03 16:30 ` cvs-commit at gcc dot gnu.org
` (11 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: schwab@linux-m68k.org @ 2015-03-02 11:08 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=17841
--- Comment #1 from Andreas Schwab <schwab@linux-m68k.org> ---
On armv7l it also fails:
gcc -nostdlib -nostartfiles -static -o
/home/abuild/rpmbuild/BUILD/glibc-2.21/cc-base/elf/sln
/home/abuild/rpmbuild/BUILD/glibc-2.21/cc-base/csu/crt1.o
/home/abuild/rpmbuild/BUILD/glibc-2.21/cc-base/csu/crti.o `gcc
--print-file-name=crtbeginT.o`
/home/abuild/rpmbuild/BUILD/glibc-2.21/cc-base/elf/sln.o
/home/abuild/rpmbuild/BUILD/glibc-2.21/cc-base/elf/static-stubs.o
-Wl,--start-group /home/abuild/rpmbuild/BUILD/glibc-2.21/cc-base/libc.a -lgcc
/home/abuild/rpmbuild/BUILD/glibc-2.21/cc-base/elf/libgcc-stubs.a
-Wl,--end-group `gcc --print-file-name=crtend.o`
/home/abuild/rpmbuild/BUILD/glibc-2.21/cc-base/csu/crtn.o
/home/abuild/rpmbuild/BUILD/glibc-2.21/cc-base/libc.a(setjmp.o): In function
`.L992':
(.rodata.cst4+0x0): undefined reference to `_rtld_global_ro'
/home/abuild/rpmbuild/BUILD/glibc-2.21/cc-base/libc.a(__longjmp.o): In function
`.L992':
(.rodata.cst4+0x0): undefined reference to `_rtld_global_ro'
collect2: error: ld returned 1 exit status
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug libc/17841] Build failure if compiler defaults to PIE
2015-01-14 16:39 [Bug libc/17841] New: Build failure if compiler defaults to PIE hjl.tools at gmail dot com
2015-03-02 11:08 ` [Bug libc/17841] " schwab@linux-m68k.org
@ 2015-03-03 16:30 ` cvs-commit at gcc dot gnu.org
2015-03-06 16:53 ` cvs-commit at gcc dot gnu.org
` (10 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2015-03-03 16:30 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=17841
--- Comment #2 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, hjl/pr17841 has been created
at 2a0b2d28affdb91ecdb0900719ba2f9fb942d0ee (commit)
- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=2a0b2d28affdb91ecdb0900719ba2f9fb942d0ee
commit 2a0b2d28affdb91ecdb0900719ba2f9fb942d0ee
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Mon Mar 2 10:40:46 2015 -0800
Use -mno-copyreloc-in-pie to compile vismain.c
GCC 5 may use copy relocation in PIE on x86-64 if linker supports it.
But vismain.c, which is compiled as PIE, doesn't work with copy
relocation. This patch compiles vismain.c with -mno-copyreloc-in-pie
if -mcopyreloc-in-pie is available.
[BZ #17841]
* config.make.in (have-mcopyreloc-in-pie): New.
* configure.ac (libc_cv_mcopyreloc_in_pie): New. Set to yes if
-mcopyreloc-in-pie works. AC_SUBST.
* configure: Regenerated.
* elf/Makefile (CFLAGS-vismain.c): Add -mno-copyreloc-in-pie
if supported.
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=157b304dd18e7ffb89921ea80b9fbebe9da18952
commit 157b304dd18e7ffb89921ea80b9fbebe9da18952
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Mon Mar 2 14:53:11 2015 -0800
Compile archives with -fno-pie
When compiler defaults to PIE, we compile archives with -fno-pie. Since
archives won't be used with PIE, compile them with -fpie isn't necessary.
[BZ #17841]
* Makeconfig (no-pie-ccflag): New. Set to -fno-pie.
(pic-default): Don't define if $(no-pie-ccflag) is -fno-pie.
* Makerules (archive-objects): New. Set before including
extra-lib.mk.
($(archive-objects)): New. New rule to append $(no-pie-ccflag)
to CFLAGS.
* extra-lib.mk (archive-objects): New.
* crypt/Makefile (crypt-suffix): New.
($(objpfx)md5test): Replace ".o" with $(crypt-suffix).
($(objpfx)md5test-giant): Likewise.
($(objpfx)sha256test): Likewise.
($(objpfx)sha512test): Likewise.
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=b13706de6259ffb4140b75e898038afe04b2074f
commit b13706de6259ffb4140b75e898038afe04b2074f
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Wed Jan 14 06:29:04 2015 -0800
Support compilers defaulting to PIE
If PIE is the default, we need to build programs as PIE.
[BZ #17841]
* Makeconfig (+link): Set to $(+link-pie) if default to PIE.
(+link-tests): Set to $(+link-pie-tests) if default to PIE.
* config.make.in (build-pie-default): New.
* configure.ac (libc_cv_pie_default): New. Set to yes if -fPIE
is default. AC_SUBST.
* configure: Regenerated.
-----------------------------------------------------------------------
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug libc/17841] Build failure if compiler defaults to PIE
2015-01-14 16:39 [Bug libc/17841] New: Build failure if compiler defaults to PIE hjl.tools at gmail dot com
2015-03-02 11:08 ` [Bug libc/17841] " schwab@linux-m68k.org
2015-03-03 16:30 ` cvs-commit at gcc dot gnu.org
@ 2015-03-06 16:53 ` cvs-commit at gcc dot gnu.org
2015-03-06 21:30 ` cvs-commit at gcc dot gnu.org
` (9 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2015-03-06 16:53 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=17841
--- Comment #3 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, hjl/pr17841 has been created
at 865bdc474cdd2536570afbfd0458538118b12c12 (commit)
- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=865bdc474cdd2536570afbfd0458538118b12c12
commit 865bdc474cdd2536570afbfd0458538118b12c12
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Mon Mar 2 14:53:11 2015 -0800
Compile archives with -fno-pie
When compiler defaults to PIE, we compile archives with -fno-pie. Since
archives won't be used with PIE, compile them with -fpie isn't necessary.
[BZ #17841]
* Makeconfig (no-pie-ccflag): New. Set to -fno-pie.
(pic-default): Don't define if $(no-pie-ccflag) is -fno-pie.
* Makerules (archive-objects): New. Set before including
extra-lib.mk.
($(archive-objects)): New. New rule to append $(no-pie-ccflag)
to CFLAGS.
* extra-lib.mk (archive-objects): New.
* crypt/Makefile (crypt-suffix): New.
($(objpfx)md5test): Replace ".o" with $(crypt-suffix).
($(objpfx)md5test-giant): Likewise.
($(objpfx)sha256test): Likewise.
($(objpfx)sha512test): Likewise.
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=618fc355734a330c883eb0287cf7ea48107de19a
commit 618fc355734a330c883eb0287cf7ea48107de19a
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Wed Jan 14 06:29:04 2015 -0800
Support compilers defaulting to PIE
If PIE is the default, we need to build programs as PIE.
[BZ #17841]
* Makeconfig (+link): Set to $(+link-pie) if default to PIE.
(+link-tests): Set to $(+link-pie-tests) if default to PIE.
* config.make.in (build-pie-default): New.
* configure.ac (libc_cv_pie_default): New. Set to yes if -fPIE
is default. AC_SUBST.
* configure: Regenerated.
-----------------------------------------------------------------------
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug libc/17841] Build failure if compiler defaults to PIE
2015-01-14 16:39 [Bug libc/17841] New: Build failure if compiler defaults to PIE hjl.tools at gmail dot com
` (2 preceding siblings ...)
2015-03-06 16:53 ` cvs-commit at gcc dot gnu.org
@ 2015-03-06 21:30 ` cvs-commit at gcc dot gnu.org
2015-03-06 23:49 ` cvs-commit at gcc dot gnu.org
` (8 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2015-03-06 21:30 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=17841
--- Comment #4 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, hjl/pr17841 has been created
at b51c97712c9379b45a450e7192ed9251929f484a (commit)
- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=b51c97712c9379b45a450e7192ed9251929f484a
commit b51c97712c9379b45a450e7192ed9251929f484a
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Mon Mar 2 14:53:11 2015 -0800
Compile archives with -fno-pie
When compiler defaults to PIE, we compile archives with -fno-pie. Since
archives won't be used with PIE, compile them with -fpie isn't necessary.
[BZ #17841]
* Makeconfig (no-pie-ccflag): New. Set to -fno-pie.
(pic-default): Don't define if $(no-pie-ccflag) is -fno-pie.
(test-object-suffix): New.
* Makerules (archive-objects): New. Set before including
extra-lib.mk.
($(archive-objects)): New. New rule to append $(no-pie-ccflag)
to CFLAGS.
* extra-lib.mk (archive-objects): New.
* crypt/Makefile ($(objpfx)md5test): Replace ".o" with
$(test-object-suffix).
($(objpfx)md5test-giant): Likewise.
($(objpfx)sha256test): Likewise.
($(objpfx)sha512test): Likewise.
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=ae19112750e95d9627d0852d7dc98f393ac12f4a
commit ae19112750e95d9627d0852d7dc98f393ac12f4a
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Wed Jan 14 06:29:04 2015 -0800
Support compilers defaulting to PIE
If PIE is the default, we need to build programs as PIE.
[BZ #17841]
* Makeconfig (no-pie-ldflag): New.
(+link): Renamed to ...
(+link-no-pie): This. Add $(no-pie-ldflag).
(+link-tests): Renamed to ...
(++link-no-pie-tests): This. Add $(no-pie-ldflag).
(+link): New. Set to $(+link-no-pie) or $(+link-pie), depend on
if PIE is default.
(+link-tests): New. Set to $(+link-pie-tests) or
$(+link-no-pie-tests), depend on if PIE is default.
* Rules (binaries-no-pie-tests): New.
(binaries-no-pie-notests): Likewise.
($(addprefix $(objpfx),$(binaries-no-pie-tests))): Likewise.
($(addprefix $(objpfx),$(binaries-no-pie-notests))): Likewise.
* config.make.in (build-pie-default): New.
* configure.ac (libc_cv_pie_default): New. Set to yes if -fPIE
is default. AC_SUBST.
* configure: Regenerated.
* math/Makefile (tests): Replace atest-exp atest-sincos
atest-exp2 with $(tests-no-pie).
(tests-no-pie): New.
-----------------------------------------------------------------------
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug libc/17841] Build failure if compiler defaults to PIE
2015-01-14 16:39 [Bug libc/17841] New: Build failure if compiler defaults to PIE hjl.tools at gmail dot com
` (3 preceding siblings ...)
2015-03-06 21:30 ` cvs-commit at gcc dot gnu.org
@ 2015-03-06 23:49 ` cvs-commit at gcc dot gnu.org
2015-03-06 23:56 ` cvs-commit at gcc dot gnu.org
` (7 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2015-03-06 23:49 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=17841
--- Comment #5 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, hjl/pr17841/master has been created
at b624512eca143f88457d1dfdb5cb37229ec05d3a (commit)
- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=b624512eca143f88457d1dfdb5cb37229ec05d3a
commit b624512eca143f88457d1dfdb5cb37229ec05d3a
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Mon Mar 2 14:53:11 2015 -0800
Compile archives with -fno-pie
When compiler defaults to PIE, we compile archives with -fno-pie. Since
archives won't be used with PIE, compile them with -fpie isn't necessary.
[BZ #17841]
* Makeconfig (no-pie-ccflag): New. Set to -fno-pie.
(pic-default): Don't define if $(no-pie-ccflag) is -fno-pie.
(test-object-suffix): New.
* Makerules (archive-objects): New. Set before including
extra-lib.mk.
($(archive-objects)): New. New rule to append $(no-pie-ccflag)
to CFLAGS.
* extra-lib.mk (archive-objects): New.
* crypt/Makefile ($(objpfx)md5test): Replace ".o" with
$(test-object-suffix).
($(objpfx)md5test-giant): Likewise.
($(objpfx)sha256test): Likewise.
($(objpfx)sha512test): Likewise.
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=502af329320bf3849dafba9b7ae26ae20462d94a
commit 502af329320bf3849dafba9b7ae26ae20462d94a
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Wed Jan 14 06:29:04 2015 -0800
Support compilers defaulting to PIE
If PIE is the default, we need to build programs as PIE.
[BZ #17841]
* Makeconfig (no-pie-ldflag): New.
(+link): Renamed to ...
(+link-no-pie): This. Add $(no-pie-ldflag).
(+link-tests): Renamed to ...
(++link-no-pie-tests): This. Add $(no-pie-ldflag).
(+link): New. Set to $(+link-no-pie) or $(+link-pie), depend on
if PIE is default.
(+link-tests): New. Set to $(+link-pie-tests) or
$(+link-no-pie-tests), depend on if PIE is default.
* Rules (binaries-no-pie-tests): New.
(binaries-no-pie-notests): Likewise.
($(addprefix $(objpfx),$(binaries-no-pie-tests))): Likewise.
($(addprefix $(objpfx),$(binaries-no-pie-notests))): Likewise.
* config.make.in (build-pie-default): New.
* configure.ac (libc_cv_pie_default): New. Set to yes if -fPIE
is default. AC_SUBST.
* configure: Regenerated.
* elf/Makefile (tests-no-pie): Set to tst-dlopen-aout.
(tests): Replace tst-dlopen-aout with $(tests-no-pie).
* math/Makefile (tests): Replace atest-exp atest-sincos
atest-exp2 with $(tests-no-pie).
(tests-no-pie): New.
-----------------------------------------------------------------------
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug libc/17841] Build failure if compiler defaults to PIE
2015-01-14 16:39 [Bug libc/17841] New: Build failure if compiler defaults to PIE hjl.tools at gmail dot com
` (4 preceding siblings ...)
2015-03-06 23:49 ` cvs-commit at gcc dot gnu.org
@ 2015-03-06 23:56 ` cvs-commit at gcc dot gnu.org
2015-03-07 1:10 ` cvs-commit at gcc dot gnu.org
` (6 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2015-03-06 23:56 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=17841
--- Comment #6 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, hjl/pr17841/2.21 has been created
at 9b1d32c794fe86f21fb534b8f808702b286c5059 (commit)
- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=9b1d32c794fe86f21fb534b8f808702b286c5059
commit 9b1d32c794fe86f21fb534b8f808702b286c5059
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Fri Mar 6 04:55:56 2015 -0800
Replace __attribute__((visibility("protected")))
With copy relocation, address of protected data defined in the shared
library may be external. Compiler shouldn't asssume protected data will
be local. But due to
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65248
__attribute__((visibility("protected"))) doesn't work correctly, we need
to use asm (".protected xxx") instead.
* elf/ifuncdep2.c (global): Replace
__attribute__((visibility("protected"))) with
asm (".protected global").
* elf/ifuncmod1.c (global): Likewise.
* elf/ifuncmod5.c (global): Likewise.
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=420da75f11fcee9aef3bd1a39302449af91f571b
commit 420da75f11fcee9aef3bd1a39302449af91f571b
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Wed Jan 14 06:29:04 2015 -0800
Support compilers defaulting to PIE
If PIE is the default, we need to build programs as PIE.
[BZ #17841]
* Makeconfig (+link): Set to $(+link-pie) if default to PIE.
(+link-tests): Set to $(+link-pie-tests) if default to PIE.
* config.make.in (build-pie-default): New.
* configure.ac (libc_cv_pie_default): New. Set to yes if -fPIE
is default. AC_SUBST.
* configure: Regenerated.
-----------------------------------------------------------------------
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug libc/17841] Build failure if compiler defaults to PIE
2015-01-14 16:39 [Bug libc/17841] New: Build failure if compiler defaults to PIE hjl.tools at gmail dot com
` (5 preceding siblings ...)
2015-03-06 23:56 ` cvs-commit at gcc dot gnu.org
@ 2015-03-07 1:10 ` cvs-commit at gcc dot gnu.org
2015-03-07 14:04 ` cvs-commit at gcc dot gnu.org
` (5 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2015-03-07 1:10 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=17841
--- Comment #7 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, hjl/pr17841/master has been created
at f9a8dda341d1493d7666b5242a0ae42c385bc632 (commit)
- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=f9a8dda341d1493d7666b5242a0ae42c385bc632
commit f9a8dda341d1493d7666b5242a0ae42c385bc632
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Mon Mar 2 14:53:11 2015 -0800
Compile archives with -fno-pie
When compiler defaults to PIE, we compile archives with -fno-pie. Since
archives won't be used with PIE, compile them with -fpie isn't necessary.
[BZ #17841]
* Makeconfig (no-pie-ccflag): New. Set to -fno-pie.
(pic-default): Don't define if $(no-pie-ccflag) is -fno-pie.
(test-object-suffix): New.
* Makerules (archive-objects): New. Set before including
extra-lib.mk.
($(archive-objects)): New. New rule to append $(no-pie-ccflag)
to CFLAGS.
* extra-lib.mk (archive-objects): New.
* crypt/Makefile ($(objpfx)md5test): Replace ".o" with
$(test-object-suffix).
($(objpfx)md5test-giant): Likewise.
($(objpfx)sha256test): Likewise.
($(objpfx)sha512test): Likewise.
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=5307cac2785efd24eef5a21b6ee6e83a4ed46ac7
commit 5307cac2785efd24eef5a21b6ee6e83a4ed46ac7
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Wed Jan 14 06:29:04 2015 -0800
Support compilers defaulting to PIE
If PIE is the default, we need to build programs as PIE.
[BZ #17841]
* Makeconfig (no-pie-ldflag): New.
(+link): Renamed to ...
(+link-no-pie): This. Add $(no-pie-ldflag).
(+link-tests): Renamed to ...
(++link-no-pie-tests): This. Add $(no-pie-ldflag).
(+link): New. Set to $(+link-no-pie) or $(+link-pie), depend on
if PIE is default.
(+link-tests): New. Set to $(+link-pie-tests) or
$(+link-no-pie-tests), depend on if PIE is default.
* Rules (binaries-no-pie-tests): New.
(binaries-no-pie-notests): Likewise.
($(addprefix $(objpfx),$(binaries-no-pie-tests))): Likewise.
($(addprefix $(objpfx),$(binaries-no-pie-notests))): Likewise.
* config.make.in (build-pie-default): New.
* configure.ac (libc_cv_pie_default): New. Set to yes if -fPIE
is default. AC_SUBST.
* configure: Regenerated.
* elf/Makefile (tests-no-pie): Set to tst-dlopen-aout.
(tests): Replace tst-dlopen-aout with $(tests-no-pie).
* math/Makefile (tests): Replace atest-exp atest-sincos
atest-exp2 with $(tests-no-pie).
(tests-no-pie): New.
-----------------------------------------------------------------------
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug libc/17841] Build failure if compiler defaults to PIE
2015-01-14 16:39 [Bug libc/17841] New: Build failure if compiler defaults to PIE hjl.tools at gmail dot com
` (6 preceding siblings ...)
2015-03-07 1:10 ` cvs-commit at gcc dot gnu.org
@ 2015-03-07 14:04 ` cvs-commit at gcc dot gnu.org
2015-03-07 14:26 ` cvs-commit at gcc dot gnu.org
` (4 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2015-03-07 14:04 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=17841
--- Comment #8 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, hjl/pr17841/2.21 has been created
at d8feaca7c8568149ee43b28bd582d56b8fe61981 (commit)
- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=d8feaca7c8568149ee43b28bd582d56b8fe61981
commit d8feaca7c8568149ee43b28bd582d56b8fe61981
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Fri Mar 6 04:55:56 2015 -0800
Replace __attribute__((visibility("protected")))
With copy relocation, address of protected data defined in the shared
library may be external. Compiler shouldn't asssume protected data will
be local. But due to
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65248
__attribute__((visibility("protected"))) doesn't work correctly, we need
to use asm (".protected xxx") instead.
* elf/ifuncdep2.c (global): Replace
__attribute__((visibility("protected"))) with
asm (".protected global").
* elf/ifuncmod1.c (global): Likewise.
* elf/ifuncmod5.c (global): Likewise.
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=1eac409fb6e772a505d45e65b413be1e258dac94
commit 1eac409fb6e772a505d45e65b413be1e258dac94
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Wed Jan 14 06:29:04 2015 -0800
Support compilers defaulting to PIE
If PIE is the default, we need to build programs as PIE.
[BZ #17841]
* Makeconfig (no-pie-ldflag): New.
(+link): Set to $(+link-pie) if default to PIE.
(+link-tests): Set to $(+link-pie-tests) if default to PIE.
* config.make.in (build-pie-default): New.
* configure.ac (libc_cv_pie_default): New. Set to yes if -fPIE
is default. AC_SUBST.
* configure: Regenerated.
* elf/Makefile (LDFLAGS-tst-dlopen-aout): New.
-----------------------------------------------------------------------
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug libc/17841] Build failure if compiler defaults to PIE
2015-01-14 16:39 [Bug libc/17841] New: Build failure if compiler defaults to PIE hjl.tools at gmail dot com
` (7 preceding siblings ...)
2015-03-07 14:04 ` cvs-commit at gcc dot gnu.org
@ 2015-03-07 14:26 ` cvs-commit at gcc dot gnu.org
2015-05-28 13:11 ` cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2015-03-07 14:26 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=17841
--- Comment #9 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, hjl/pr17841/master has been created
at 25de905e5c9280002501af20ac4836795ae8146f (commit)
- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=25de905e5c9280002501af20ac4836795ae8146f
commit 25de905e5c9280002501af20ac4836795ae8146f
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Mon Mar 2 14:53:11 2015 -0800
Compile archives with -fno-pie
When compiler defaults to PIE, we compile archives with -fno-pie. Since
archives won't be used with PIE, compile them with -fpie isn't necessary.
[BZ #17841]
* Makeconfig (no-pie-ccflag): New. Set to -fno-pie.
(pic-default): Don't define if $(no-pie-ccflag) is -fno-pie.
(test-object-suffix): New.
* Makerules (archive-objects): New. Set before including
extra-lib.mk.
($(archive-objects)): New. New rule to append $(no-pie-ccflag)
to CFLAGS.
* extra-lib.mk (archive-objects): New.
* crypt/Makefile ($(objpfx)md5test): Replace ".o" with
$(test-object-suffix).
($(objpfx)md5test-giant): Likewise.
($(objpfx)sha256test): Likewise.
($(objpfx)sha512test): Likewise.
* math/Makefile (LDFLAGS-atest-exp): New.
(LDFLAGS-atest-sincos): Likewise.
(LDFLAGS-atest-exp2): Likewise.
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=01181d5beae0edc4cb7abbc8bb94098a2bea2366
commit 01181d5beae0edc4cb7abbc8bb94098a2bea2366
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Wed Jan 14 06:29:04 2015 -0800
Support compilers defaulting to PIE
If PIE is the default, we need to build programs as PIE.
[BZ #17841]
* Makeconfig (no-pie-ldflag): New.
(+link): Set to $(+link-pie) if default to PIE.
(+link-tests): Set to $(+link-pie-tests) if default to PIE.
* config.make.in (build-pie-default): New.
* configure.ac (libc_cv_pie_default): New. Set to yes if -fPIE
is default. AC_SUBST.
* configure: Regenerated.
* elf/Makefile (LDFLAGS-tst-dlopen-aout): New.
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=4ba31feb73f4f700d93e7005e50bdb4835839623
commit 4ba31feb73f4f700d93e7005e50bdb4835839623
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Thu Mar 5 11:36:35 2015 -0800
Add a testcase for copy reloc against protected data
Linkers in some versions of binutils 2.25 and 2.26 don't support protected
data symbol with error messsage like:
/usr/bin/ld: copy reloc against protected `bar' is invalid
/usr/bin/ld: failed to set dynamic section sizes: Bad value
We check if linker supports copy reloc against protected data symbol to
avoid running the test if linker is broken.
[BZ #17711]
* config.make.in (have-protected-data): New.
* configure.ac: Check linker support for protected data symbol.
* configure: Regenerated.
* elf/Makefile (modules-names): Add tst-protected1moda and
tst-protected1modb if $(have-protected-data) is yes.
(tests): Add tst-protected1a and tst-protected1b if
$(have-protected-data) is yes.
($(objpfx)tst-protected1a): New.
($(objpfx)tst-protected1b): Likewise.
(tst-protected1modb.so-no-z-defs): Likewise.
* elf/tst-protected1a.c: New file.
* elf/tst-protected1b.c: Likewise.
* elf/tst-protected1mod.h: Likewise.
* elf/tst-protected1moda.c: Likewise.
* elf/tst-protected1modb.c: Likewise.
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=6df34771a51884b8cfdc8216e9d07883979ebf84
commit 6df34771a51884b8cfdc8216e9d07883979ebf84
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Wed Mar 4 10:24:25 2015 -0800
Add ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA to x86
With copy relocation, address of protected data defined in the shared
library may be external. When there is a relocation against the
protected data symbol within the shared library, we need to check if we
should skip the definition in the executable copied from the protected
data. This patch adds ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA and defines
it for x86. If ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA isn't 0, do_lookup_x
will skip the data definition in the executable from copy reloc.
[BZ #17711]
* elf/dl-lookup.c (do_lookup_x): When UNDEF_MAP is NULL, which
indicates it is called from do_lookup_x on relocation against
protected data, skip the data definion in the executable from
copy reloc.
(_dl_lookup_symbol_x): Pass ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA,
instead of ELF_RTYPE_CLASS_PLT, to do_lookup_x for
EXTERN_PROTECTED_DATA relocation against STT_OBJECT symbol.
* sysdeps/generic/ldsodefs.h * (ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA):
New. Defined to 4 if DL_EXTERN_PROTECTED_DATA is defined,
otherwise to 0.
* sysdeps/i386/dl-lookupcfg.h (DL_EXTERN_PROTECTED_DATA): New.
* sysdeps/i386/dl-machine.h (elf_machine_type_class): Set class
to ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA for R_386_GLOB_DAT.
* sysdeps/x86_64/dl-lookupcfg.h (DL_EXTERN_PROTECTED_DATA): New.
* sysdeps/x86_64/dl-machine.h (elf_machine_type_class): Set class
to ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA for R_X86_64_GLOB_DAT.
-----------------------------------------------------------------------
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug libc/17841] Build failure if compiler defaults to PIE
2015-01-14 16:39 [Bug libc/17841] New: Build failure if compiler defaults to PIE hjl.tools at gmail dot com
` (8 preceding siblings ...)
2015-03-07 14:26 ` cvs-commit at gcc dot gnu.org
@ 2015-05-28 13:11 ` cvs-commit at gcc dot gnu.org
2015-05-28 15:02 ` vapier at gentoo dot org
` (2 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2015-05-28 13:11 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=17841
--- Comment #11 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, hjl/pr17841/master has been created
at ca1f728cbefd6955735087e45d80620113623b3b (commit)
- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=ca1f728cbefd6955735087e45d80620113623b3b
commit ca1f728cbefd6955735087e45d80620113623b3b
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Mon Mar 2 14:53:11 2015 -0800
Compile archives with -fno-pie
When compiler defaults to PIE, we compile archives with -fno-pie. Since
archives won't be used with PIE, compile them with -fpie isn't necessary.
[BZ #17841]
* Makeconfig (no-pie-ccflag): New. Set to -fno-pie.
(pic-default): Don't define if $(no-pie-ccflag) is -fno-pie.
(test-object-suffix): New.
* Makerules (archive-objects): New. Set before including
extra-lib.mk.
($(archive-objects)): New. New rule to append $(no-pie-ccflag)
to CFLAGS.
* extra-lib.mk (archive-objects): New.
* crypt/Makefile ($(objpfx)md5test): Replace ".o" with
$(test-object-suffix).
($(objpfx)md5test-giant): Likewise.
($(objpfx)sha256test): Likewise.
($(objpfx)sha512test): Likewise.
* math/Makefile (LDFLAGS-atest-exp): New.
(LDFLAGS-atest-sincos): Likewise.
(LDFLAGS-atest-exp2): Likewise.
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=1ea33bb5517516d1d1005b953c92a071454e66d5
commit 1ea33bb5517516d1d1005b953c92a071454e66d5
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Wed Jan 14 06:29:04 2015 -0800
Support compilers defaulting to PIE
To support building glibc with GCC 6 configured with --enable-default-pie,
which generates PIE by default, we need to build programs as PIE. But
elf/tst-dlopen-aout must not be built as PIE since it tests dlopen on
ET_EXEC file and PIE is ET_DYN.
[BZ #17841]
* Makeconfig (no-pie-ldflag): New.
(+link): Set to $(+link-pie) if default to PIE.
(+link-tests): Set to $(+link-pie-tests) if default to PIE.
* config.make.in (build-pie-default): New.
* configure.ac (libc_cv_pie_default): New. Set to yes if -fPIE
is default. AC_SUBST.
* configure: Regenerated.
* elf/Makefile (LDFLAGS-tst-dlopen-aout): New.
-----------------------------------------------------------------------
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug libc/17841] Build failure if compiler defaults to PIE
2015-01-14 16:39 [Bug libc/17841] New: Build failure if compiler defaults to PIE hjl.tools at gmail dot com
` (9 preceding siblings ...)
2015-05-28 13:11 ` cvs-commit at gcc dot gnu.org
@ 2015-05-28 15:02 ` vapier at gentoo dot org
2015-06-25 9:51 ` cvs-commit at gcc dot gnu.org
2015-06-25 9:51 ` hjl.tools at gmail dot com
12 siblings, 0 replies; 14+ messages in thread
From: vapier at gentoo dot org @ 2015-05-28 15:02 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=17841
Mike Frysinger <vapier at gentoo dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |toolchain at gentoo dot org
--- Comment #12 from Mike Frysinger <vapier at gentoo dot org> ---
(In reply to Andreas Schwab from comment #1)
you'll most likely need a fix like Gentoo has had for years:
https://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commit;h=6d234be2fbd744d252c17cc1ee79010f3b3d88dc
i never got back around to addressing the questions on the referenced
libc-ports thread ...
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug libc/17841] Build failure if compiler defaults to PIE
2015-01-14 16:39 [Bug libc/17841] New: Build failure if compiler defaults to PIE hjl.tools at gmail dot com
` (10 preceding siblings ...)
2015-05-28 15:02 ` vapier at gentoo dot org
@ 2015-06-25 9:51 ` cvs-commit at gcc dot gnu.org
2015-06-25 9:51 ` hjl.tools at gmail dot com
12 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2015-06-25 9:51 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=17841
--- Comment #13 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, master has been updated
via cc08749b2d1c68284b25b157fbbe1ff219495cae (commit)
from 45a8f0e6629d7772b9fa1aef0389bc51a094424d (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=cc08749b2d1c68284b25b157fbbe1ff219495cae
commit cc08749b2d1c68284b25b157fbbe1ff219495cae
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Thu Jun 25 02:37:04 2015 -0700
Support compilers defaulting to PIE
To support building glibc with GCC 6 configured with --enable-default-pie,
which generates PIE by default, we need to build programs as PIE. But
elf/tst-dlopen-aout must not be built as PIE since it tests dlopen on
ET_EXEC file and PIE is ET_DYN.
[BZ #17841]
* Makeconfig (no-pie-ldflag): New.
(+link): Set to $(+link-pie) if default to PIE.
(+link-tests): Set to $(+link-pie-tests) if default to PIE.
* config.make.in (build-pie-default): New.
* configure.ac (libc_cv_pie_default): New. Set to yes if -fPIE
is default. AC_SUBST.
* configure: Regenerated.
* elf/Makefile (LDFLAGS-tst-dlopen-aout): New.
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 12 ++++++++++++
Makeconfig | 6 ++++++
NEWS | 22 +++++++++++-----------
config.make.in | 1 +
configure | 21 +++++++++++++++++++++
configure.ac | 13 +++++++++++++
elf/Makefile | 1 +
7 files changed, 65 insertions(+), 11 deletions(-)
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug libc/17841] Build failure if compiler defaults to PIE
2015-01-14 16:39 [Bug libc/17841] New: Build failure if compiler defaults to PIE hjl.tools at gmail dot com
` (11 preceding siblings ...)
2015-06-25 9:51 ` cvs-commit at gcc dot gnu.org
@ 2015-06-25 9:51 ` hjl.tools at gmail dot com
12 siblings, 0 replies; 14+ messages in thread
From: hjl.tools at gmail dot com @ 2015-06-25 9:51 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=17841
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
Target Milestone|--- |2.22
--- Comment #14 from H.J. Lu <hjl.tools at gmail dot com> ---
Fixed.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 14+ messages in thread