This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 03/27] Add dynamic ILP32 AARCH64 relocations to elf.h
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Yury Norov <ynorov at caviumnetworks dot com>
- Cc: <libc-alpha at sourceware dot org>, <linux-kernel at vger dot kernel dot org>, <arnd at arndb dot de>, <catalin dot marinas at arm dot com>, <marcus dot shawcroft at arm dot com>, <philb at gnu dot org>, <davem at davemloft dot net>, <szabolcs dot nagy at arm dot com>, <maxim dot kuvyrkov at linaro dot org>, <pinskia at gmail dot com>, Andrew Pinski <apinski at cavium dot com>
- Date: Tue, 21 Jun 2016 10:26:49 +0000
- Subject: Re: [PATCH 03/27] Add dynamic ILP32 AARCH64 relocations to elf.h
- Authentication-results: sourceware.org; auth=none
- References: <1466485631-3532-1-git-send-email-ynorov at caviumnetworks dot com> <1466485631-3532-5-git-send-email-ynorov at caviumnetworks dot com>
On Tue, 21 Jun 2016, Yury Norov wrote:
> From: Andrew Pinski <apinski@cavium.com>
>
> 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@codesourcery.com