diff mbox

[AArch64,BZ,#17711] Fix extern protected data handling

Message ID 55AFC4B3.30103@arm.com
State Committed
Headers show

Commit Message

Szabolcs Nagy July 22, 2015, 4:28 p.m. UTC
Fixes elf/tst-protected1a and elf/tst-protected1b tests.
Depends on a gcc and binutils fix too.

2015-07-22  Szabolcs Nagy  <szabolcs.nagy@arm.com>

	[BZ #17711]
	* sysdeps/aarch64/dl-sysdep.h (DL_EXTERN_PROTECTED_DATA): Define.
	* sysdeps/aarch64/dl-machine.h (elf_machine_type_class): Handle
	ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA.

Comments

Marcus Shawcroft July 24, 2015, 7:24 a.m. UTC | #1
On 22 July 2015 at 17:28, Szabolcs Nagy <szabolcs.nagy@arm.com> wrote:
> Fixes elf/tst-protected1a and elf/tst-protected1b tests.
> Depends on a gcc and binutils fix too.
>
> 2015-07-22  Szabolcs Nagy  <szabolcs.nagy@arm.com>
>
>         [BZ #17711]
>         * sysdeps/aarch64/dl-sysdep.h (DL_EXTERN_PROTECTED_DATA): Define.
>         * sysdeps/aarch64/dl-machine.h (elf_machine_type_class): Handle
>         ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA.

The same comments Joseph made on the ARM patch apply here, otherwise OK.
/Marcus
diff mbox

Patch

diff --git a/sysdeps/aarch64/dl-machine.h b/sysdeps/aarch64/dl-machine.h
index 350d987..217e179 100644
--- a/sysdeps/aarch64/dl-machine.h
+++ b/sysdeps/aarch64/dl-machine.h
@@ -195,7 +195,8 @@  _dl_start_user:							\n\
      (type) == R_AARCH64_TLS_DTPREL ||					\
      (type) == R_AARCH64_TLS_TPREL ||					\
      (type) == R_AARCH64_TLSDESC) * ELF_RTYPE_CLASS_PLT)		\
-   | (((type) == R_AARCH64_COPY) * ELF_RTYPE_CLASS_COPY))
+   | (((type) == R_AARCH64_COPY) * ELF_RTYPE_CLASS_COPY)		\
+   | (((type) == R_AARCH64_GLOB_DAT) * ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA))
 
 #define ELF_MACHINE_JMP_SLOT	R_AARCH64_JUMP_SLOT
 
diff --git a/sysdeps/aarch64/dl-sysdep.h b/sysdeps/aarch64/dl-sysdep.h
index 4f951de..0bdbea6 100644
--- a/sysdeps/aarch64/dl-sysdep.h
+++ b/sysdeps/aarch64/dl-sysdep.h
@@ -21,3 +21,5 @@ 
 /* _dl_argv cannot be attribute_relro, because _dl_start_user
    might write into it after _dl_start returns.  */
 #define DL_ARGV_NOT_RELRO 1
+
+#define DL_EXTERN_PROTECTED_DATA