Skip to content

Commit

Permalink
AArch64: Use ELF macros rather than Elf64 throughout
Browse files Browse the repository at this point in the history
Using the macros for ELF types is required for adding ILP32 support.
In the standard AArch64 configuration this makes no difference to
the types used.

ChangeLog:

2014-11-21  Will Newton  <will.newton@linaro.org>
	    Andrew Pinski  <andrew.pinski@caviumnetworks.com>

	* sysdeps/aarch64/bits/link.h (la_aarch64_gnu_pltenter): Use
	ElfW macro instead of hardcoded Elf64 types.
	(la_aarch64_gnu_pltenter): Likewise.
	* sysdeps/aarch64/dl-machine.h
	(elf_machine_runtime_setup): Use ElfW(Addr).
  • Loading branch information
Will Newton committed Nov 21, 2014
1 parent 8c23003 commit 01194ba
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
2014-11-21 Will Newton <will.newton@linaro.org>
Andrew Pinski <andrew.pinski@caviumnetworks.com>

* sysdeps/aarch64/bits/link.h (la_aarch64_gnu_pltenter): Use
ElfW macro instead of hardcoded Elf64 types.
(la_aarch64_gnu_pltenter): Likewise.
* sysdeps/aarch64/dl-machine.h
(elf_machine_runtime_setup): Use ElfW(Addr).

* 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,
Expand Down
6 changes: 3 additions & 3 deletions sysdeps/aarch64/bits/link.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ typedef struct La_aarch64_retval
} La_aarch64_retval;
__BEGIN_DECLS

extern Elf64_Addr
la_aarch64_gnu_pltenter (Elf64_Sym *__sym, unsigned int __ndx,
extern ElfW(Addr)
la_aarch64_gnu_pltenter (ElfW(Sym) *__sym, unsigned int __ndx,
uintptr_t *__refcook,
uintptr_t *__defcook,
La_aarch64_regs *__regs,
Expand All @@ -50,7 +50,7 @@ la_aarch64_gnu_pltenter (Elf64_Sym *__sym, unsigned int __ndx,
long int *__framesizep);

extern unsigned int
la_aarch64_gnu_pltexit (Elf64_Sym *__sym, unsigned int __ndx,
la_aarch64_gnu_pltexit (ElfW(Sym) *__sym, unsigned int __ndx,
uintptr_t *__refcook,
uintptr_t *__defcook,
const La_aarch64_regs *__inregs,
Expand Down
4 changes: 2 additions & 2 deletions sysdeps/aarch64/dl-machine.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
}

if (l->l_info[ADDRIDX (DT_TLSDESC_GOT)] && lazy)
*(Elf64_Addr*)(D_PTR (l, l_info[ADDRIDX (DT_TLSDESC_GOT)]) + l->l_addr)
= (Elf64_Addr) &_dl_tlsdesc_resolve_rela;
*(ElfW(Addr)*)(D_PTR (l, l_info[ADDRIDX (DT_TLSDESC_GOT)]) + l->l_addr)
= (ElfW(Addr)) &_dl_tlsdesc_resolve_rela;

return lazy;
}
Expand Down

0 comments on commit 01194ba

Please sign in to comment.