]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - bfd/elf64-x86-64.c
x86: Clear extern_protected_data for GNU_PROPERTY_NO_COPY_ON_PROTECTED
authorH.J. Lu <hjl.tools@gmail.com>
Wed, 23 Aug 2017 17:15:39 +0000 (10:15 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Wed, 23 Aug 2017 17:15:58 +0000 (10:15 -0700)
commit73784fa565bd66f1ac165816c03e5217b7d67bbc
tree00a650b903a28e8c12a40a7a836c5bf5baf9c92a
parent6e41ddec97d402c6c150701da0f70d40bd6ed5ca
x86: Clear extern_protected_data for GNU_PROPERTY_NO_COPY_ON_PROTECTED

When GNU_PROPERTY_NO_COPY_ON_PROTECTED is set, it indicates that there
are no copy relocations against protected data symbols.  When linker
sees GNU_PROPERTY_NO_COPY_ON_PROTECTED on any input relocatable file,
it sets extern_protected_data to FALSE.

bfd/

* elf32-i386.c (elf_i386_link_setup_gnu_properties): Set
extern_protected_data to FALSE if GNU_PROPERTY_NO_COPY_ON_PROTECTED
is set on any input relocatable file.
* elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.

ld/

* testsuite/ld-i386/i386.exp: Run protected7.
* testsuite/ld-i386/protected7.d: New file.
* testsuite/ld-i386/protected7.s: Likewise.
* testsuite/ld-x86-64/protected8.d: Likewise.
* testsuite/ld-x86-64/protected8.s: Likewise.
* testsuite/ld-x86-64/x86-64.exp: Run protected8.
bfd/ChangeLog
bfd/elf32-i386.c
bfd/elf64-x86-64.c
ld/ChangeLog
ld/testsuite/ld-i386/i386.exp
ld/testsuite/ld-i386/protected7.d [new file with mode: 0644]
ld/testsuite/ld-i386/protected7.s [new file with mode: 0644]
ld/testsuite/ld-x86-64/protected8.d [new file with mode: 0644]
ld/testsuite/ld-x86-64/protected8.s [new file with mode: 0644]
ld/testsuite/ld-x86-64/x86-64.exp