Re: [PATCH 03/27] Add dynamic ILP32 AARCH64 relocations to elf.h
From: Joseph Myers
Date: Tue Jun 21 2016 - 07:13:16 EST
On Tue, 21 Jun 2016, Yury Norov wrote:
> From: Andrew Pinski <apinski@xxxxxxxxxx>
>
> elf/elf.h (R_AARCH64_P32_ABS32, R_AARCH64_P32_COPY,
> R_AARCH64_P32_GLOB_DAT, R_AARCH64_P32_JUMP_SLOT,
> R_AARCH64_P32_RELATIVE, R_AARCH64_P32_TLS_DTPMOD,
> R_AARCH64_P32_TLS_DTPREL, R_AARCH64_P32_TLS_TPREL,
> R_AARCH64_P32_TLSDESC, R_AARCH64_P32_IRELATIVE): Define.
>
> [AARCH64] Use ELFW and ElfW macros instead of ELF64 and Elf64 names.
>
> * sysdeps/aarch64/dl-machine.h
> (elf_machine_runtime_setup): Use ElfW(Addr).
> (elf_machine_rela): Use ELFW(R_TYPE).
> (elf_machine_lazy_rel): Likewise.
>
> [AARCH64] Introduce AARCH64_R so we can reuse the reloc code between ILP32 and LP64.
>
> * sysdeps/aarch64/sysdep.h (AARCH64_R): Define.
> * sysdeps/aarch64/dl-irel.h: Include sysdep.h
> (elf_irela): Use reloc names based on AARCH64_R.
> * sysdeps/aarch64/dl-machine.h: Include sysdep.h
> (elf_machine_type_class): Use reloc names based on AARCH64_R.
> (elf_machine_rela): Likewise.
> (elf_machine_lazy_rel): Likewise.
The patch subject appears to have no relation to its contents. Any patch
submission should have a unified ChangeLog stanza, not three stanzas like
here; if there are logically separate pieces, submit them separately.
> diff --git a/sysdeps/aarch64/sysdep.h b/sysdeps/aarch64/sysdep.h
> index 594ab0b..4cb028f 100644
> --- a/sysdeps/aarch64/sysdep.h
> +++ b/sysdeps/aarch64/sysdep.h
> @@ -21,6 +21,12 @@
>
> #include <sysdeps/generic/sysdep.h>
>
> +#ifdef __LP64__
> +#define AARCH64_R(NAME) R_AARCH64_ ## NAME
> +#else
> +#define AARCH64_R(NAME) R_AARCH64_P32_ ## NAME
> +#endif
glibc uses "# " indentation for nested preprocessor directives. Check for
and fix this issue throughout the patch series.
--
Joseph S. Myers
joseph@xxxxxxxxxxxxxxxx