Created attachment 12891 [details] A testcase [hjl@gnu-cfl-2 cet-1]$ make LD=./ld.master as --64 -defsym __64_bit__=1 -o foo.o foo.s as --64 -defsym __64_bit__=1 -o bar.o bar.s as --64 -defsym __64_bit__=1 -o start.o start.s ./ld.master -o x foo.o bar.o start.o -z shstk ./ld.master -o y foo.o start.o -z shstk ./readelf -n x Displaying notes found in: .note.gnu.property Owner Data size Description GNU 0x00000040 NT_GNU_PROPERTY_TYPE_0 Properties: x86 feature: SHSTK <procesor-specific type 0xc0001002 data: 02 00 00 00 > x86 feature used: x86 <procesor-specific type 0xc0010002 data: 00 00 00 00 > ./readelf -n y Displaying notes found in: .note.gnu.property Owner Data size Description GNU 0x00000040 NT_GNU_PROPERTY_TYPE_0 Properties: x86 feature: SHSTK <procesor-specific type 0xc0001002 data: 02 00 00 00 > x86 feature used: x86 <procesor-specific type 0xc0010002 data: 00 00 00 00 > [hjl@gnu-cfl-2 cet-1]$ There should be no <procesor-specific type 0xc0001002 data: 02 00 00 00 >
The master branch has been updated by H.J. Lu <hjl@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=574df58f5295ef2728526e6a73b5f429b05f2a8c commit 574df58f5295ef2728526e6a73b5f429b05f2a8c Author: H.J. Lu <hjl.tools@gmail.com> Date: Tue Oct 6 15:38:23 2020 -0700 x86: Properly merge -z ibt and -z shstk Merge -z ibt and -z shstk only with GNU_PROPERTY_X86_FEATURE_1_AND, not any GNU_PROPERTY_X86_UINT32_AND_XXX properties. bfd/ PR ld/26711 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Merge -z ibt and -z shstk only with GNU_PROPERTY_X86_FEATURE_1_AND. ld/ PR ld/26711 * testsuite/ld-i386/i386.exp: Run ld/26711 tests. * testsuite/ld-x86-64/x86-64.exp: Likewise. * testsuite/ld-i386/pr26711-1.d: Likewise. * testsuite/ld-i386/pr26711-2.d: Likewise. * testsuite/ld-i386/pr26711-3.d: Likewise. * testsuite/ld-x86-64/pr26711-1-x32.d: Likewise. * testsuite/ld-x86-64/pr26711-1.d: Likewise. * testsuite/ld-x86-64/pr26711-2-x32.d: Likewise. * testsuite/ld-x86-64/pr26711-2.d: Likewise. * testsuite/ld-x86-64/pr26711-3-x32.d: Likewise. * testsuite/ld-x86-64/pr26711-3.d: Likewise. * testsuite/ld-x86-64/pr26711.s: Likewise.
The binutils-2_35-branch branch has been updated by H.J. Lu <hjl@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=691e341c06659f7161c5b08d092039efe6eae209 commit 691e341c06659f7161c5b08d092039efe6eae209 Author: H.J. Lu <hjl.tools@gmail.com> Date: Tue Oct 6 15:38:23 2020 -0700 x86: Properly merge -z ibt and -z shstk Merge -z ibt and -z shstk only with GNU_PROPERTY_X86_FEATURE_1_AND, not any GNU_PROPERTY_X86_UINT32_AND_XXX properties. bfd/ PR ld/26711 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Merge -z ibt and -z shstk only with GNU_PROPERTY_X86_FEATURE_1_AND. ld/ PR ld/26711 * testsuite/ld-i386/i386.exp: Run ld/26711 tests. * testsuite/ld-x86-64/x86-64.exp: Likewise. * testsuite/ld-i386/pr26711-1.d: Likewise. * testsuite/ld-i386/pr26711-2.d: Likewise. * testsuite/ld-i386/pr26711-3.d: Likewise. * testsuite/ld-x86-64/pr26711-1-x32.d: Likewise. * testsuite/ld-x86-64/pr26711-1.d: Likewise. * testsuite/ld-x86-64/pr26711-2-x32.d: Likewise. * testsuite/ld-x86-64/pr26711-2.d: Likewise. * testsuite/ld-x86-64/pr26711-3-x32.d: Likewise. * testsuite/ld-x86-64/pr26711-3.d: Likewise. * testsuite/ld-x86-64/pr26711.s: Likewise. (cherry picked from commit 574df58f5295ef2728526e6a73b5f429b05f2a8c)
The binutils-2_34-branch branch has been updated by H.J. Lu <hjl@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=5c1bd3f52c69d00f56f9cb71737396c2651e508d commit 5c1bd3f52c69d00f56f9cb71737396c2651e508d Author: H.J. Lu <hjl.tools@gmail.com> Date: Tue Oct 6 15:38:23 2020 -0700 x86: Properly merge -z ibt and -z shstk Merge -z ibt and -z shstk only with GNU_PROPERTY_X86_FEATURE_1_AND, not any GNU_PROPERTY_X86_UINT32_AND_XXX properties. bfd/ PR ld/26711 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Merge -z ibt and -z shstk only with GNU_PROPERTY_X86_FEATURE_1_AND. ld/ PR ld/26711 * testsuite/ld-i386/i386.exp: Run ld/26711 tests. * testsuite/ld-x86-64/x86-64.exp: Likewise. * testsuite/ld-i386/pr26711-1.d: Likewise. * testsuite/ld-i386/pr26711-2.d: Likewise. * testsuite/ld-i386/pr26711-3.d: Likewise. * testsuite/ld-x86-64/pr26711-1-x32.d: Likewise. * testsuite/ld-x86-64/pr26711-1.d: Likewise. * testsuite/ld-x86-64/pr26711-2-x32.d: Likewise. * testsuite/ld-x86-64/pr26711-2.d: Likewise. * testsuite/ld-x86-64/pr26711-3-x32.d: Likewise. * testsuite/ld-x86-64/pr26711-3.d: Likewise. * testsuite/ld-x86-64/pr26711.s: Likewise. (cherry picked from commit 574df58f5295ef2728526e6a73b5f429b05f2a8c)
Fixed for 2.36 and 2.34/2.35 branches.