This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch master updated. glibc-2.20-225-g6d3db89
- From: willnewton at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 21 Nov 2014 14:45:58 -0000
- Subject: GNU C Library master sources branch master updated. glibc-2.20-225-g6d3db89
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, master has been updated
via 6d3db89b12e5c206b8848f0ab35e0632dbbf4bbf (commit)
via 01194ba18d594e79e687be570d85ec3b09a5fcb2 (commit)
via 8c230039a09523b08a7ede65768678e363206c02 (commit)
from 0d79fa53b4fc43896a5732b84c763c141e1f170b (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6d3db89b12e5c206b8848f0ab35e0632dbbf4bbf
commit 6d3db89b12e5c206b8848f0ab35e0632dbbf4bbf
Author: Andrew Pinski <apinski@cavium.com>
Date: Mon Oct 27 00:59:42 2014 -0700
AArch64: Reformat inline-asm in elf_machine_load_address
This patch reformats the inline-asm in elf_machine_load_address so it is
easier to change only part of the inline-asm. That is using string
concatenating instead of string continuation.
Also document why this inline-asm works - it depends on the 32bit
relocation being resolved at link time.
ChangeLog:
2014-11-21 Will Newton <will.newton@linaro.org>
Andrew Pinski <andrew.pinski@caviumnetworks.com>
* sysdeps/aarch64/dl-machine.h (elf_machine_load_address):
Refactor inline-asm. Also add comment.
diff --git a/ChangeLog b/ChangeLog
index 3fd0843..076c09d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,9 @@
2014-11-21 Will Newton <will.newton@linaro.org>
Andrew Pinski <andrew.pinski@caviumnetworks.com>
+ * sysdeps/aarch64/dl-machine.h (elf_machine_load_address):
+ Refactor inline-asm. Also add comment.
+
* sysdeps/aarch64/bits/link.h (la_aarch64_gnu_pltenter): Use
ElfW macro instead of hardcoded Elf64 types.
(la_aarch64_gnu_pltenter): Likewise.
diff --git a/sysdeps/aarch64/dl-machine.h b/sysdeps/aarch64/dl-machine.h
index 7f5ce2b..1294369 100644
--- a/sysdeps/aarch64/dl-machine.h
+++ b/sysdeps/aarch64/dl-machine.h
@@ -52,19 +52,22 @@ elf_machine_load_address (void)
The choice of symbol is arbitrary. The static address we obtain
by constructing a non GOT reference to the symbol, the dynamic
address of the symbol we compute using adrp/add to compute the
- symbol's address relative to the PC. */
+ symbol's address relative to the PC.
+ This depends on 32bit relocations being resolved at link time
+ and that the static address fits in the 32bits. */
ElfW(Addr) static_addr;
ElfW(Addr) dynamic_addr;
- asm (" \n\
- adrp %1, _dl_start; \n\
- add %1, %1, #:lo12:_dl_start \n\
- ldr %w0, 1f \n\
- b 2f \n\
-1: .word _dl_start \n\
-2: \n\
- " : "=r" (static_addr), "=r" (dynamic_addr));
+ asm (" \n"
+" adrp %1, _dl_start; \n"
+" add %1, %1, #:lo12:_dl_start \n"
+" ldr %w0, 1f \n"
+" b 2f \n"
+"1: \n"
+" .word _dl_start \n"
+"2: \n"
+ : "=r" (static_addr), "=r" (dynamic_addr));
return dynamic_addr - static_addr;
}
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=01194ba18d594e79e687be570d85ec3b09a5fcb2
commit 01194ba18d594e79e687be570d85ec3b09a5fcb2
Author: Will Newton <will.newton@linaro.org>
Date: Tue Nov 18 16:03:51 2014 +0000
AArch64: Use ELF macros rather than Elf64 throughout
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).
diff --git a/ChangeLog b/ChangeLog
index 40cd918..3fd0843 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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,
diff --git a/sysdeps/aarch64/bits/link.h b/sysdeps/aarch64/bits/link.h
index fe06827..3a84a18 100644
--- a/sysdeps/aarch64/bits/link.h
+++ b/sysdeps/aarch64/bits/link.h
@@ -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,
@@ -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,
diff --git a/sysdeps/aarch64/dl-machine.h b/sysdeps/aarch64/dl-machine.h
index acb090d..7f5ce2b 100644
--- a/sysdeps/aarch64/dl-machine.h
+++ b/sysdeps/aarch64/dl-machine.h
@@ -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;
}
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8c230039a09523b08a7ede65768678e363206c02
commit 8c230039a09523b08a7ede65768678e363206c02
Author: Will Newton <will.newton@linaro.org>
Date: Tue Nov 18 15:50:21 2014 +0000
AArch64: Update relocations for ILP32
The latest version of the binutils ELF header defines a new set of
dynamic relocations for ILP32 and renames some to make the naming
more uniform.
ChangeLog:
2014-11-21 Will Newton <will.newton@linaro.org>
Andrew Pinski <andrew.pinski@caviumnetworks.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.
(R_AARCH64_TLS_DTPMOD64): Rename to ..
(R_AARCH64_TLS_DTPMOD): This.
(R_AARCH64_TLS_DTPREL64): Rename to ...
(R_AARCH64_TLS_DTPREL): This.
(R_AARCH64_TLS_TPREL64): Rename to ...
(R_AARCH64_TLS_TPREL): This.
* sysdeps/aarch64/dl-machine.h (elf_machine_type_class): Update
R_AARCH64_TLS_DTPMOD64, R_AARCH64_TLS_DTPREL64, and
R_AARCH64_TLS_TPREL64.
(elf_machine_rela): Likewise.
diff --git a/ChangeLog b/ChangeLog
index b0041ea..40cd918 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,22 @@
+2014-11-21 Will Newton <will.newton@linaro.org>
+ Andrew Pinski <andrew.pinski@caviumnetworks.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.
+ (R_AARCH64_TLS_DTPMOD64): Rename to ..
+ (R_AARCH64_TLS_DTPMOD): This.
+ (R_AARCH64_TLS_DTPREL64): Rename to ...
+ (R_AARCH64_TLS_DTPREL): This.
+ (R_AARCH64_TLS_TPREL64): Rename to ...
+ (R_AARCH64_TLS_TPREL): This.
+ * sysdeps/aarch64/dl-machine.h (elf_machine_type_class): Update
+ R_AARCH64_TLS_DTPMOD64, R_AARCH64_TLS_DTPREL64, and
+ R_AARCH64_TLS_TPREL64.
+ (elf_machine_rela): Likewise.
+
2014-11-21 Torvald Riegel <triegel@redhat.com>
* sysdeps/microblaze/bits/atomic.h (__HAVE_64B_ATOMICS): Fix value
diff --git a/elf/elf.h b/elf/elf.h
index 78815e8..341cfa6 100644
--- a/elf/elf.h
+++ b/elf/elf.h
@@ -2362,6 +2362,20 @@ typedef Elf32_Addr Elf32_Conflict;
/* AArch64 relocs. */
#define R_AARCH64_NONE 0 /* No relocation. */
+
+/* ILP32 AArch64 relocs. */
+#define R_AARCH64_P32_ABS32 1 /* Direct 32 bit. */
+#define R_AARCH64_P32_COPY 180 /* Copy symbol at runtime. */
+#define R_AARCH64_P32_GLOB_DAT 181 /* Create GOT entry. */
+#define R_AARCH64_P32_JUMP_SLOT 182 /* Create PLT entry. */
+#define R_AARCH64_P32_RELATIVE 183 /* Adjust by program base. */
+#define R_AARCH64_P32_TLS_DTPMOD 184 /* Module number, 32 bit. */
+#define R_AARCH64_P32_TLS_DTPREL 185 /* Module-relative offset, 32 bit. */
+#define R_AARCH64_P32_TLS_TPREL 186 /* TP-relative offset, 32 bit. */
+#define R_AARCH64_P32_TLSDESC 187 /* TLS Descriptor. */
+#define R_AARCH64_P32_IRELATIVE 188 /* STT_GNU_IFUNC relocation. */
+
+/* LP64 AArch64 relocs. */
#define R_AARCH64_ABS64 257 /* Direct 64 bit. */
#define R_AARCH64_ABS32 258 /* Direct 32 bit. */
#define R_AARCH64_ABS16 259 /* Direct 16-bit. */
@@ -2479,9 +2493,9 @@ typedef Elf32_Addr Elf32_Conflict;
#define R_AARCH64_GLOB_DAT 1025 /* Create GOT entry. */
#define R_AARCH64_JUMP_SLOT 1026 /* Create PLT entry. */
#define R_AARCH64_RELATIVE 1027 /* Adjust by program base. */
-#define R_AARCH64_TLS_DTPMOD64 1028 /* Module number, 64 bit. */
-#define R_AARCH64_TLS_DTPREL64 1029 /* Module-relative offset, 64 bit. */
-#define R_AARCH64_TLS_TPREL64 1030 /* TP-relative offset, 64 bit. */
+#define R_AARCH64_TLS_DTPMOD 1028 /* Module number, 64 bit. */
+#define R_AARCH64_TLS_DTPREL 1029 /* Module-relative offset, 64 bit. */
+#define R_AARCH64_TLS_TPREL 1030 /* TP-relative offset, 64 bit. */
#define R_AARCH64_TLSDESC 1031 /* TLS Descriptor. */
#define R_AARCH64_IRELATIVE 1032 /* STT_GNU_IFUNC relocation. */
diff --git a/sysdeps/aarch64/dl-machine.h b/sysdeps/aarch64/dl-machine.h
index 6746437..acb090d 100644
--- a/sysdeps/aarch64/dl-machine.h
+++ b/sysdeps/aarch64/dl-machine.h
@@ -188,9 +188,9 @@ _dl_start_user: \n\
#define elf_machine_type_class(type) \
((((type) == R_AARCH64_JUMP_SLOT || \
- (type) == R_AARCH64_TLS_DTPMOD64 || \
- (type) == R_AARCH64_TLS_DTPREL64 || \
- (type) == R_AARCH64_TLS_TPREL64 || \
+ (type) == R_AARCH64_TLS_DTPMOD || \
+ (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))
@@ -314,7 +314,7 @@ elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc,
break;
}
- case R_AARCH64_TLS_DTPMOD64:
+ case R_AARCH64_TLS_DTPMOD:
#ifdef RTLD_BOOTSTRAP
*reloc_addr = 1;
#else
@@ -325,12 +325,12 @@ elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc,
#endif
break;
- case R_AARCH64_TLS_DTPREL64:
+ case R_AARCH64_TLS_DTPREL:
if (sym)
*reloc_addr = sym->st_value + reloc->r_addend;
break;
- case R_AARCH64_TLS_TPREL64:
+ case R_AARCH64_TLS_TPREL:
if (sym)
{
CHECK_STATIC_TLS (map, sym_map);
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 28 ++++++++++++++++++++++++++++
elf/elf.h | 20 +++++++++++++++++---
sysdeps/aarch64/bits/link.h | 6 +++---
sysdeps/aarch64/dl-machine.h | 37 ++++++++++++++++++++-----------------
4 files changed, 68 insertions(+), 23 deletions(-)
hooks/post-receive
--
GNU C Library master sources