* [PATCH 0/6] PowerPC64 ELFv2 PPC64_OPT_LOCALENTRY
@ 2017-06-01 13:04 Alan Modra
2017-06-01 13:08 ` [PATCH 1/6] PowerPC64, fix calls to _mcount Alan Modra
` (5 more replies)
0 siblings, 6 replies; 19+ messages in thread
From: Alan Modra @ 2017-06-01 13:04 UTC (permalink / raw)
To: libc-alpha
ELFv2 functions with localentry:0 are those with a single entry point,
ie. global entry == local entry, that have no requirement on r2 or
r12, and guarantee r2 is unchanged on return. Such an external
function can be called via the PLT without saving r2 or restoring it
on return, avoiding a common load-hit-store for small functions. The
optimization is attractive. The TOC pointer load-hit-store is a major
reason why calls to small functions that need no register saves, or
with shrink-wrap, no register saves on a fast path, are slow on
powerpc64le.
This patch series is the glibc part of this optimization, the checks
in ld.so necessary to ensure that functions with st_other localentry
non-zero are not called by code expecting localentry:0. Also, lots of
powerpc64 glibc assembly didn't use the proper localentry:0
designation for functions that don't use r2, so the series fixes that
too, and some other assorted problems I noticed along the way. Many
of the mem and str functions benefit.
Note that building a multiarch glibc kills this optimization for most
functions. IFUNCs can't be called with the optimized stub without
changing the ABI.
Regression tested on powerpc64le using --with-cpu=power8,
--with-cpu=power7, and --with-cpu=power8 --enable-multiarch.
Alan Modra (6):
PowerPC64, fix calls to _mcount
PowerPC64 FRAME_PARM_SAVE
PowerPC64 sysdep.h tidy
PowerPC64 strncpy, stpncpy and strstr fixes
PowerPC64 ENTRY_TOCLESS
PowerPC64 ELFv2 PPC64_OPT_LOCALENTRY
ChangeLog | 195 +++++++++++++++++++
elf/dl-runtime.c | 3 +-
elf/elf.h | 3 +-
elf/testobj6.c | 3 +
sysdeps/aarch64/dl-machine.h | 1 +
sysdeps/alpha/dl-machine.h | 5 +-
sysdeps/arm/dl-machine.h | 1 +
sysdeps/generic/dl-machine.h | 7 +-
sysdeps/hppa/dl-machine.h | 5 +-
sysdeps/i386/dl-machine.h | 1 +
sysdeps/ia64/dl-machine.h | 3 +-
sysdeps/m68k/dl-machine.h | 1 +
sysdeps/microblaze/dl-machine.h | 1 +
sysdeps/mips/dl-machine.h | 1 +
sysdeps/nios2/dl-machine.h | 1 +
sysdeps/powerpc/powerpc32/dl-machine.h | 1 +
sysdeps/powerpc/powerpc64/a2/memcpy.S | 2 +-
sysdeps/powerpc/powerpc64/addmul_1.S | 2 +-
sysdeps/powerpc/powerpc64/cell/memcpy.S | 2 +-
sysdeps/powerpc/powerpc64/dl-machine.c | 22 ++-
sysdeps/powerpc/powerpc64/dl-machine.h | 54 +++---
sysdeps/powerpc/powerpc64/dl-trampoline.S | 4 +-
sysdeps/powerpc/powerpc64/fpu/s_ceil.S | 2 +-
sysdeps/powerpc/powerpc64/fpu/s_ceilf.S | 2 +-
sysdeps/powerpc/powerpc64/fpu/s_copysign.S | 2 +-
sysdeps/powerpc/powerpc64/fpu/s_copysignl.S | 2 +-
sysdeps/powerpc/powerpc64/fpu/s_fabsl.S | 2 +-
sysdeps/powerpc/powerpc64/fpu/s_floor.S | 2 +-
sysdeps/powerpc/powerpc64/fpu/s_floorf.S | 2 +-
sysdeps/powerpc/powerpc64/fpu/s_isnan.S | 2 +-
sysdeps/powerpc/powerpc64/fpu/s_llrint.S | 2 +-
sysdeps/powerpc/powerpc64/fpu/s_llrintf.S | 2 +-
sysdeps/powerpc/powerpc64/fpu/s_nearbyint.S | 2 +-
sysdeps/powerpc/powerpc64/fpu/s_nearbyintf.S | 2 +-
sysdeps/powerpc/powerpc64/fpu/s_rint.S | 2 +-
sysdeps/powerpc/powerpc64/fpu/s_rintf.S | 2 +-
sysdeps/powerpc/powerpc64/fpu/s_round.S | 2 +-
sysdeps/powerpc/powerpc64/fpu/s_roundf.S | 2 +-
sysdeps/powerpc/powerpc64/fpu/s_trunc.S | 2 +-
sysdeps/powerpc/powerpc64/fpu/s_truncf.S | 2 +-
sysdeps/powerpc/powerpc64/lshift.S | 2 +-
sysdeps/powerpc/powerpc64/memcpy.S | 2 +-
sysdeps/powerpc/powerpc64/memset.S | 2 +-
sysdeps/powerpc/powerpc64/mul_1.S | 2 +-
.../powerpc/powerpc64/multiarch/stpncpy-power7.S | 3 +
.../powerpc/powerpc64/multiarch/stpncpy-power8.S | 5 +
.../powerpc/powerpc64/multiarch/strncpy-power7.S | 3 +
.../powerpc/powerpc64/multiarch/strncpy-power8.S | 3 +
.../powerpc/powerpc64/multiarch/strrchr-power8.S | 21 +-
.../powerpc/powerpc64/multiarch/strstr-power7.S | 5 +
sysdeps/powerpc/powerpc64/power4/memcmp.S | 2 +-
sysdeps/powerpc/powerpc64/power4/memcpy.S | 2 +-
sysdeps/powerpc/powerpc64/power4/memset.S | 4 +-
sysdeps/powerpc/powerpc64/power4/strncmp.S | 2 +-
sysdeps/powerpc/powerpc64/power5+/fpu/s_ceil.S | 2 +-
sysdeps/powerpc/powerpc64/power5+/fpu/s_ceilf.S | 2 +-
sysdeps/powerpc/powerpc64/power5+/fpu/s_floor.S | 2 +-
sysdeps/powerpc/powerpc64/power5+/fpu/s_floorf.S | 2 +-
sysdeps/powerpc/powerpc64/power5+/fpu/s_llround.S | 2 +-
sysdeps/powerpc/powerpc64/power5+/fpu/s_round.S | 2 +-
sysdeps/powerpc/powerpc64/power5+/fpu/s_roundf.S | 2 +-
sysdeps/powerpc/powerpc64/power5+/fpu/s_trunc.S | 2 +-
sysdeps/powerpc/powerpc64/power5+/fpu/s_truncf.S | 2 +-
sysdeps/powerpc/powerpc64/power5/fpu/s_isnan.S | 2 +-
sysdeps/powerpc/powerpc64/power6/fpu/s_copysign.S | 2 +-
sysdeps/powerpc/powerpc64/power6/fpu/s_isnan.S | 2 +-
sysdeps/powerpc/powerpc64/power6/memcpy.S | 2 +-
sysdeps/powerpc/powerpc64/power6/memset.S | 4 +-
sysdeps/powerpc/powerpc64/power6x/fpu/s_isnan.S | 2 +-
sysdeps/powerpc/powerpc64/power6x/fpu/s_llrint.S | 2 +-
sysdeps/powerpc/powerpc64/power6x/fpu/s_llround.S | 2 +-
sysdeps/powerpc/powerpc64/power7/add_n.S | 2 +-
sysdeps/powerpc/powerpc64/power7/fpu/s_finite.S | 2 +-
sysdeps/powerpc/powerpc64/power7/fpu/s_isinf.S | 2 +-
sysdeps/powerpc/powerpc64/power7/fpu/s_isnan.S | 2 +-
sysdeps/powerpc/powerpc64/power7/memchr.S | 2 +-
sysdeps/powerpc/powerpc64/power7/memcmp.S | 2 +-
sysdeps/powerpc/powerpc64/power7/memcpy.S | 2 +-
sysdeps/powerpc/powerpc64/power7/memmove.S | 4 +-
sysdeps/powerpc/powerpc64/power7/mempcpy.S | 2 +-
sysdeps/powerpc/powerpc64/power7/memrchr.S | 2 +-
sysdeps/powerpc/powerpc64/power7/memset.S | 4 +-
sysdeps/powerpc/powerpc64/power7/rawmemchr.S | 2 +-
sysdeps/powerpc/powerpc64/power7/strcasecmp.S | 3 +-
sysdeps/powerpc/powerpc64/power7/strchr.S | 2 +-
sysdeps/powerpc/powerpc64/power7/strchrnul.S | 2 +-
sysdeps/powerpc/powerpc64/power7/strcmp.S | 2 +-
sysdeps/powerpc/powerpc64/power7/strlen.S | 2 +-
sysdeps/powerpc/powerpc64/power7/strncmp.S | 2 +-
sysdeps/powerpc/powerpc64/power7/strncpy.S | 9 +-
sysdeps/powerpc/powerpc64/power7/strnlen.S | 2 +-
sysdeps/powerpc/powerpc64/power7/strrchr.S | 2 +-
sysdeps/powerpc/powerpc64/power7/strstr.S | 16 +-
sysdeps/powerpc/powerpc64/power8/fpu/e_expf.S | 2 +-
sysdeps/powerpc/powerpc64/power8/fpu/s_cosf.S | 2 +-
sysdeps/powerpc/powerpc64/power8/fpu/s_finite.S | 2 +-
sysdeps/powerpc/powerpc64/power8/fpu/s_isinf.S | 2 +-
sysdeps/powerpc/powerpc64/power8/fpu/s_isnan.S | 2 +-
sysdeps/powerpc/powerpc64/power8/fpu/s_llrint.S | 2 +-
sysdeps/powerpc/powerpc64/power8/fpu/s_llround.S | 2 +-
sysdeps/powerpc/powerpc64/power8/fpu/s_sinf.S | 2 +-
sysdeps/powerpc/powerpc64/power8/memcmp.S | 2 +-
sysdeps/powerpc/powerpc64/power8/memset.S | 4 +-
sysdeps/powerpc/powerpc64/power8/strcasestr.S | 2 +-
sysdeps/powerpc/powerpc64/power8/strchr.S | 2 +-
sysdeps/powerpc/powerpc64/power8/strcmp.S | 2 +-
sysdeps/powerpc/powerpc64/power8/strcpy.S | 2 +-
sysdeps/powerpc/powerpc64/power8/strlen.S | 2 +-
sysdeps/powerpc/powerpc64/power8/strncmp.S | 2 +-
sysdeps/powerpc/powerpc64/power8/strncpy.S | 10 +-
sysdeps/powerpc/powerpc64/power8/strnlen.S | 2 +-
sysdeps/powerpc/powerpc64/power8/strrchr.S | 2 +-
sysdeps/powerpc/powerpc64/power8/strspn.S | 2 +-
sysdeps/powerpc/powerpc64/power9/strcmp.S | 2 +-
sysdeps/powerpc/powerpc64/power9/strncmp.S | 2 +-
sysdeps/powerpc/powerpc64/ppc-mcount.S | 4 +-
sysdeps/powerpc/powerpc64/start.S | 4 +-
sysdeps/powerpc/powerpc64/strchr.S | 2 +-
sysdeps/powerpc/powerpc64/strcmp.S | 2 +-
sysdeps/powerpc/powerpc64/strlen.S | 2 +-
sysdeps/powerpc/powerpc64/strncmp.S | 2 +-
sysdeps/powerpc/powerpc64/sysdep.h | 213 ++++++++++-----------
sysdeps/s390/s390-32/dl-machine.h | 1 +
sysdeps/s390/s390-64/dl-machine.h | 1 +
sysdeps/sh/dl-machine.h | 1 +
sysdeps/sparc/sparc32/dl-machine.h | 1 +
sysdeps/sparc/sparc64/dl-machine.h | 1 +
sysdeps/tile/dl-machine.h | 3 +-
.../sysv/linux/powerpc/powerpc64/makecontext.S | 26 +--
sysdeps/x86_64/dl-machine.h | 1 +
130 files changed, 562 insertions(+), 274 deletions(-)
--
Alan Modra
Australia Development Lab, IBM
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 1/6] PowerPC64, fix calls to _mcount
2017-06-01 13:04 [PATCH 0/6] PowerPC64 ELFv2 PPC64_OPT_LOCALENTRY Alan Modra
@ 2017-06-01 13:08 ` Alan Modra
2017-06-12 18:07 ` Tulio Magno Quites Machado Filho
2017-06-01 13:09 ` [PATCH 2/6] PowerPC64 FRAME_PARM_SAVE Alan Modra
` (4 subsequent siblings)
5 siblings, 1 reply; 19+ messages in thread
From: Alan Modra @ 2017-06-01 13:08 UTC (permalink / raw)
To: libc-alpha
The macros used in assembly were broken on powerpc64 ELFv1.
* sysdeps/powerpc/powerpc64/sysdep.h: (call_mcount_parm_offset): Delete.
(SAVE_ARG, REST_ARG, CFI_SAVE_ARG): Correct.
diff --git a/sysdeps/powerpc/powerpc64/sysdep.h b/sysdeps/powerpc/powerpc64/sysdep.h
index db7c1d7..409734a 100644
--- a/sysdeps/powerpc/powerpc64/sysdep.h
+++ b/sysdeps/powerpc/powerpc64/sysdep.h
@@ -58,29 +58,24 @@
#endif
/* Support macros for CALL_MCOUNT. */
-#if _CALL_ELF == 2
-#define call_mcount_parm_offset (-64)
-#else
-#define call_mcount_parm_offset FRAME_PARM_SAVE
-#endif
.macro SAVE_ARG NARG
.if \NARG
SAVE_ARG \NARG-1
- std 2+\NARG,call_mcount_parm_offset-8+8*(\NARG)(1)
+ std 2+\NARG,-FRAME_MIN_SIZE_PARM+FRAME_PARM_SAVE-8+8*(\NARG)(1)
.endif
.endm
.macro REST_ARG NARG
.if \NARG
REST_ARG \NARG-1
- ld 2+\NARG,FRAME_MIN_SIZE_PARM+call_mcount_parm_offset-8+8*(\NARG)(1)
+ ld 2+\NARG,FRAME_PARM_SAVE-8+8*(\NARG)(1)
.endif
.endm
.macro CFI_SAVE_ARG NARG
.if \NARG
CFI_SAVE_ARG \NARG-1
- cfi_offset(2+\NARG,call_mcount_parm_offset-8+8*(\NARG))
+ cfi_offset(2+\NARG,-FRAME_MIN_SIZE_PARM+FRAME_PARM_SAVE-8+8*(\NARG))
.endif
.endm
--
Alan Modra
Australia Development Lab, IBM
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 3/6] PowerPC64 sysdep.h tidy
2017-06-01 13:04 [PATCH 0/6] PowerPC64 ELFv2 PPC64_OPT_LOCALENTRY Alan Modra
2017-06-01 13:08 ` [PATCH 1/6] PowerPC64, fix calls to _mcount Alan Modra
2017-06-01 13:09 ` [PATCH 2/6] PowerPC64 FRAME_PARM_SAVE Alan Modra
@ 2017-06-01 13:09 ` Alan Modra
2017-06-12 18:12 ` Tulio Magno Quites Machado Filho
2017-06-01 13:10 ` [PATCH 4/6] strncpy, stpncpy and strstr fixes Alan Modra
` (2 subsequent siblings)
5 siblings, 1 reply; 19+ messages in thread
From: Alan Modra @ 2017-06-01 13:09 UTC (permalink / raw)
To: libc-alpha
.align on some targets takes a byte alignment, on others like powerpc,
log2 of the byte alignment. It's a good idea to avoid .align,
particularly since x86 and powerpc are different. This patch fixes
the occurrences of .align in powerpc64/sysdep.h, renames DOT_LABEL
since the macro doesn't have anything to do with adding dots, removes
extraneous semicolons, and fixes some formatting.
* sysdeps/powerpc/powerpc64/sysdep.h: Formatting.
(FUNC_LABEL): Rename from DOT_LABEL.
(ENTRY_1): Use FUNC_LABEL and remove leading space from label.
Use .p2align rather than .align.
(TRACEBACK, TRACEBACK_MASK): Use .p2align rather than .align.
(ABORT_TRANSACTION): Likewise.
(ENTRY_1, ENTRY_2, END_2, LOCALENTRY): Remove unnecessary semicolons,
particularly at end. Add semicolon at invocation as necessary.
(TRACEBACK, TRACEBACK_MASK, PSEUDO, PSEUDO_NOERRNO): Likewise.
(PSEUDO_ERRVAL, PPC64_LOAD_FUNCPTR, OPD_ENT): Likewise.
* sysdeps/powerpc/powerpc64/multiarch/strrchr-power8.S (ENTRY,
END): Adjust to suit.
diff --git a/sysdeps/powerpc/powerpc64/multiarch/strrchr-power8.S b/sysdeps/powerpc/powerpc64/multiarch/strrchr-power8.S
index 23365a1..a895dc6 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/strrchr-power8.S
+++ b/sysdeps/powerpc/powerpc64/multiarch/strrchr-power8.S
@@ -21,7 +21,7 @@
#undef ENTRY
#define ENTRY(name) \
.section ".text"; \
- ENTRY_2(__strrchr_power8) \
+ ENTRY_2(__strrchr_power8); \
.align ALIGNARG(2); \
BODY_LABEL(__strrchr_power8): \
cfi_startproc; \
@@ -30,7 +30,7 @@
#undef END
#define END(name) \
cfi_endproc; \
- TRACEBACK(__strrchr_power8) \
+ TRACEBACK(__strrchr_power8); \
END_2(__strrchr_power8)
#undef libc_hidden_builtin_def
diff --git a/sysdeps/powerpc/powerpc64/sysdep.h b/sysdeps/powerpc/powerpc64/sysdep.h
index 4347323..860420e 100644
--- a/sysdeps/powerpc/powerpc64/sysdep.h
+++ b/sysdeps/powerpc/powerpc64/sysdep.h
@@ -106,25 +106,25 @@
# define OPD_ENT(name) .quad BODY_LABEL (name), .TOC.@tocbase, 0
#endif
-#define ENTRY_1(name) \
+#define ENTRY_1(name) \
.type BODY_LABEL(name),@function; \
.globl name; \
.section ".opd","aw"; \
- .align 3; \
-name##: OPD_ENT (name); \
- .previous;
+ .p2align 3;FUNC_LABEL(name): \
+ OPD_ENT (name); \
+ .previous
-#define DOT_LABEL(X) X
+#define FUNC_LABEL(X) X
#define BODY_LABEL(X) .LY##X
-#define ENTRY_2(name) \
+#define ENTRY_2(name) \
.type name,@function; \
ENTRY_1(name)
-#define END_2(name) \
+#define END_2(name) \
.size name,.-BODY_LABEL(name); \
- .size BODY_LABEL(name),.-BODY_LABEL(name);
+ .size BODY_LABEL(name),.-BODY_LABEL(name)
#define LOCALENTRY(name)
-#else /* _CALL_ELF */
+#else /* _CALL_ELF == 2 */
/* Macro to prepare for calling via a function pointer. */
.macro PPC64_LOAD_FUNCPTR PTR
@@ -132,23 +132,23 @@ name##: OPD_ENT (name); \
mtctr r12
.endm
-#define DOT_LABEL(X) X
+#define FUNC_LABEL(X) X
#define BODY_LABEL(X) X
-#define ENTRY_2(name) \
+#define ENTRY_2(name) \
.globl name; \
- .type name,@function;
-#define END_2(name) \
- .size name,.-name;
-#define LOCALENTRY(name) \
-1: addis r2,r12,.TOC.-1b@ha; \
- addi r2,r2,.TOC.-1b@l; \
- .localentry name,.-name;
+ .type name,@function
+#define END_2(name) \
+ .size name,.-name
+#define LOCALENTRY(name) \
+1: addis r2,r12,.TOC.-1b@ha; \
+ addi r2,r2,.TOC.-1b@l; \
+ .localentry name,.-name
#endif /* _CALL_ELF */
#define ENTRY(name) \
.section ".text"; \
- ENTRY_2(name) \
+ ENTRY_2(name); \
.align ALIGNARG(2); \
BODY_LABEL(name): \
cfi_startproc; \
@@ -167,7 +167,7 @@ BODY_LABEL(name): \
past a 2^alignt boundary. */
#define EALIGN(name, alignt, words) \
.section ".text"; \
- ENTRY_2(name) \
+ ENTRY_2(name); \
.align ALIGNARG(alignt); \
EALIGN_W_##words; \
BODY_LABEL(name): \
@@ -220,7 +220,7 @@ LT_LABEL(name): ; \
LT_LABELSUFFIX(name,_name_start): ;\
.ascii stringify(name) ; \
LT_LABELSUFFIX(name,_name_end): ; \
- .align 2 ;
+ .p2align 2
#define TRACEBACK_MASK(name,mask) \
LT_LABEL(name): ; \
@@ -231,19 +231,19 @@ LT_LABEL(name): ; \
LT_LABELSUFFIX(name,_name_start): ;\
.ascii stringify(name) ; \
LT_LABELSUFFIX(name,_name_end): ; \
- .align 2 ;
+ .p2align 2
/* END generates Traceback tables */
#undef END
#define END(name) \
cfi_endproc; \
- TRACEBACK(name) \
+ TRACEBACK(name); \
END_2(name)
/* This form supports more informative traceback tables */
#define END_GEN_TB(name,mask) \
cfi_endproc; \
- TRACEBACK_MASK(name,mask) \
+ TRACEBACK_MASK(name,mask); \
END_2(name)
#if !IS_IN(rtld) && defined (ENABLE_LOCK_ELISION)
@@ -255,7 +255,7 @@ LT_LABELSUFFIX(name,_name_end): ; \
beq 1f; \
li 11,_ABORT_SYSCALL; \
tabort. 11; \
- .align 4; \
+ .p2align 4; \
1:
#else
# define ABORT_TRANSACTION
@@ -268,12 +268,12 @@ LT_LABELSUFFIX(name,_name_end): ; \
/* ppc64 is always PIC */
#undef JUMPTARGET
-#define JUMPTARGET(name) DOT_LABEL(name)
+#define JUMPTARGET(name) FUNC_LABEL(name)
#define PSEUDO(name, syscall_name, args) \
- .section ".text"; \
- ENTRY (name) \
- DO_CALL (SYS_ify (syscall_name));
+ .section ".text"; \
+ ENTRY (name); \
+ DO_CALL (SYS_ify (syscall_name))
#ifdef SHARED
#define TAIL_CALL_SYSCALL_ERROR \
@@ -314,9 +314,9 @@ LT_LABELSUFFIX(name,_name_end): ; \
END (name)
#define PSEUDO_NOERRNO(name, syscall_name, args) \
- .section ".text"; \
- ENTRY (name) \
- DO_CALL (SYS_ify (syscall_name));
+ .section ".text"; \
+ ENTRY (name); \
+ DO_CALL (SYS_ify (syscall_name))
#define PSEUDO_RET_NOERRNO \
blr
@@ -328,9 +328,9 @@ LT_LABELSUFFIX(name,_name_end): ; \
END (name)
#define PSEUDO_ERRVAL(name, syscall_name, args) \
- .section ".text"; \
- ENTRY (name) \
- DO_CALL (SYS_ify (syscall_name));
+ .section ".text"; \
+ ENTRY (name); \
+ DO_CALL (SYS_ify (syscall_name))
#define PSEUDO_RET_ERRVAL \
blr
@@ -346,53 +346,53 @@ LT_LABELSUFFIX(name,_name_end): ; \
#if _CALL_ELF != 2
#define PPC64_LOAD_FUNCPTR(ptr) \
- "ld 12,0(" #ptr ");\n" \
- "ld 2,8(" #ptr ");\n" \
- "mtctr 12;\n" \
- "ld 11,16(" #ptr ");"
+ "ld 12,0(" #ptr ")\n" \
+ "ld 2,8(" #ptr ")\n" \
+ "mtctr 12\n" \
+ "ld 11,16(" #ptr ")"
#ifdef USE_PPC64_OVERLAPPING_OPD
-# define OPD_ENT(name) ".quad " BODY_PREFIX #name ", .TOC.@tocbase;"
+# define OPD_ENT(name) ".quad " BODY_PREFIX #name ", .TOC.@tocbase"
#else
-# define OPD_ENT(name) ".quad " BODY_PREFIX #name ", .TOC.@tocbase, 0;"
+# define OPD_ENT(name) ".quad " BODY_PREFIX #name ", .TOC.@tocbase, 0"
#endif
#define ENTRY_1(name) \
- ".type " BODY_PREFIX #name ",@function;\n" \
- ".globl " #name ";\n" \
- ".pushsection \".opd\",\"aw\";\n" \
- ".align 3;\n" \
+ ".type " BODY_PREFIX #name ",@function\n" \
+ ".globl " #name "\n" \
+ ".pushsection \".opd\",\"aw\"\n" \
+ ".p2align 3\n" \
#name ":\n" \
OPD_ENT (name) "\n" \
- ".popsection;"
+ ".popsection"
#define DOT_PREFIX ""
#define BODY_PREFIX ".LY"
#define ENTRY_2(name) \
- ".type " #name ",@function;\n" \
+ ".type " #name ",@function\n" \
ENTRY_1(name)
#define END_2(name) \
- ".size " #name ",.-" BODY_PREFIX #name ";\n" \
- ".size " BODY_PREFIX #name ",.-" BODY_PREFIX #name ";"
+ ".size " #name ",.-" BODY_PREFIX #name "\n" \
+ ".size " BODY_PREFIX #name ",.-" BODY_PREFIX #name
#define LOCALENTRY(name)
#else /* _CALL_ELF */
#define PPC64_LOAD_FUNCPTR(ptr) \
- "mr 12," #ptr ";\n" \
- "mtctr 12;"
+ "mr 12," #ptr "\n" \
+ "mtctr 12"
#define DOT_PREFIX ""
#define BODY_PREFIX ""
#define ENTRY_2(name) \
- ".type " #name ",@function;\n" \
- ".globl " #name ";"
+ ".type " #name ",@function\n" \
+ ".globl " #name
#define END_2(name) \
- ".size " #name ",.-" #name ";"
+ ".size " #name ",.-" #name
#define LOCALENTRY(name) \
- "1: addis 2,12,.TOC.-1b@ha;\n" \
- "addi 2,2,.TOC.-1b@l;\n" \
- ".localentry " #name ",.-" #name ";"
+ "1: addis 2,12,.TOC.-1b@ha\n" \
+ "addi 2,2,.TOC.-1b@l\n" \
+ ".localentry " #name ",.-" #name
#endif /* _CALL_ELF */
--
Alan Modra
Australia Development Lab, IBM
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 2/6] PowerPC64 FRAME_PARM_SAVE
2017-06-01 13:04 [PATCH 0/6] PowerPC64 ELFv2 PPC64_OPT_LOCALENTRY Alan Modra
2017-06-01 13:08 ` [PATCH 1/6] PowerPC64, fix calls to _mcount Alan Modra
@ 2017-06-01 13:09 ` Alan Modra
2017-06-12 18:07 ` Tulio Magno Quites Machado Filho
2017-06-01 13:09 ` [PATCH 3/6] PowerPC64 sysdep.h tidy Alan Modra
` (3 subsequent siblings)
5 siblings, 1 reply; 19+ messages in thread
From: Alan Modra @ 2017-06-01 13:09 UTC (permalink / raw)
To: libc-alpha
This is just a tidy. I think FRAME_PARM[1-9]_SAVE confuse the code,
particularly FRAME_PARM9_SAVE. There are only 8 parameter save slots!
* sysdeps/powerpc/powerpc64/sysdep.h: (FRAME_BACKCHAIN,
FRAME_CR_SAVE, FRAME_LR_SAVE): Move out of conditional.
(FRAME_PARM1_SAVE, FRAME_PARM2_SAVE, FRAME_PARM3_SAVE,
FRAME_PARM4_SAVE, FRAME_PARM5_SAVE, FRAME_PARM6_SAVE,
FRAME_PARM7_SAVE, FRAME_PARM8_SAVE, FRAME_PARM9_SAVE): Delete.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S: Replace
uses of FRAME_PARM[1-9]_SAVE with FRAME_PARM_SAVE plus offset.
diff --git a/sysdeps/powerpc/powerpc64/sysdep.h b/sysdeps/powerpc/powerpc64/sysdep.h
index 409734a..4347323 100644
--- a/sysdeps/powerpc/powerpc64/sysdep.h
+++ b/sysdeps/powerpc/powerpc64/sysdep.h
@@ -21,40 +21,19 @@
#ifdef __ASSEMBLER__
/* Stack frame offsets. */
-#if _CALL_ELF != 2
-#define FRAME_MIN_SIZE 112
-#define FRAME_MIN_SIZE_PARM 112
#define FRAME_BACKCHAIN 0
#define FRAME_CR_SAVE 8
#define FRAME_LR_SAVE 16
+#if _CALL_ELF != 2
+#define FRAME_MIN_SIZE 112
+#define FRAME_MIN_SIZE_PARM 112
#define FRAME_TOC_SAVE 40
#define FRAME_PARM_SAVE 48
-#define FRAME_PARM1_SAVE 48
-#define FRAME_PARM2_SAVE 56
-#define FRAME_PARM3_SAVE 64
-#define FRAME_PARM4_SAVE 72
-#define FRAME_PARM5_SAVE 80
-#define FRAME_PARM6_SAVE 88
-#define FRAME_PARM7_SAVE 96
-#define FRAME_PARM8_SAVE 104
-#define FRAME_PARM9_SAVE 112
#else
#define FRAME_MIN_SIZE 32
#define FRAME_MIN_SIZE_PARM 96
-#define FRAME_BACKCHAIN 0
-#define FRAME_CR_SAVE 8
-#define FRAME_LR_SAVE 16
#define FRAME_TOC_SAVE 24
#define FRAME_PARM_SAVE 32
-#define FRAME_PARM1_SAVE 32
-#define FRAME_PARM2_SAVE 40
-#define FRAME_PARM3_SAVE 48
-#define FRAME_PARM4_SAVE 56
-#define FRAME_PARM5_SAVE 64
-#define FRAME_PARM6_SAVE 72
-#define FRAME_PARM7_SAVE 80
-#define FRAME_PARM8_SAVE 88
-#define FRAME_PARM9_SAVE 96
#endif
/* Support macros for CALL_MCOUNT. */
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S
index ff2ed26..da12d19 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S
@@ -23,20 +23,20 @@
#include "ucontext_i.h"
#include <asm/errno.h>
-ENTRY(__makecontext)
+ENTRY (__makecontext)
CALL_MCOUNT 3
/* Save parameters into the parameter save area of callers frame. */
- std r3,FRAME_PARM1_SAVE(r1) /* ucontext_t *ucp */
- std r4,FRAME_PARM2_SAVE(r1) /* void (*func)(void) */
- std r5,FRAME_PARM3_SAVE(r1) /* int argc */
- std r6,FRAME_PARM4_SAVE(r1) /* ... */
- std r7,FRAME_PARM5_SAVE(r1)
- std r8,FRAME_PARM6_SAVE(r1)
- std r9,FRAME_PARM7_SAVE(r1)
- std r10,FRAME_PARM8_SAVE(r1)
+ std r3,FRAME_PARM_SAVE+0(r1) /* ucontext_t *ucp */
+ std r4,FRAME_PARM_SAVE+8(r1) /* void (*func)(void) */
+ std r5,FRAME_PARM_SAVE+16(r1) /* int argc */
+ std r6,FRAME_PARM_SAVE+24(r1) /* ... */
+ std r7,FRAME_PARM_SAVE+32(r1)
+ std r8,FRAME_PARM_SAVE+40(r1)
+ std r9,FRAME_PARM_SAVE+48(r1)
+ std r10,FRAME_PARM_SAVE+56(r1)
mflr r0
/* Get the address of the target functions first parameter. */
- addi r6,r1,FRAME_PARM4_SAVE
+ addi r6,r1,FRAME_PARM_SAVE+24
std r0,FRAME_LR_SAVE(r1)
cfi_offset (lr, FRAME_LR_SAVE)
stdu r1,-128(r1)
@@ -55,7 +55,7 @@ ENTRY(__makecontext)
clrrdi r7,r7,4
li r0,0
stdu r0,-64(r7)
- std r3,FRAME_PARM1_SAVE(r7) /* Store context in dummy parm1. */
+ std r3,FRAME_PARM_SAVE(r7) /* Store context in dummy parm1. */
mflr r0
std r2,FRAME_TOC_SAVE(r7) /* Store the TOC pointer for later. */
std r0,FRAME_LR_SAVE(r7)
@@ -102,7 +102,7 @@ L(parmloop2):
addi r0,r5,-8
ble cr1,L(noparms)
mtctr r0
- addi r9,r8,FRAME_PARM9_SAVE-8
+ addi r9,r8,FRAME_PARM_SAVE+64-8
L(parmloop):
ldu r0,8(r7)
stdu r0,8(r9)
@@ -148,7 +148,7 @@ L(noparms):
L(exitcode):
/* Recover the ucontext and TOC from the dummy frame. */
ld r1,FRAME_BACKCHAIN(r1) /* Unstack the parameter save area frame. */
- ld r3,FRAME_PARM1_SAVE(r1)
+ ld r3,FRAME_PARM_SAVE(r1)
ld r2,FRAME_TOC_SAVE(r1)
ld r3,UCONTEXT_LINK(r3) /* Load the resume context. */
cmpdi r3,0
--
Alan Modra
Australia Development Lab, IBM
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 4/6] strncpy, stpncpy and strstr fixes
2017-06-01 13:04 [PATCH 0/6] PowerPC64 ELFv2 PPC64_OPT_LOCALENTRY Alan Modra
` (2 preceding siblings ...)
2017-06-01 13:09 ` [PATCH 3/6] PowerPC64 sysdep.h tidy Alan Modra
@ 2017-06-01 13:10 ` Alan Modra
2017-06-12 19:55 ` Tulio Magno Quites Machado Filho
2017-06-01 13:11 ` [PATCH 5/6] PowerPC64 ENTRY_TOCLESS Alan Modra
2017-06-01 13:11 ` [PATCH 6/6] PowerPC64 ELFv2 PPC64_OPT_LOCALENTRY Alan Modra
5 siblings, 1 reply; 19+ messages in thread
From: Alan Modra @ 2017-06-01 13:10 UTC (permalink / raw)
To: libc-alpha
Makes __stpncpy_power8 call __memset_power8 directly rather than via an
IFUNC. Fixes a missing _mcount, and removes some redundant NOPS. The
*_is_local defines are also used in a followup patch.
* sysdeps/powerpc/powerpc64/multiarch/strncpy-power7.S: Define
MEMSET_is_local.
* sysdeps/powerpc/powerpc64/multiarch/strncpy-power8.S: Likewise.
* sysdeps/powerpc/powerpc64/multiarch/stpncpy-power7.S: Likewise.
* sysdeps/powerpc/powerpc64/multiarch/stpncpy-power8.S: Likewise.
Define MEMSET.
* sysdeps/powerpc/powerpc64/multiarch/strstr-power7.S: Define
STRLEN_is_local, STRNLEN_is_local, and STRCHR_is_local.
* sysdeps/powerpc/powerpc64/power7/strstr.S: Likewise. Don't add
nop after local calls.
* sysdeps/powerpc/powerpc64/power7/strncpy.S: Define MEMSET_is_local.
Don't add nop after local call.
* sysdeps/powerpc/powerpc64/power8/strncpy.S: Likewise. Add missing
CALL_MCOUNT.
diff --git a/sysdeps/powerpc/powerpc64/multiarch/stpncpy-power7.S b/sysdeps/powerpc/powerpc64/multiarch/stpncpy-power7.S
index 6636b01..6e6fa3e 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/stpncpy-power7.S
+++ b/sysdeps/powerpc/powerpc64/multiarch/stpncpy-power7.S
@@ -26,5 +26,8 @@
#define libc_hidden_builtin_def(name)
#define MEMSET __memset_power7
+#ifdef SHARED
+#define MEMSET_is_local
+#endif
#include <sysdeps/powerpc/powerpc64/power7/stpncpy.S>
diff --git a/sysdeps/powerpc/powerpc64/multiarch/stpncpy-power8.S b/sysdeps/powerpc/powerpc64/multiarch/stpncpy-power8.S
index 6ce706a..9663659 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/stpncpy-power8.S
+++ b/sysdeps/powerpc/powerpc64/multiarch/stpncpy-power8.S
@@ -25,4 +25,9 @@
#undef libc_hidden_builtin_def
#define libc_hidden_builtin_def(name)
+#define MEMSET __memset_power8
+#ifdef SHARED
+#define MEMSET_is_local
+#endif
+
#include <sysdeps/powerpc/powerpc64/power8/stpncpy.S>
diff --git a/sysdeps/powerpc/powerpc64/multiarch/strncpy-power7.S b/sysdeps/powerpc/powerpc64/multiarch/strncpy-power7.S
index 03f7f83..a36e5dd 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/strncpy-power7.S
+++ b/sysdeps/powerpc/powerpc64/multiarch/strncpy-power7.S
@@ -24,5 +24,8 @@
#define libc_hidden_builtin_def(name)
#define MEMSET __memset_power7
+#ifdef SHARED
+#define MEMSET_is_local
+#endif
#include <sysdeps/powerpc/powerpc64/power7/strncpy.S>
diff --git a/sysdeps/powerpc/powerpc64/multiarch/strncpy-power8.S b/sysdeps/powerpc/powerpc64/multiarch/strncpy-power8.S
index 17117eb..3edb2c6 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/strncpy-power8.S
+++ b/sysdeps/powerpc/powerpc64/multiarch/strncpy-power8.S
@@ -25,5 +25,8 @@
/* memset is used to pad the end of the string. */
#define MEMSET __memset_power8
+#ifdef SHARED
+#define MEMSET_is_local
+#endif
#include <sysdeps/powerpc/powerpc64/power8/strncpy.S>
diff --git a/sysdeps/powerpc/powerpc64/multiarch/strstr-power7.S b/sysdeps/powerpc/powerpc64/multiarch/strstr-power7.S
index 3991df7..900d3be 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/strstr-power7.S
+++ b/sysdeps/powerpc/powerpc64/multiarch/strstr-power7.S
@@ -26,5 +26,10 @@
#define STRLEN __strlen_power7
#define STRNLEN __strnlen_power7
#define STRCHR __strchr_power7
+#ifdef SHARED
+#define STRLEN_is_local
+#define STRNLEN_is_local
+#define STRCHR_is_local
+#endif
#include <sysdeps/powerpc/powerpc64/power7/strstr.S>
diff --git a/sysdeps/powerpc/powerpc64/power7/strncpy.S b/sysdeps/powerpc/powerpc64/power7/strncpy.S
index 0224f74..88d7979 100644
--- a/sysdeps/powerpc/powerpc64/power7/strncpy.S
+++ b/sysdeps/powerpc/powerpc64/power7/strncpy.S
@@ -59,6 +59,7 @@
/* For builds with no IFUNC support, local calls should be made to internal
GLIBC symbol (created by libc_hidden_builtin_def). */
# ifdef SHARED
+# define MEMSET_is_local
# define MEMSET __GI_memset
# else
# define MEMSET memset
@@ -223,7 +224,9 @@ L(zeroFill):
li r4, 0 /* zero fill buffer */
mr r5, r8 /* how many bytes to fill buffer with */
bl MEMSET /* call optimized memset */
+#ifndef MEMSET_is_local
nop
+#endif
L(update3return):
#ifdef USE_AS_STPNCPY
diff --git a/sysdeps/powerpc/powerpc64/power7/strstr.S b/sysdeps/powerpc/powerpc64/power7/strstr.S
index 260db2e..1c43253 100644
--- a/sysdeps/powerpc/powerpc64/power7/strstr.S
+++ b/sysdeps/powerpc/powerpc64/power7/strstr.S
@@ -34,6 +34,7 @@
GLIBC symbol (created by libc_hidden_builtin_def). */
# ifdef SHARED
# define STRLEN __GI_strlen
+# define STRLEN_is_local
# else
# define STRLEN strlen
# endif
@@ -44,6 +45,7 @@
GLIBC symbol (created by libc_hidden_builtin_def). */
# ifdef SHARED
# define STRNLEN __GI_strnlen
+# define STRNLEN_is_local
# else
# define STRNLEN __strnlen
# endif
@@ -52,6 +54,7 @@
#ifndef STRCHR
# ifdef SHARED
# define STRCHR __GI_strchr
+# define STRCHR_is_local
# else
# define STRCHR strchr
# endif
@@ -86,7 +89,9 @@ EALIGN (STRSTR, 4, 0)
mr r30, r4
mr r3, r4
bl STRLEN
+#ifndef STRLEN_is_local
nop
+#endif
cmpdi cr7, r3, 0 /* If search str is null. */
beq cr7, L(ret_r3)
@@ -95,14 +100,18 @@ EALIGN (STRSTR, 4, 0)
mr r4, r3
mr r3, r29
bl STRNLEN
+#ifndef STRNLEN_is_local
nop
+#endif
cmpd cr7, r3, r31 /* If len(r3) < len(r4). */
blt cr7, L(retnull)
mr r3, r29
lbz r4, 0(r30)
bl STRCHR
+#ifndef STRCHR_is_local
nop
+#endif
mr r11, r3
/* If first char of search str is not present. */
@@ -334,7 +343,9 @@ L(begin):
beq cr7, L(default)
lbz r4, 0(r30)
bl STRCHR
+#ifndef STRCHR_is_local
nop
+#endif
/* If first char of search str is not present. */
cmpdi cr7, r3, 0
ble cr7, L(end)
@@ -437,7 +448,9 @@ L(nextbyte):
beq cr7, L(default)
lbz r4, 0(r30)
bl STRCHR
+#ifndef STRCHR_is_local
nop
+#endif
/* If first char of search str is not present. */
cmpdi cr7, r3, 0
ble cr7, L(end)
diff --git a/sysdeps/powerpc/powerpc64/power8/strncpy.S b/sysdeps/powerpc/powerpc64/power8/strncpy.S
index 6d40f30..552c5cc 100644
--- a/sysdeps/powerpc/powerpc64/power8/strncpy.S
+++ b/sysdeps/powerpc/powerpc64/power8/strncpy.S
@@ -36,6 +36,7 @@
/* For builds without IFUNC support, local calls should be made to internal
GLIBC symbol (created by libc_hidden_builtin_def). */
# ifdef SHARED
+# define MEMSET_is_local
# define MEMSET __GI_memset
# else
# define MEMSET memset
@@ -61,6 +62,7 @@
.machine power7
EALIGN (FUNC_NAME, 4, 0)
+ CALL_MCOUNT 3
/* Check if the [src]+15 will cross a 4K page by checking if the bit
indicating the page size changes. Basically:
@@ -242,7 +244,9 @@ L(zero_pad_start_1):
cfi_adjust_cfa_offset(FRAMESIZE)
bl MEMSET
+#ifndef MEMSET_is_local
nop
+#endif
/* Restore the stack frame. */
addi r1,r1,FRAMESIZE
--
Alan Modra
Australia Development Lab, IBM
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 6/6] PowerPC64 ELFv2 PPC64_OPT_LOCALENTRY
2017-06-01 13:04 [PATCH 0/6] PowerPC64 ELFv2 PPC64_OPT_LOCALENTRY Alan Modra
` (4 preceding siblings ...)
2017-06-01 13:11 ` [PATCH 5/6] PowerPC64 ENTRY_TOCLESS Alan Modra
@ 2017-06-01 13:11 ` Alan Modra
2017-06-03 4:46 ` Alan Modra
5 siblings, 1 reply; 19+ messages in thread
From: Alan Modra @ 2017-06-01 13:11 UTC (permalink / raw)
To: libc-alpha
ELFv2 functions with localentry:0 are those with a single entry point,
ie. global entry == local entry, and that have no requirement on r2 or
r12, and guarantee r2 is unchanged on return. Such an external
function can be called via the PLT without saving r2 or restoring it
on return, avoiding a common load-hit-store for small functions.
This patch implements the ld.so changes necessary for this
optimization. ld.so needs to check that an optimized plt call
sequence is in fact calling a function implemented with localentry:0,
end emit a fatal error otherwise. I needed to add a couple of
parameters to elf_machine_fixup_plt in order to access both the
reference and definition symbols. This shouldn't affect the majority
of targets that make no use of those parameters since
elf_machine_fixup_plt is inline.
The elf/testobj6.c change is to stop "error while loading shared
libraries: expected localentry:0 `preload'" when running
elf/preloadtest, which we'd get otherwise.
* elf/elf.h (PPC64_OPT_LOCALENTRY): Define.
* sysdeps/alpha/dl-machine.h (elf_machine_fixup_plt): Add
refsym and sym parameters. Adjust callers.
* sysdeps/aarch64/dl-machine.h (elf_machine_fixup_plt): Likewise.
* sysdeps/arm/dl-machine.h (elf_machine_fixup_plt): Likewise.
* sysdeps/generic/dl-machine.h (elf_machine_fixup_plt): Likewise.
* sysdeps/hppa/dl-machine.h (elf_machine_fixup_plt): Likewise.
* sysdeps/i386/dl-machine.h (elf_machine_fixup_plt): Likewise.
* sysdeps/ia64/dl-machine.h (elf_machine_fixup_plt): Likewise.
* sysdeps/m68k/dl-machine.h (elf_machine_fixup_plt): Likewise.
* sysdeps/microblaze/dl-machine.h (elf_machine_fixup_plt): Likewise.
* sysdeps/mips/dl-machine.h (elf_machine_fixup_plt): Likewise.
* sysdeps/nios2/dl-machine.h (elf_machine_fixup_plt): Likewise.
* sysdeps/powerpc/powerpc32/dl-machine.h (elf_machine_fixup_plt):
Likewise.
* sysdeps/s390/s390-32/dl-machine.h (elf_machine_fixup_plt): Likewise.
* sysdeps/s390/s390-64/dl-machine.h (elf_machine_fixup_plt): Likewise.
* sysdeps/sh/dl-machine.h (elf_machine_fixup_plt): Likewise.
* sysdeps/sparc/sparc32/dl-machine.h (elf_machine_fixup_plt): Likewise.
* sysdeps/sparc/sparc64/dl-machine.h (elf_machine_fixup_plt): Likewise.
* sysdeps/tile/dl-machine.h (elf_machine_fixup_plt): Likewise.
* sysdeps/x86_64/dl-machine.h (elf_machine_fixup_plt): Likewise.
* sysdeps/powerpc/powerpc64/dl-machine.c (_dl_error_localentry): New.
(_dl_reloc_overflow): Increase buffser size. Formatting.
* sysdeps/powerpc/powerpc64/dl-machine.h (ppc64_local_entry_offset):
Delete reloc param, add refsym and sym. Check optimized plt
call stubs for localentry:0 functions. Adjust callers.
(elf_machine_fixup_plt, elf_machine_plt_conflict): Add refsym
and sym parameters. Adjust callers.
(_dl_reloc_overflow): Move attribute.
(_dl_error_localentry): Declare.
* elf/dl-runtime.c (_dl_fixup): Save original sym. Pass
refsym and sym to elf_machine_fixup_plt.
* elf/testobj6.c (preload): Call printf.
diff --git a/elf/dl-runtime.c b/elf/dl-runtime.c
index 7d1d240..51d3819 100644
--- a/elf/dl-runtime.c
+++ b/elf/dl-runtime.c
@@ -71,6 +71,7 @@ _dl_fixup (
const PLTREL *const reloc
= (const void *) (D_PTR (l, l_info[DT_JMPREL]) + reloc_offset);
const ElfW(Sym) *sym = &symtab[ELFW(R_SYM) (reloc->r_info)];
+ const ElfW(Sym) *refsym = sym;
void *const rel_addr = (void *)(l->l_addr + reloc->r_offset);
lookup_t result;
DL_FIXUP_VALUE_TYPE value;
@@ -145,7 +146,7 @@ _dl_fixup (
if (__glibc_unlikely (GLRO(dl_bind_not)))
return value;
- return elf_machine_fixup_plt (l, result, reloc, rel_addr, value);
+ return elf_machine_fixup_plt (l, result, refsym, sym, reloc, rel_addr, value);
}
#ifndef PROF
diff --git a/elf/elf.h b/elf/elf.h
index fff893d..3900b4c 100644
--- a/elf/elf.h
+++ b/elf/elf.h
@@ -2544,9 +2544,10 @@ enum
#define DT_PPC64_OPT (DT_LOPROC + 3)
#define DT_PPC64_NUM 4
-/* PowerPC64 specific values for the DT_PPC64_OPT Dyn entry. */
+/* PowerPC64 specific bits in the DT_PPC64_OPT Dyn entry. */
#define PPC64_OPT_TLS 1
#define PPC64_OPT_MULTI_TOC 2
+#define PPC64_OPT_LOCALENTRY 4
/* PowerPC64 specific values for the Elf64_Sym st_other field. */
#define STO_PPC64_LOCAL_BIT 5
diff --git a/elf/testobj6.c b/elf/testobj6.c
index fcba016..84da4c9 100644
--- a/elf/testobj6.c
+++ b/elf/testobj6.c
@@ -1,3 +1,5 @@
+#include <stdio.h>
+
#include "testobj.h"
int
@@ -15,5 +17,6 @@ obj6func2 (int a)
int
preload (int a)
{
+ printf ("testobj6 preload\n");
return a;
}
diff --git a/sysdeps/aarch64/dl-machine.h b/sysdeps/aarch64/dl-machine.h
index 15d79a6..02fab04 100644
--- a/sysdeps/aarch64/dl-machine.h
+++ b/sysdeps/aarch64/dl-machine.h
@@ -245,6 +245,7 @@ dl_platform_init (void)
static inline ElfW(Addr)
elf_machine_fixup_plt (struct link_map *map, lookup_t t,
+ const ElfW(Sym) *refsym, const ElfW(Sym) *sym,
const ElfW(Rela) *reloc,
ElfW(Addr) *reloc_addr,
ElfW(Addr) value)
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index 7580cd2..7077796 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -260,6 +260,7 @@ dl_platform_init (void)
rather than the dynamic linker. */
static inline Elf64_Addr
elf_machine_fixup_plt (struct link_map *map, lookup_t t,
+ const ElfW(Sym) *refsym, const ElfW(Sym) *sym,
const Elf64_Rela *reloc,
Elf64_Addr *got_addr, Elf64_Addr value)
{
@@ -434,11 +435,11 @@ elf_machine_rela (struct link_map *map,
RESOLVE_CONFLICT_FIND_MAP (map, reloc_addr);
reloc = ((const Elf64_Rela *) D_PTR (map, l_info[DT_JMPREL]))
+ (r_type >> 8);
- elf_machine_fixup_plt (map, 0, reloc, reloc_addr, sym_value);
+ elf_machine_fixup_plt (map, 0, 0, 0, reloc, reloc_addr, sym_value);
}
#else
else if (r_type == R_ALPHA_JMP_SLOT)
- elf_machine_fixup_plt (map, 0, reloc, reloc_addr, sym_value);
+ elf_machine_fixup_plt (map, 0, 0, 0, reloc, reloc_addr, sym_value);
#endif
#ifndef RTLD_BOOTSTRAP
else if (r_type == R_ALPHA_REFQUAD)
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
index 2c72972..7053ead 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
@@ -263,6 +263,7 @@ dl_platform_init (void)
static inline Elf32_Addr
elf_machine_fixup_plt (struct link_map *map, lookup_t t,
+ const ElfW(Sym) *refsym, const ElfW(Sym) *sym,
const Elf32_Rel *reloc,
Elf32_Addr *reloc_addr, Elf32_Addr value)
{
diff --git a/sysdeps/generic/dl-machine.h b/sysdeps/generic/dl-machine.h
index 59749bd..4153760 100644
--- a/sysdeps/generic/dl-machine.h
+++ b/sysdeps/generic/dl-machine.h
@@ -51,10 +51,11 @@ elf_machine_load_address (void)
/* Fixup a PLT entry to bounce directly to the function at VALUE. */
-static inline Elf32_Addr
+static inline ElfW(Addr)
elf_machine_fixup_plt (struct link_map *map, lookup_t t,
- const Elf32_Rel *reloc,
- Elf32_Addr *reloc_addr, Elf32_Addr value)
+ const ElfW(Sym) *refsym, const ElfW(Sym) *sym,
+ const ElfW(Rel) *reloc,
+ ElfW(Addr) *reloc_addr, ElfW(Addr) value)
{
return *reloc_addr = value;
}
diff --git a/sysdeps/hppa/dl-machine.h b/sysdeps/hppa/dl-machine.h
index 787b95f..b7bdf87 100644
--- a/sysdeps/hppa/dl-machine.h
+++ b/sysdeps/hppa/dl-machine.h
@@ -112,6 +112,7 @@ elf_machine_load_address (void)
/* Fixup a PLT entry to bounce directly to the function at VALUE. */
static inline struct fdesc __attribute__ ((always_inline))
elf_machine_fixup_plt (struct link_map *map, lookup_t t,
+ const ElfW(Sym) *refsym, const ElfW(Sym) *sym,
const Elf32_Rela *reloc,
Elf32_Addr *reloc_addr, struct fdesc value)
{
@@ -652,13 +653,13 @@ elf_machine_rela (struct link_map *map,
case R_PARISC_IPLT:
if (__builtin_expect (sym_map != NULL, 1))
{
- elf_machine_fixup_plt (NULL, sym_map, reloc, reloc_addr,
+ elf_machine_fixup_plt (NULL, sym_map, NULL, NULL reloc, reloc_addr,
DL_FIXUP_MAKE_VALUE(sym_map, value));
}
else
{
/* If we get here, it's a (weak) undefined sym. */
- elf_machine_fixup_plt (NULL, map, reloc, reloc_addr,
+ elf_machine_fixup_plt (NULL, map, NULL, NULL, reloc, reloc_addr,
DL_FIXUP_MAKE_VALUE(map, value));
}
return;
diff --git a/sysdeps/i386/dl-machine.h b/sysdeps/i386/dl-machine.h
index 57d4a0b..9ee9d02 100644
--- a/sysdeps/i386/dl-machine.h
+++ b/sysdeps/i386/dl-machine.h
@@ -246,6 +246,7 @@ dl_platform_init (void)
static inline Elf32_Addr
elf_machine_fixup_plt (struct link_map *map, lookup_t t,
+ const ElfW(Sym) *refsym, const ElfW(Sym) *sym,
const Elf32_Rel *reloc,
Elf32_Addr *reloc_addr, Elf32_Addr value)
{
diff --git a/sysdeps/ia64/dl-machine.h b/sysdeps/ia64/dl-machine.h
index 9c08161..8d0d3c9 100644
--- a/sysdeps/ia64/dl-machine.h
+++ b/sysdeps/ia64/dl-machine.h
@@ -333,6 +333,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
/* Fixup a PLT entry to bounce directly to the function at VALUE. */
static inline struct fdesc __attribute__ ((always_inline))
elf_machine_fixup_plt (struct link_map *l, lookup_t t,
+ const ElfW(Sym) *refsym, const ElfW(Sym) *sym,
const Elf64_Rela *reloc,
Elf64_Addr *reloc_addr, struct fdesc value)
{
@@ -424,7 +425,7 @@ elf_machine_rela (struct link_map *map,
;/* No adjustment. */
else if (r_type == R_IA64_IPLTLSB)
{
- elf_machine_fixup_plt (NULL, NULL, reloc, reloc_addr,
+ elf_machine_fixup_plt (NULL, NULL, NULL, NULL, reloc, reloc_addr,
DL_FIXUP_MAKE_VALUE (sym_map, value));
return;
}
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h
index 8f457ce..fd8fb00 100644
--- a/sysdeps/m68k/dl-machine.h
+++ b/sysdeps/m68k/dl-machine.h
@@ -182,6 +182,7 @@ _dl_start_user:\n\
static inline Elf32_Addr
elf_machine_fixup_plt (struct link_map *map, lookup_t t,
+ const ElfW(Sym) *refsym, const ElfW(Sym) *sym,
const Elf32_Rela *reloc,
Elf32_Addr *reloc_addr, Elf32_Addr value)
{
diff --git a/sysdeps/microblaze/dl-machine.h b/sysdeps/microblaze/dl-machine.h
index cc80b30..9481ff1 100644
--- a/sysdeps/microblaze/dl-machine.h
+++ b/sysdeps/microblaze/dl-machine.h
@@ -174,6 +174,7 @@ _dl_start_user:\n\
static inline Elf32_Addr
elf_machine_fixup_plt (struct link_map *map, lookup_t t,
+ const ElfW(Sym) *refsym, const ElfW(Sym) *sym,
const Elf32_Rela *reloc,
Elf32_Addr *reloc_addr, Elf32_Addr value)
{
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index ed47513..74ead7f 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -453,6 +453,7 @@ dl_platform_init (void)
the corresponding PLT entry instead. */
static inline ElfW(Addr)
elf_machine_fixup_plt (struct link_map *map, lookup_t t,
+ const ElfW(Sym) *refsym, const ElfW(Sym) *sym,
const ElfW(Rel) *reloc,
ElfW(Addr) *reloc_addr, ElfW(Addr) value)
{
diff --git a/sysdeps/nios2/dl-machine.h b/sysdeps/nios2/dl-machine.h
index 8d2b18d..b5fdd9b 100644
--- a/sysdeps/nios2/dl-machine.h
+++ b/sysdeps/nios2/dl-machine.h
@@ -207,6 +207,7 @@ _start:\n\
static inline Elf32_Addr
elf_machine_fixup_plt (struct link_map *map, lookup_t t,
+ const ElfW(Sym) *refsym, const ElfW(Sym) *sym,
const Elf32_Rela *reloc,
Elf32_Addr *reloc_addr, Elf32_Addr value)
{
diff --git a/sysdeps/powerpc/powerpc32/dl-machine.h b/sysdeps/powerpc/powerpc32/dl-machine.h
index 28eb50f..1f8437e 100644
--- a/sysdeps/powerpc/powerpc32/dl-machine.h
+++ b/sysdeps/powerpc/powerpc32/dl-machine.h
@@ -235,6 +235,7 @@ extern Elf32_Addr __elf_machine_fixup_plt (struct link_map *map,
static inline Elf32_Addr
elf_machine_fixup_plt (struct link_map *map, lookup_t t,
+ const ElfW(Sym) *refsym, const ElfW(Sym) *sym,
const Elf32_Rela *reloc,
Elf32_Addr *reloc_addr, Elf64_Addr finaladdr)
{
diff --git a/sysdeps/powerpc/powerpc64/dl-machine.c b/sysdeps/powerpc/powerpc64/dl-machine.c
index 0eccc66..976f01e 100644
--- a/sysdeps/powerpc/powerpc64/dl-machine.c
+++ b/sysdeps/powerpc/powerpc64/dl-machine.c
@@ -24,11 +24,11 @@
void
_dl_reloc_overflow (struct link_map *map,
- const char *name,
- Elf64_Addr *const reloc_addr,
- const Elf64_Sym *refsym)
+ const char *name,
+ Elf64_Addr *const reloc_addr,
+ const Elf64_Sym *refsym)
{
- char buffer[128];
+ char buffer[1024];
char *t;
t = stpcpy (buffer, name);
t = stpcpy (t, " reloc at 0x");
@@ -45,3 +45,17 @@ _dl_reloc_overflow (struct link_map *map,
t = stpcpy (t, " out of range");
_dl_signal_error (0, map->l_name, NULL, buffer);
}
+
+void
+_dl_error_localentry (struct link_map *map, const Elf64_Sym *refsym)
+{
+ char buffer[1024];
+ char *t;
+ const char *strtab;
+
+ strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]);
+ t = stpcpy (buffer, "expected localentry:0 `");
+ t = stpcpy (t, strtab + refsym->st_name);
+ t = stpcpy (t, "'");
+ _dl_signal_error (0, map->l_name, NULL, buffer);
+}
diff --git a/sysdeps/powerpc/powerpc64/dl-machine.h b/sysdeps/powerpc/powerpc64/dl-machine.h
index 6391b3a..2d54189 100644
--- a/sysdeps/powerpc/powerpc64/dl-machine.h
+++ b/sysdeps/powerpc/powerpc64/dl-machine.h
@@ -440,20 +440,27 @@ elf_machine_runtime_setup (struct link_map *map, int lazy, int profile)
}
#if _CALL_ELF == 2
-/* If the PLT entry whose reloc is 'reloc' resolves to a function in
- the same object, return the target function's local entry point
- offset if usable. */
+/* If the PLT entry resolves to a function in the same object, return
+ the target function's local entry point offset if usable. */
static inline Elf64_Addr __attribute__ ((always_inline))
ppc64_local_entry_offset (struct link_map *map, lookup_t sym_map,
- const Elf64_Rela *reloc)
+ const ElfW(Sym) *refsym, const ElfW(Sym) *sym)
{
- const Elf64_Sym *symtab;
- const Elf64_Sym *sym;
-
/* If the target function is in a different object, we cannot
use the local entry point. */
if (sym_map != map)
- return 0;
+ {
+ /* Check that optimized plt call stubs for localentry:0 functions
+ are not being satisfied by a non-zero localentry symbol. */
+ if (map->l_info[DT_PPC64(OPT)]
+ && (map->l_info[DT_PPC64(OPT)]->d_un.d_val & PPC64_OPT_LOCALENTRY) != 0
+ && refsym->st_info == ELFW(ST_INFO) (STB_GLOBAL, STT_FUNC)
+ && (STO_PPC64_LOCAL_MASK & refsym->st_other) == 0
+ && (STO_PPC64_LOCAL_MASK & sym->st_other) != 0)
+ _dl_error_localentry (map, refsym);
+
+ return 0;
+ }
/* If the linker inserted multiple TOCs, we cannot use the
local entry point. */
@@ -461,16 +468,13 @@ ppc64_local_entry_offset (struct link_map *map, lookup_t sym_map,
&& (map->l_info[DT_PPC64(OPT)]->d_un.d_val & PPC64_OPT_MULTI_TOC))
return 0;
- /* Otherwise, we can use the local entry point. Retrieve its offset
- from the symbol's ELF st_other field. */
- symtab = (const void *) D_PTR (map, l_info[DT_SYMTAB]);
- sym = &symtab[ELFW(R_SYM) (reloc->r_info)];
-
/* If the target function is an ifunc then the local entry offset is
for the resolver, not the final destination. */
if (__builtin_expect (ELFW(ST_TYPE) (sym->st_info) == STT_GNU_IFUNC, 0))
return 0;
+ /* Otherwise, we can use the local entry point. Retrieve its offset
+ from the symbol's ELF st_other field. */
return PPC64_LOCAL_ENTRY_OFFSET (sym->st_other);
}
#endif
@@ -479,6 +483,7 @@ ppc64_local_entry_offset (struct link_map *map, lookup_t sym_map,
routine. */
static inline Elf64_Addr __attribute__ ((always_inline))
elf_machine_fixup_plt (struct link_map *map, lookup_t sym_map,
+ const ElfW(Sym) *refsym, const ElfW(Sym) *sym,
const Elf64_Rela *reloc,
Elf64_Addr *reloc_addr, Elf64_Addr finaladdr)
{
@@ -534,7 +539,7 @@ elf_machine_fixup_plt (struct link_map *map, lookup_t sym_map,
PPC_DCBST (&plt->fd_func);
PPC_ISYNC;
#else
- finaladdr += ppc64_local_entry_offset (map, sym_map, reloc);
+ finaladdr += ppc64_local_entry_offset (map, sym_map, refsym, sym);
*reloc_addr = finaladdr;
#endif
@@ -543,6 +548,7 @@ elf_machine_fixup_plt (struct link_map *map, lookup_t sym_map,
static inline void __attribute__ ((always_inline))
elf_machine_plt_conflict (struct link_map *map, lookup_t sym_map,
+ const ElfW(Sym) *refsym, const ElfW(Sym) *sym,
const Elf64_Rela *reloc,
Elf64_Addr *reloc_addr, Elf64_Addr finaladdr)
{
@@ -565,7 +571,7 @@ elf_machine_plt_conflict (struct link_map *map, lookup_t sym_map,
PPC_DCBST (&plt->fd_toc);
PPC_SYNC;
#else
- finaladdr += ppc64_local_entry_offset (map, sym_map, reloc);
+ finaladdr += ppc64_local_entry_offset (map, sym_map, refsym, sym);
*reloc_addr = finaladdr;
#endif
}
@@ -604,11 +610,13 @@ elf_machine_plt_value (struct link_map *map, const Elf64_Rela *reloc,
#define dont_expect(X) __builtin_expect ((X), 0)
-extern void _dl_reloc_overflow (struct link_map *map,
- const char *name,
- Elf64_Addr *const reloc_addr,
- const Elf64_Sym *refsym)
- attribute_hidden;
+extern void attribute_hidden _dl_reloc_overflow (struct link_map *map,
+ const char *name,
+ Elf64_Addr *const reloc_addr,
+ const Elf64_Sym *refsym);
+
+extern void attribute_hidden _dl_error_localentry (struct link_map *map,
+ const Elf64_Sym *refsym);
auto inline void __attribute__ ((always_inline))
elf_machine_rela_relative (Elf64_Addr l_addr, const Elf64_Rela *reloc,
@@ -728,9 +736,11 @@ elf_machine_rela (struct link_map *map,
/* Fall thru */
case R_PPC64_JMP_SLOT:
#ifdef RESOLVE_CONFLICT_FIND_MAP
- elf_machine_plt_conflict (map, sym_map, reloc, reloc_addr, value);
+ elf_machine_plt_conflict (map, sym_map, refsym, sym,
+ reloc, reloc_addr, value);
#else
- elf_machine_fixup_plt (map, sym_map, reloc, reloc_addr, value);
+ elf_machine_fixup_plt (map, sym_map, refsym, sym,
+ reloc, reloc_addr, value);
#endif
return;
diff --git a/sysdeps/s390/s390-32/dl-machine.h b/sysdeps/s390/s390-32/dl-machine.h
index 2e3c77c..c302c9d 100644
--- a/sysdeps/s390/s390-32/dl-machine.h
+++ b/sysdeps/s390/s390-32/dl-machine.h
@@ -294,6 +294,7 @@ dl_platform_init (void)
static inline Elf32_Addr
elf_machine_fixup_plt (struct link_map *map, lookup_t t,
+ const ElfW(Sym) *refsym, const ElfW(Sym) *sym,
const Elf32_Rela *reloc,
Elf32_Addr *reloc_addr, Elf32_Addr value)
{
diff --git a/sysdeps/s390/s390-64/dl-machine.h b/sysdeps/s390/s390-64/dl-machine.h
index f2aeb1e..7513520 100644
--- a/sysdeps/s390/s390-64/dl-machine.h
+++ b/sysdeps/s390/s390-64/dl-machine.h
@@ -242,6 +242,7 @@ dl_platform_init (void)
static inline Elf64_Addr
elf_machine_fixup_plt (struct link_map *map, lookup_t t,
+ const ElfW(Sym) *refsym, const ElfW(Sym) *sym,
const Elf64_Rela *reloc,
Elf64_Addr *reloc_addr, Elf64_Addr value)
{
diff --git a/sysdeps/sh/dl-machine.h b/sysdeps/sh/dl-machine.h
index 2b468af..7106afb 100644
--- a/sysdeps/sh/dl-machine.h
+++ b/sysdeps/sh/dl-machine.h
@@ -230,6 +230,7 @@ dl_platform_init (void)
static inline Elf32_Addr
elf_machine_fixup_plt (struct link_map *map, lookup_t t,
+ const ElfW(Sym) *refsym, const ElfW(Sym) *sym,
const Elf32_Rela *reloc,
Elf32_Addr *reloc_addr, Elf32_Addr value)
{
diff --git a/sysdeps/sparc/sparc32/dl-machine.h b/sysdeps/sparc/sparc32/dl-machine.h
index e17ac8e..b98a11b 100644
--- a/sysdeps/sparc/sparc32/dl-machine.h
+++ b/sysdeps/sparc/sparc32/dl-machine.h
@@ -292,6 +292,7 @@ _dl_start_user:\n\
static inline Elf32_Addr
elf_machine_fixup_plt (struct link_map *map, lookup_t t,
+ const ElfW(Sym) *refsym, const ElfW(Sym) *sym,
const Elf32_Rela *reloc,
Elf32_Addr *reloc_addr, Elf32_Addr value)
{
diff --git a/sysdeps/sparc/sparc64/dl-machine.h b/sysdeps/sparc/sparc64/dl-machine.h
index 1b59d78..c2871dc 100644
--- a/sysdeps/sparc/sparc64/dl-machine.h
+++ b/sysdeps/sparc/sparc64/dl-machine.h
@@ -85,6 +85,7 @@ elf_machine_load_address (void)
static inline Elf64_Addr __attribute__ ((always_inline))
elf_machine_fixup_plt (struct link_map *map, lookup_t t,
+ const ElfW(Sym) *refsym, const ElfW(Sym) *sym,
const Elf64_Rela *reloc,
Elf64_Addr *reloc_addr, Elf64_Addr value)
{
diff --git a/sysdeps/tile/dl-machine.h b/sysdeps/tile/dl-machine.h
index c1d7845..ae92673 100644
--- a/sysdeps/tile/dl-machine.h
+++ b/sysdeps/tile/dl-machine.h
@@ -239,6 +239,7 @@ dl_platform_init (void)
static inline ElfW(Addr)
elf_machine_fixup_plt (struct link_map *map, lookup_t t,
+ const ElfW(Sym) *refsym, const ElfW(Sym) *sym,
const ElfW(Rela) *reloc,
ElfW(Addr) *reloc_addr, ElfW(Addr) value)
{
@@ -569,7 +570,7 @@ elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc,
switch (r_type)
{
case R_TILE(JMP_SLOT):
- elf_machine_fixup_plt (map, 0, reloc, reloc_addr,
+ elf_machine_fixup_plt (map, 0, 0, 0, reloc, reloc_addr,
value + reloc->r_addend);
return;
diff --git a/sysdeps/x86_64/dl-machine.h b/sysdeps/x86_64/dl-machine.h
index 0015db4..6a04cbc 100644
--- a/sysdeps/x86_64/dl-machine.h
+++ b/sysdeps/x86_64/dl-machine.h
@@ -253,6 +253,7 @@ dl_platform_init (void)
static inline ElfW(Addr)
elf_machine_fixup_plt (struct link_map *map, lookup_t t,
+ const ElfW(Sym) *refsym, const ElfW(Sym) *sym,
const ElfW(Rela) *reloc,
ElfW(Addr) *reloc_addr, ElfW(Addr) value)
{
--
Alan Modra
Australia Development Lab, IBM
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 5/6] PowerPC64 ENTRY_TOCLESS
2017-06-01 13:04 [PATCH 0/6] PowerPC64 ELFv2 PPC64_OPT_LOCALENTRY Alan Modra
` (3 preceding siblings ...)
2017-06-01 13:10 ` [PATCH 4/6] strncpy, stpncpy and strstr fixes Alan Modra
@ 2017-06-01 13:11 ` Alan Modra
2017-06-13 12:23 ` Tulio Magno Quites Machado Filho
2017-06-01 13:11 ` [PATCH 6/6] PowerPC64 ELFv2 PPC64_OPT_LOCALENTRY Alan Modra
5 siblings, 1 reply; 19+ messages in thread
From: Alan Modra @ 2017-06-01 13:11 UTC (permalink / raw)
To: libc-alpha
A number of functions in the sysdeps/powerpc/powerpc64/ tree don't use
or change r2, yet declare a global entry that sets up r2. This patch
fixes that problem, and consolidates the ENTRY and EALIGN macros.
* sysdeps/powerpc/powerpc64/sysdep.h: Formatting.
(NOPS, ENTRY_3): New macros.
(ENTRY): Rewrite.
(ENTRY_TOCLESS): Define.
(EALIGN, EALIGN_W_0, EALIGN_W_1, EALIGN_W_2, EALIGN_W_4, EALIGN_W_5,
EALIGN_W_6, EALIGN_W_7, EALIGN_W_8): Delete.
* sysdeps/powerpc/powerpc64/a2/memcpy.S: Replace EALIGN with ENTRY.
* sysdeps/powerpc/powerpc64/dl-trampoline.S: Likewise.
* sysdeps/powerpc/powerpc64/fpu/s_ceil.S: Likewise.
* sysdeps/powerpc/powerpc64/fpu/s_ceilf.S: Likewise.
* sysdeps/powerpc/powerpc64/fpu/s_floor.S: Likewise.
* sysdeps/powerpc/powerpc64/fpu/s_floorf.S: Likewise.
* sysdeps/powerpc/powerpc64/fpu/s_nearbyint.S: Likewise.
* sysdeps/powerpc/powerpc64/fpu/s_nearbyintf.S: Likewise.
* sysdeps/powerpc/powerpc64/fpu/s_rint.S: Likewise.
* sysdeps/powerpc/powerpc64/fpu/s_rintf.S: Likewise.
* sysdeps/powerpc/powerpc64/fpu/s_round.S: Likewise.
* sysdeps/powerpc/powerpc64/fpu/s_roundf.S: Likewise.
* sysdeps/powerpc/powerpc64/fpu/s_trunc.S: Likewise.
* sysdeps/powerpc/powerpc64/fpu/s_truncf.S: Likewise.
* sysdeps/powerpc/powerpc64/memset.S: Likewise.
* sysdeps/powerpc/powerpc64/power7/fpu/s_finite.S: Likewise.
* sysdeps/powerpc/powerpc64/power7/fpu/s_isinf.S: Likewise.
* sysdeps/powerpc/powerpc64/power7/fpu/s_isnan.S: Likewise.
* sysdeps/powerpc/powerpc64/power7/strstr.S: Likewise.
* sysdeps/powerpc/powerpc64/power8/fpu/e_expf.S: Likewise.
* sysdeps/powerpc/powerpc64/power8/fpu/s_cosf.S: Likewise.
* sysdeps/powerpc/powerpc64/power8/fpu/s_sinf.S: Likewise.
* sysdeps/powerpc/powerpc64/power8/strcasestr.S: Likewise.
* sysdeps/powerpc/powerpc64/addmul_1.S: Use ENTRY_TOCLESS.
* sysdeps/powerpc/powerpc64/cell/memcpy.S: Likewise.
* sysdeps/powerpc/powerpc64/fpu/s_copysign.S: Likewise.
* sysdeps/powerpc/powerpc64/fpu/s_copysignl.S: Likewise.
* sysdeps/powerpc/powerpc64/fpu/s_fabsl.S: Likewise.
* sysdeps/powerpc/powerpc64/fpu/s_isnan.S: Likewise.
* sysdeps/powerpc/powerpc64/fpu/s_llrint.S: Likewise.
* sysdeps/powerpc/powerpc64/fpu/s_llrintf.S: Likewise.
* sysdeps/powerpc/powerpc64/lshift.S: Likewise.
* sysdeps/powerpc/powerpc64/memcpy.S: Likewise.
* sysdeps/powerpc/powerpc64/mul_1.S: Likewise.
* sysdeps/powerpc/powerpc64/power4/memcmp.S: Likewise.
* sysdeps/powerpc/powerpc64/power4/memcpy.S: Likewise.
* sysdeps/powerpc/powerpc64/power4/memset.S: Likewise.
* sysdeps/powerpc/powerpc64/power4/strncmp.S: Likewise.
* sysdeps/powerpc/powerpc64/power5+/fpu/s_ceil.S: Likewise.
* sysdeps/powerpc/powerpc64/power5+/fpu/s_ceilf.S: Likewise.
* sysdeps/powerpc/powerpc64/power5+/fpu/s_floor.S: Likewise.
* sysdeps/powerpc/powerpc64/power5+/fpu/s_floorf.S: Likewise.
* sysdeps/powerpc/powerpc64/power5+/fpu/s_llround.S: Likewise.
* sysdeps/powerpc/powerpc64/power5+/fpu/s_round.S: Likewise.
* sysdeps/powerpc/powerpc64/power5+/fpu/s_roundf.S: Likewise.
* sysdeps/powerpc/powerpc64/power5+/fpu/s_trunc.S: Likewise.
* sysdeps/powerpc/powerpc64/power5+/fpu/s_truncf.S: Likewise.
* sysdeps/powerpc/powerpc64/power5/fpu/s_isnan.S: Likewise.
* sysdeps/powerpc/powerpc64/power6/fpu/s_copysign.S: Likewise.
* sysdeps/powerpc/powerpc64/power6/fpu/s_isnan.S: Likewise.
* sysdeps/powerpc/powerpc64/power6/memcpy.S: Likewise.
* sysdeps/powerpc/powerpc64/power6/memset.S: Likewise.
* sysdeps/powerpc/powerpc64/power6x/fpu/s_isnan.S: Likewise.
* sysdeps/powerpc/powerpc64/power6x/fpu/s_llrint.S: Likewise.
* sysdeps/powerpc/powerpc64/power6x/fpu/s_llround.S: Likewise.
* sysdeps/powerpc/powerpc64/power7/add_n.S: Likewise.
* sysdeps/powerpc/powerpc64/power7/memchr.S: Likewise.
* sysdeps/powerpc/powerpc64/power7/memcmp.S: Likewise.
* sysdeps/powerpc/powerpc64/power7/memcpy.S: Likewise.
* sysdeps/powerpc/powerpc64/power7/memmove.S: Likewise.
* sysdeps/powerpc/powerpc64/power7/mempcpy.S: Likewise.
* sysdeps/powerpc/powerpc64/power7/memrchr.S: Likewise.
* sysdeps/powerpc/powerpc64/power7/memset.S: Likewise.
* sysdeps/powerpc/powerpc64/power7/rawmemchr.S: Likewise.
* sysdeps/powerpc/powerpc64/power7/strcasecmp.S (strcasecmp_l):
Likewise.
* sysdeps/powerpc/powerpc64/power7/strchr.S: Likewise.
* sysdeps/powerpc/powerpc64/power7/strchrnul.S: Likewise.
* sysdeps/powerpc/powerpc64/power7/strcmp.S: Likewise.
* sysdeps/powerpc/powerpc64/power7/strlen.S: Likewise.
* sysdeps/powerpc/powerpc64/power7/strncmp.S: Likewise.
* sysdeps/powerpc/powerpc64/power7/strncpy.S: Likewise.
* sysdeps/powerpc/powerpc64/power7/strnlen.S: Likewise.
* sysdeps/powerpc/powerpc64/power7/strrchr.S: Likewise.
* sysdeps/powerpc/powerpc64/power8/fpu/s_finite.S: Likewise.
* sysdeps/powerpc/powerpc64/power8/fpu/s_isinf.S: Likewise.
* sysdeps/powerpc/powerpc64/power8/fpu/s_isnan.S: Likewise.
* sysdeps/powerpc/powerpc64/power8/fpu/s_llrint.S: Likewise.
* sysdeps/powerpc/powerpc64/power8/fpu/s_llround.S: Likewise.
* sysdeps/powerpc/powerpc64/power8/memcmp.S: Likewise.
* sysdeps/powerpc/powerpc64/power8/memset.S: Likewise.
* sysdeps/powerpc/powerpc64/power8/strchr.S: Likewise.
* sysdeps/powerpc/powerpc64/power8/strcmp.S: Likewise.
* sysdeps/powerpc/powerpc64/power8/strcpy.S: Likewise.
* sysdeps/powerpc/powerpc64/power8/strlen.S: Likewise.
* sysdeps/powerpc/powerpc64/power8/strncmp.S: Likewise.
* sysdeps/powerpc/powerpc64/power8/strncpy.S: Likewise.
* sysdeps/powerpc/powerpc64/power8/strnlen.S: Likewise.
* sysdeps/powerpc/powerpc64/power8/strrchr.S: Likewise.
* sysdeps/powerpc/powerpc64/power8/strspn.S: Likewise.
* sysdeps/powerpc/powerpc64/power9/strcmp.S: Likewise.
* sysdeps/powerpc/powerpc64/power9/strncmp.S: Likewise.
* sysdeps/powerpc/powerpc64/strchr.S: Likewise.
* sysdeps/powerpc/powerpc64/strcmp.S: Likewise.
* sysdeps/powerpc/powerpc64/strlen.S: Likewise.
* sysdeps/powerpc/powerpc64/strncmp.S: Likewise.
* sysdeps/powerpc/powerpc64/ppc-mcount.S: Store LR earlier. Don't
add nop when SHARED.
* sysdeps/powerpc/powerpc64/start.S: Fix comment.
* sysdeps/powerpc/powerpc64/multiarch/strrchr-power8.S (ENTRY): Don't
define.
(ENTRY_TOCLESS): Define.
diff --git a/sysdeps/powerpc/powerpc64/a2/memcpy.S b/sysdeps/powerpc/powerpc64/a2/memcpy.S
index ff30898..26846dc 100644
--- a/sysdeps/powerpc/powerpc64/a2/memcpy.S
+++ b/sysdeps/powerpc/powerpc64/a2/memcpy.S
@@ -34,7 +34,7 @@
.machine a2
-EALIGN (MEMCPY, 5, 0)
+ENTRY (MEMCPY, 5)
CALL_MCOUNT 3
dcbt 0,r4 /* Prefetch ONE SRC cacheline */
diff --git a/sysdeps/powerpc/powerpc64/addmul_1.S b/sysdeps/powerpc/powerpc64/addmul_1.S
index b4b0521..f463765 100644
--- a/sysdeps/powerpc/powerpc64/addmul_1.S
+++ b/sysdeps/powerpc/powerpc64/addmul_1.S
@@ -34,7 +34,7 @@
#define N r5
#define VL r6
-EALIGN(FUNC, 5, 0)
+ENTRY_TOCLESS (FUNC, 5)
std r31, -8(r1)
rldicl. r0, N, 0, 62
std r30, -16(r1)
diff --git a/sysdeps/powerpc/powerpc64/cell/memcpy.S b/sysdeps/powerpc/powerpc64/cell/memcpy.S
index 1cc6645..6e7f2b1 100644
--- a/sysdeps/powerpc/powerpc64/cell/memcpy.S
+++ b/sysdeps/powerpc/powerpc64/cell/memcpy.S
@@ -43,7 +43,7 @@
.align 7
-EALIGN (MEMCPY, 5, 0)
+ENTRY_TOCLESS (MEMCPY, 5)
CALL_MCOUNT 3
dcbt 0,r4 /* Prefetch ONE SRC cacheline */
diff --git a/sysdeps/powerpc/powerpc64/dl-trampoline.S b/sysdeps/powerpc/powerpc64/dl-trampoline.S
index 5ec729d..7ceb62b 100644
--- a/sysdeps/powerpc/powerpc64/dl-trampoline.S
+++ b/sysdeps/powerpc/powerpc64/dl-trampoline.S
@@ -33,7 +33,7 @@
a function that makes no calls except for __tls_get_addr and we
might be here resolving the __tls_get_addr call. */
#define INT_PARMS FRAME_MIN_SIZE
-EALIGN(_dl_runtime_resolve, 4, 0)
+ENTRY (_dl_runtime_resolve, 4)
stdu r1,-FRAME_SIZE(r1)
cfi_adjust_cfa_offset (FRAME_SIZE)
std r3,INT_PARMS+0(r1)
@@ -195,7 +195,7 @@ END(_dl_runtime_resolve)
parm1 (r3) and the index (r0) needs to be converted to an offset
(index * 24) in parm2 (r4). */
#ifndef PROF
-EALIGN(_dl_profile_resolve, 4, 0)
+ENTRY (_dl_profile_resolve, 4)
/* Spill r30, r31 to preserve the link_map* and reloc_addr, in case we
need to call _dl_call_pltexit. */
std r31,-8(r1)
diff --git a/sysdeps/powerpc/powerpc64/fpu/s_ceil.S b/sysdeps/powerpc/powerpc64/fpu/s_ceil.S
index 78d7fee..ce673e5 100644
--- a/sysdeps/powerpc/powerpc64/fpu/s_ceil.S
+++ b/sysdeps/powerpc/powerpc64/fpu/s_ceil.S
@@ -24,7 +24,7 @@
.tc FD_43300000_0[TC],0x4330000000000000
.section ".text"
-EALIGN (__ceil, 4, 0)
+ENTRY (__ceil, 4)
CALL_MCOUNT 0
lfd fp13,.LC0@toc(2)
fabs fp0,fp1
diff --git a/sysdeps/powerpc/powerpc64/fpu/s_ceilf.S b/sysdeps/powerpc/powerpc64/fpu/s_ceilf.S
index bc5ab02..ee62d8a 100644
--- a/sysdeps/powerpc/powerpc64/fpu/s_ceilf.S
+++ b/sysdeps/powerpc/powerpc64/fpu/s_ceilf.S
@@ -25,7 +25,7 @@
.long 0x0
.section ".text"
-EALIGN (__ceilf, 4, 0)
+ENTRY (__ceilf, 4)
CALL_MCOUNT 0
lfs fp13,.LC0@toc(2)
fabs fp0,fp1
diff --git a/sysdeps/powerpc/powerpc64/fpu/s_copysign.S b/sysdeps/powerpc/powerpc64/fpu/s_copysign.S
index 5947281..0dd9ce0 100644
--- a/sysdeps/powerpc/powerpc64/fpu/s_copysign.S
+++ b/sysdeps/powerpc/powerpc64/fpu/s_copysign.S
@@ -22,7 +22,7 @@
#include <sysdep.h>
#include <math_ldbl_opt.h>
-ENTRY(__copysign)
+ENTRY_TOCLESS (__copysign)
CALL_MCOUNT 0
/* double [f1] copysign (double [f1] x, double [f2] y);
copysign(x,y) returns a value with the magnitude of x and
diff --git a/sysdeps/powerpc/powerpc64/fpu/s_copysignl.S b/sysdeps/powerpc/powerpc64/fpu/s_copysignl.S
index b33ea6e..ea0c248 100644
--- a/sysdeps/powerpc/powerpc64/fpu/s_copysignl.S
+++ b/sysdeps/powerpc/powerpc64/fpu/s_copysignl.S
@@ -20,7 +20,7 @@
#include <sysdep.h>
#include <math_ldbl_opt.h>
-ENTRY(__copysignl)
+ENTRY_TOCLESS (__copysignl)
/* long double [f1,f2] copysign (long double [f1,f2] x, long double [f3,f4] y);
copysign(x,y) returns a value with the magnitude of x and
with the sign bit of y. */
diff --git a/sysdeps/powerpc/powerpc64/fpu/s_fabsl.S b/sysdeps/powerpc/powerpc64/fpu/s_fabsl.S
index 7603abb..b712e62 100644
--- a/sysdeps/powerpc/powerpc64/fpu/s_fabsl.S
+++ b/sysdeps/powerpc/powerpc64/fpu/s_fabsl.S
@@ -20,7 +20,7 @@
#include <sysdep.h>
#include <math_ldbl_opt.h>
-ENTRY(__fabsl)
+ENTRY_TOCLESS (__fabsl)
/* long double [f1,f2] fabs (long double [f1,f2] x);
fabs(x,y) returns a value with the magnitude of x and
with the sign bit of y. */
diff --git a/sysdeps/powerpc/powerpc64/fpu/s_floor.S b/sysdeps/powerpc/powerpc64/fpu/s_floor.S
index 4a6cc0e..23cea2a 100644
--- a/sysdeps/powerpc/powerpc64/fpu/s_floor.S
+++ b/sysdeps/powerpc/powerpc64/fpu/s_floor.S
@@ -24,7 +24,7 @@
.tc FD_43300000_0[TC],0x4330000000000000
.section ".text"
-EALIGN (__floor, 4, 0)
+ENTRY (__floor, 4)
CALL_MCOUNT 0
lfd fp13,.LC0@toc(2)
fabs fp0,fp1
diff --git a/sysdeps/powerpc/powerpc64/fpu/s_floorf.S b/sysdeps/powerpc/powerpc64/fpu/s_floorf.S
index d8b5e21..defcab4 100644
--- a/sysdeps/powerpc/powerpc64/fpu/s_floorf.S
+++ b/sysdeps/powerpc/powerpc64/fpu/s_floorf.S
@@ -25,7 +25,7 @@
.long 0x0
.section ".text"
-EALIGN (__floorf, 4, 0)
+ENTRY (__floorf, 4)
CALL_MCOUNT 0
lfs fp13,.LC0@toc(2)
fabs fp0,fp1
diff --git a/sysdeps/powerpc/powerpc64/fpu/s_isnan.S b/sysdeps/powerpc/powerpc64/fpu/s_isnan.S
index 6cba2d4..0ea05a0 100644
--- a/sysdeps/powerpc/powerpc64/fpu/s_isnan.S
+++ b/sysdeps/powerpc/powerpc64/fpu/s_isnan.S
@@ -21,7 +21,7 @@
/* int __isnan(x) */
.machine power4
-EALIGN (__isnan, 4, 0)
+ENTRY_TOCLESS (__isnan, 4)
CALL_MCOUNT 0
mffs fp0
mtfsb0 4*cr6+lt /* reset_fpscr_bit (FPSCR_VE) */
diff --git a/sysdeps/powerpc/powerpc64/fpu/s_llrint.S b/sysdeps/powerpc/powerpc64/fpu/s_llrint.S
index 39e7654..6893285 100644
--- a/sysdeps/powerpc/powerpc64/fpu/s_llrint.S
+++ b/sysdeps/powerpc/powerpc64/fpu/s_llrint.S
@@ -20,7 +20,7 @@
#include <math_ldbl_opt.h>
/* long long int[r3] __llrint (double x[fp1]) */
-ENTRY (__llrint)
+ENTRY_TOCLESS (__llrint)
CALL_MCOUNT 0
fctid fp13,fp1
stfd fp13,-16(r1)
diff --git a/sysdeps/powerpc/powerpc64/fpu/s_llrintf.S b/sysdeps/powerpc/powerpc64/fpu/s_llrintf.S
index 4050be6..95d437e 100644
--- a/sysdeps/powerpc/powerpc64/fpu/s_llrintf.S
+++ b/sysdeps/powerpc/powerpc64/fpu/s_llrintf.S
@@ -19,7 +19,7 @@
#include <sysdep.h>
/* long long int[r3] __llrintf (float x[fp1]) */
-ENTRY (__llrintf)
+ENTRY_TOCLESS (__llrintf)
CALL_MCOUNT 0
fctid fp13,fp1
stfd fp13,-16(r1)
diff --git a/sysdeps/powerpc/powerpc64/fpu/s_nearbyint.S b/sysdeps/powerpc/powerpc64/fpu/s_nearbyint.S
index 3dcd04b..88ec253 100644
--- a/sysdeps/powerpc/powerpc64/fpu/s_nearbyint.S
+++ b/sysdeps/powerpc/powerpc64/fpu/s_nearbyint.S
@@ -31,7 +31,7 @@
.tc FD_43300000_0[TC],0x4330000000000000
.section ".text"
-EALIGN (__nearbyint, 4, 0)
+ENTRY (__nearbyint, 4)
CALL_MCOUNT 0
fabs fp0,fp1
lfd fp13,.LC0@toc(2)
diff --git a/sysdeps/powerpc/powerpc64/fpu/s_nearbyintf.S b/sysdeps/powerpc/powerpc64/fpu/s_nearbyintf.S
index 11be35f..36212e1 100644
--- a/sysdeps/powerpc/powerpc64/fpu/s_nearbyintf.S
+++ b/sysdeps/powerpc/powerpc64/fpu/s_nearbyintf.S
@@ -32,7 +32,7 @@
.long 0x0
.section ".text"
-EALIGN (__nearbyintf, 4, 0)
+ENTRY (__nearbyintf, 4)
CALL_MCOUNT 0
fabs fp0,fp1
lfs fp13,.LC0@toc(2)
diff --git a/sysdeps/powerpc/powerpc64/fpu/s_rint.S b/sysdeps/powerpc/powerpc64/fpu/s_rint.S
index 7ba0adf..3543279 100644
--- a/sysdeps/powerpc/powerpc64/fpu/s_rint.S
+++ b/sysdeps/powerpc/powerpc64/fpu/s_rint.S
@@ -27,7 +27,7 @@
.tc FD_43300000_0[TC],0x4330000000000000
.section ".text"
-EALIGN (__rint, 4, 0)
+ENTRY (__rint, 4)
CALL_MCOUNT 0
lfd fp13,.LC0@toc(2)
fabs fp0,fp1
diff --git a/sysdeps/powerpc/powerpc64/fpu/s_rintf.S b/sysdeps/powerpc/powerpc64/fpu/s_rintf.S
index b1d1e15..193cf81 100644
--- a/sysdeps/powerpc/powerpc64/fpu/s_rintf.S
+++ b/sysdeps/powerpc/powerpc64/fpu/s_rintf.S
@@ -25,7 +25,7 @@
.long 0x0
.section ".text"
-EALIGN (__rintf, 4, 0)
+ENTRY (__rintf, 4)
CALL_MCOUNT 0
lfs fp13,.LC0@toc(2)
fabs fp0,fp1
diff --git a/sysdeps/powerpc/powerpc64/fpu/s_round.S b/sysdeps/powerpc/powerpc64/fpu/s_round.S
index fe315af..d10c74d 100644
--- a/sysdeps/powerpc/powerpc64/fpu/s_round.S
+++ b/sysdeps/powerpc/powerpc64/fpu/s_round.S
@@ -36,7 +36,7 @@
"Round toward Zero" mode and round by adding +-0.5 before rounding
to the integer value. */
-EALIGN (__round, 4, 0)
+ENTRY (__round, 4)
CALL_MCOUNT 0
lfd fp13,.LC0@toc(2)
fabs fp0,fp1
diff --git a/sysdeps/powerpc/powerpc64/fpu/s_roundf.S b/sysdeps/powerpc/powerpc64/fpu/s_roundf.S
index d213f43..18c39d5 100644
--- a/sysdeps/powerpc/powerpc64/fpu/s_roundf.S
+++ b/sysdeps/powerpc/powerpc64/fpu/s_roundf.S
@@ -37,7 +37,7 @@
"Round toward Zero" mode and round by adding +-0.5 before rounding
to the integer value. */
-EALIGN (__roundf, 4, 0)
+ENTRY (__roundf, 4)
CALL_MCOUNT 0
lfs fp13,.LC0@toc(2)
fabs fp0,fp1
diff --git a/sysdeps/powerpc/powerpc64/fpu/s_trunc.S b/sysdeps/powerpc/powerpc64/fpu/s_trunc.S
index 890eb21..1e356de 100644
--- a/sysdeps/powerpc/powerpc64/fpu/s_trunc.S
+++ b/sysdeps/powerpc/powerpc64/fpu/s_trunc.S
@@ -31,7 +31,7 @@
We set "round toward Zero" mode and trunc by adding +-2**52 then
subtracting +-2**52. */
-EALIGN (__trunc, 4, 0)
+ENTRY (__trunc, 4)
CALL_MCOUNT 0
lfd fp13,.LC0@toc(2)
fabs fp0,fp1
diff --git a/sysdeps/powerpc/powerpc64/fpu/s_truncf.S b/sysdeps/powerpc/powerpc64/fpu/s_truncf.S
index cfcff80..7d974f9 100644
--- a/sysdeps/powerpc/powerpc64/fpu/s_truncf.S
+++ b/sysdeps/powerpc/powerpc64/fpu/s_truncf.S
@@ -32,7 +32,7 @@
We set "round toward Zero" mode and trunc by adding +-2**23 then
subtracting +-2**23. */
-EALIGN (__truncf, 4, 0)
+ENTRY (__truncf, 4)
CALL_MCOUNT 0
lfs fp13,.LC0@toc(2)
fabs fp0,fp1
diff --git a/sysdeps/powerpc/powerpc64/lshift.S b/sysdeps/powerpc/powerpc64/lshift.S
index 480e386..e11b85d 100644
--- a/sysdeps/powerpc/powerpc64/lshift.S
+++ b/sysdeps/powerpc/powerpc64/lshift.S
@@ -28,7 +28,7 @@
#define U1 r31
#define RETVAL r5
-EALIGN(__mpn_lshift, 5, 0)
+ENTRY_TOCLESS (__mpn_lshift, 5)
std U1, -8(r1)
std U0, -16(r1)
subfic TNC, CNT, 64
diff --git a/sysdeps/powerpc/powerpc64/memcpy.S b/sysdeps/powerpc/powerpc64/memcpy.S
index a4c82c3..b6a1105 100644
--- a/sysdeps/powerpc/powerpc64/memcpy.S
+++ b/sysdeps/powerpc/powerpc64/memcpy.S
@@ -37,7 +37,7 @@
# define MEMCPY memcpy
#endif
-EALIGN (MEMCPY, 5, 0)
+ENTRY_TOCLESS (MEMCPY, 5)
CALL_MCOUNT 3
cmpldi cr1,5,31
diff --git a/sysdeps/powerpc/powerpc64/memset.S b/sysdeps/powerpc/powerpc64/memset.S
index f6581b5..34db4d7 100644
--- a/sysdeps/powerpc/powerpc64/memset.S
+++ b/sysdeps/powerpc/powerpc64/memset.S
@@ -35,7 +35,7 @@
# define MEMSET memset
#endif
-EALIGN (MEMSET, 5, 0)
+ENTRY (MEMSET, 5)
CALL_MCOUNT 3
#define rTMP r0
diff --git a/sysdeps/powerpc/powerpc64/mul_1.S b/sysdeps/powerpc/powerpc64/mul_1.S
index 68e85cb..f379180 100644
--- a/sysdeps/powerpc/powerpc64/mul_1.S
+++ b/sysdeps/powerpc/powerpc64/mul_1.S
@@ -24,7 +24,7 @@
#define N r5
#define VL r6
-EALIGN(__mpn_mul_1, 5, 0)
+ENTRY_TOCLESS (__mpn_mul_1, 5)
std r27, -40(r1)
std r26, -48(r1)
li r12, 0
diff --git a/sysdeps/powerpc/powerpc64/multiarch/strrchr-power8.S b/sysdeps/powerpc/powerpc64/multiarch/strrchr-power8.S
index a895dc6..2b2b1de 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/strrchr-power8.S
+++ b/sysdeps/powerpc/powerpc64/multiarch/strrchr-power8.S
@@ -18,14 +18,17 @@
#include <sysdep.h>
-#undef ENTRY
-#define ENTRY(name) \
- .section ".text"; \
- ENTRY_2(__strrchr_power8); \
- .align ALIGNARG(2); \
- BODY_LABEL(__strrchr_power8): \
- cfi_startproc; \
- LOCALENTRY(__strrchr_power8)
+#undef ENTRY_TOCLESS
+#ifndef PROF
+#define ENTRY_TOCLESS(name, ...) \
+ ENTRY_3 __strrchr_power8, ## __VA_ARGS__; \
+ cfi_startproc
+#else
+#define ENTRY_TOCLESS(name, ...) \
+ ENTRY_3 __strrchr_power8, ## __VA_ARGS__; \
+ cfi_startproc; \
+ LOCALENTRY(__strrchr_power8)
+#endif
#undef END
#define END(name) \
diff --git a/sysdeps/powerpc/powerpc64/power4/memcmp.S b/sysdeps/powerpc/powerpc64/power4/memcmp.S
index 6ca98e9..c366801 100644
--- a/sysdeps/powerpc/powerpc64/power4/memcmp.S
+++ b/sysdeps/powerpc/powerpc64/power4/memcmp.S
@@ -27,7 +27,7 @@
#endif
.machine power4
-EALIGN (MEMCMP, 4, 0)
+ENTRY_TOCLESS (MEMCMP, 4)
CALL_MCOUNT 3
#define rRTN r3
diff --git a/sysdeps/powerpc/powerpc64/power4/memcpy.S b/sysdeps/powerpc/powerpc64/power4/memcpy.S
index 2e96376..4bec39c 100644
--- a/sysdeps/powerpc/powerpc64/power4/memcpy.S
+++ b/sysdeps/powerpc/powerpc64/power4/memcpy.S
@@ -37,7 +37,7 @@
# define MEMCPY memcpy
#endif
.machine power4
-EALIGN (MEMCPY, 5, 0)
+ENTRY_TOCLESS (MEMCPY, 5)
CALL_MCOUNT 3
cmpldi cr1,5,31
diff --git a/sysdeps/powerpc/powerpc64/power4/memset.S b/sysdeps/powerpc/powerpc64/power4/memset.S
index a57214e..0aafce7 100644
--- a/sysdeps/powerpc/powerpc64/power4/memset.S
+++ b/sysdeps/powerpc/powerpc64/power4/memset.S
@@ -29,7 +29,7 @@
# define MEMSET memset
#endif
.machine power4
-EALIGN (MEMSET, 5, 0)
+ENTRY_TOCLESS (MEMSET, 5)
CALL_MCOUNT 3
#define rTMP r0
@@ -240,7 +240,7 @@ libc_hidden_builtin_def (memset)
/* Copied from bzero.S to prevent the linker from inserting a stub
between bzero and memset. */
-ENTRY (__bzero)
+ENTRY_TOCLESS (__bzero)
CALL_MCOUNT 3
mr r5,r4
li r4,0
diff --git a/sysdeps/powerpc/powerpc64/power4/strncmp.S b/sysdeps/powerpc/powerpc64/power4/strncmp.S
index 2b0c00d..2f978f6 100644
--- a/sysdeps/powerpc/powerpc64/power4/strncmp.S
+++ b/sysdeps/powerpc/powerpc64/power4/strncmp.S
@@ -26,7 +26,7 @@
/* int [r3] strncmp (const char *s1 [r3], const char *s2 [r4], size_t size [r5]) */
-EALIGN (STRNCMP, 4, 0)
+ENTRY_TOCLESS (STRNCMP, 4)
CALL_MCOUNT 3
#define rTMP2 r0
diff --git a/sysdeps/powerpc/powerpc64/power5+/fpu/s_ceil.S b/sysdeps/powerpc/powerpc64/power5+/fpu/s_ceil.S
index 39b7ee7..0d09e56 100644
--- a/sysdeps/powerpc/powerpc64/power5+/fpu/s_ceil.S
+++ b/sysdeps/powerpc/powerpc64/power5+/fpu/s_ceil.S
@@ -20,7 +20,7 @@
#include <math_ldbl_opt.h>
.machine "power5"
-EALIGN (__ceil, 4, 0)
+ENTRY_TOCLESS (__ceil, 4)
CALL_MCOUNT 0
frip fp1, fp1
blr
diff --git a/sysdeps/powerpc/powerpc64/power5+/fpu/s_ceilf.S b/sysdeps/powerpc/powerpc64/power5+/fpu/s_ceilf.S
index d1c6f26..3649660 100644
--- a/sysdeps/powerpc/powerpc64/power5+/fpu/s_ceilf.S
+++ b/sysdeps/powerpc/powerpc64/power5+/fpu/s_ceilf.S
@@ -19,7 +19,7 @@
#include <sysdep.h>
.machine "power5"
-EALIGN (__ceilf, 4, 0)
+ENTRY_TOCLESS (__ceilf, 4)
CALL_MCOUNT 0
frip fp1, fp1 /* The rounding instructions are double. */
frsp fp1, fp1 /* But we need to set ooverflow for float. */
diff --git a/sysdeps/powerpc/powerpc64/power5+/fpu/s_floor.S b/sysdeps/powerpc/powerpc64/power5+/fpu/s_floor.S
index 6411f15..f8bfb27 100644
--- a/sysdeps/powerpc/powerpc64/power5+/fpu/s_floor.S
+++ b/sysdeps/powerpc/powerpc64/power5+/fpu/s_floor.S
@@ -20,7 +20,7 @@
#include <math_ldbl_opt.h>
.machine "power5"
-EALIGN (__floor, 4, 0)
+ENTRY_TOCLESS (__floor, 4)
CALL_MCOUNT 0
frim fp1, fp1
blr
diff --git a/sysdeps/powerpc/powerpc64/power5+/fpu/s_floorf.S b/sysdeps/powerpc/powerpc64/power5+/fpu/s_floorf.S
index 26c3b25..fa8a13d 100644
--- a/sysdeps/powerpc/powerpc64/power5+/fpu/s_floorf.S
+++ b/sysdeps/powerpc/powerpc64/power5+/fpu/s_floorf.S
@@ -19,7 +19,7 @@
#include <sysdep.h>
.machine "power5"
-EALIGN (__floorf, 4, 0)
+ENTRY_TOCLESS (__floorf, 4)
CALL_MCOUNT 0
frim fp1, fp1 /* The rounding instructions are double. */
frsp fp1, fp1 /* But we need to set ooverflow for float. */
diff --git a/sysdeps/powerpc/powerpc64/power5+/fpu/s_llround.S b/sysdeps/powerpc/powerpc64/power5+/fpu/s_llround.S
index 909714b..4f9f850 100644
--- a/sysdeps/powerpc/powerpc64/power5+/fpu/s_llround.S
+++ b/sysdeps/powerpc/powerpc64/power5+/fpu/s_llround.S
@@ -30,7 +30,7 @@
round to zero instruction. */
.machine "power5"
-EALIGN (__llround, 4, 0)
+ENTRY_TOCLESS (__llround, 4)
CALL_MCOUNT 0
frin fp2, fp1 /* Round to nearest +-0.5. */
fctidz fp3, fp2 /* Convert To Integer DW round toward 0. */
diff --git a/sysdeps/powerpc/powerpc64/power5+/fpu/s_round.S b/sysdeps/powerpc/powerpc64/power5+/fpu/s_round.S
index dc46d20..0a124c8 100644
--- a/sysdeps/powerpc/powerpc64/power5+/fpu/s_round.S
+++ b/sysdeps/powerpc/powerpc64/power5+/fpu/s_round.S
@@ -20,7 +20,7 @@
#include <math_ldbl_opt.h>
.machine "power5"
-EALIGN (__round, 4, 0)
+ENTRY_TOCLESS (__round, 4)
CALL_MCOUNT 0
frin fp1, fp1
blr
diff --git a/sysdeps/powerpc/powerpc64/power5+/fpu/s_roundf.S b/sysdeps/powerpc/powerpc64/power5+/fpu/s_roundf.S
index 0a58784..39e28b4 100644
--- a/sysdeps/powerpc/powerpc64/power5+/fpu/s_roundf.S
+++ b/sysdeps/powerpc/powerpc64/power5+/fpu/s_roundf.S
@@ -19,7 +19,7 @@
#include <sysdep.h>
.machine "power5"
-EALIGN (__roundf, 4, 0)
+ENTRY_TOCLESS (__roundf, 4)
CALL_MCOUNT 0
frin fp1, fp1 /* The rounding instructions are double. */
frsp fp1, fp1 /* But we need to set ooverflow for float. */
diff --git a/sysdeps/powerpc/powerpc64/power5+/fpu/s_trunc.S b/sysdeps/powerpc/powerpc64/power5+/fpu/s_trunc.S
index 7f8290e..5fca9f3 100644
--- a/sysdeps/powerpc/powerpc64/power5+/fpu/s_trunc.S
+++ b/sysdeps/powerpc/powerpc64/power5+/fpu/s_trunc.S
@@ -20,7 +20,7 @@
#include <math_ldbl_opt.h>
.machine "power5"
-EALIGN (__trunc, 4, 0)
+ENTRY_TOCLESS (__trunc, 4)
CALL_MCOUNT 0
friz fp1, fp1
blr
diff --git a/sysdeps/powerpc/powerpc64/power5+/fpu/s_truncf.S b/sysdeps/powerpc/powerpc64/power5+/fpu/s_truncf.S
index 07f5d33..ced4b61 100644
--- a/sysdeps/powerpc/powerpc64/power5+/fpu/s_truncf.S
+++ b/sysdeps/powerpc/powerpc64/power5+/fpu/s_truncf.S
@@ -19,7 +19,7 @@
#include <sysdep.h>
.machine "power5"
-EALIGN (__truncf, 4, 0)
+ENTRY_TOCLESS (__truncf, 4)
CALL_MCOUNT 0
friz fp1, fp1 /* The rounding instructions are double. */
frsp fp1, fp1 /* But we need to set ooverflow for float. */
diff --git a/sysdeps/powerpc/powerpc64/power5/fpu/s_isnan.S b/sysdeps/powerpc/powerpc64/power5/fpu/s_isnan.S
index d6a829e..a4725f7 100644
--- a/sysdeps/powerpc/powerpc64/power5/fpu/s_isnan.S
+++ b/sysdeps/powerpc/powerpc64/power5/fpu/s_isnan.S
@@ -21,7 +21,7 @@
/* int __isnan(x) */
.machine power5
-EALIGN (__isnan, 4, 0)
+ENTRY_TOCLESS (__isnan, 4)
CALL_MCOUNT 0
stfd fp1,-8(r1) /* copy FPR to GPR */
lis r0,0x7ff0
diff --git a/sysdeps/powerpc/powerpc64/power6/fpu/s_copysign.S b/sysdeps/powerpc/powerpc64/power6/fpu/s_copysign.S
index ec36d1b..a64f1b8 100644
--- a/sysdeps/powerpc/powerpc64/power6/fpu/s_copysign.S
+++ b/sysdeps/powerpc/powerpc64/power6/fpu/s_copysign.S
@@ -27,7 +27,7 @@
.section ".text"
.type __copysign, @function
.machine power6
-EALIGN (__copysign, 4, 0)
+ENTRY_TOCLESS (__copysign, 4)
CALL_MCOUNT 0
fcpsgn fp1,fp2,fp1
blr
diff --git a/sysdeps/powerpc/powerpc64/power6/fpu/s_isnan.S b/sysdeps/powerpc/powerpc64/power6/fpu/s_isnan.S
index 85187b4..c95e4ae 100644
--- a/sysdeps/powerpc/powerpc64/power6/fpu/s_isnan.S
+++ b/sysdeps/powerpc/powerpc64/power6/fpu/s_isnan.S
@@ -21,7 +21,7 @@
/* int __isnan(x) */
.machine power6
-EALIGN (__isnan, 4, 0)
+ENTRY_TOCLESS (__isnan, 4)
CALL_MCOUNT 0
stfd fp1,-8(r1) /* copy FPR to GPR */
ori r1,r1,0
diff --git a/sysdeps/powerpc/powerpc64/power6/memcpy.S b/sysdeps/powerpc/powerpc64/power6/memcpy.S
index 1f7294b..ac177ca 100644
--- a/sysdeps/powerpc/powerpc64/power6/memcpy.S
+++ b/sysdeps/powerpc/powerpc64/power6/memcpy.S
@@ -44,7 +44,7 @@
# define MEMCPY memcpy
#endif
.machine "power6"
-EALIGN (MEMCPY, 7, 0)
+ENTRY_TOCLESS (MEMCPY, 7)
CALL_MCOUNT 3
cmpldi cr1,5,31
diff --git a/sysdeps/powerpc/powerpc64/power6/memset.S b/sysdeps/powerpc/powerpc64/power6/memset.S
index aee1c8e..8bbb8c4 100644
--- a/sysdeps/powerpc/powerpc64/power6/memset.S
+++ b/sysdeps/powerpc/powerpc64/power6/memset.S
@@ -29,7 +29,7 @@
# define MEMSET memset
#endif
.machine power6
-EALIGN (MEMSET, 7, 0)
+ENTRY_TOCLESS (MEMSET, 7)
CALL_MCOUNT 3
#define rTMP r0
@@ -384,7 +384,7 @@ libc_hidden_builtin_def (memset)
/* Copied from bzero.S to prevent the linker from inserting a stub
between bzero and memset. */
-ENTRY (__bzero)
+ENTRY_TOCLESS (__bzero)
CALL_MCOUNT 3
mr r5,r4
li r4,0
diff --git a/sysdeps/powerpc/powerpc64/power6x/fpu/s_isnan.S b/sysdeps/powerpc/powerpc64/power6x/fpu/s_isnan.S
index b6e11ba..d4b011d 100644
--- a/sysdeps/powerpc/powerpc64/power6x/fpu/s_isnan.S
+++ b/sysdeps/powerpc/powerpc64/power6x/fpu/s_isnan.S
@@ -21,7 +21,7 @@
/* int __isnan(x) */
.machine power6
-EALIGN (__isnan, 4, 0)
+ENTRY_TOCLESS (__isnan, 4)
CALL_MCOUNT 0
mftgpr r4,fp1 /* copy FPR to GPR */
lis r0,0x7ff0
diff --git a/sysdeps/powerpc/powerpc64/power6x/fpu/s_llrint.S b/sysdeps/powerpc/powerpc64/power6x/fpu/s_llrint.S
index 37aa690..f60d62f 100644
--- a/sysdeps/powerpc/powerpc64/power6x/fpu/s_llrint.S
+++ b/sysdeps/powerpc/powerpc64/power6x/fpu/s_llrint.S
@@ -21,7 +21,7 @@
.machine "power6"
/* long long int[r3] __llrint (double x[fp1]) */
-ENTRY (__llrint)
+ENTRY_TOCLESS (__llrint)
CALL_MCOUNT 0
fctid fp13,fp1
mftgpr r3,fp13
diff --git a/sysdeps/powerpc/powerpc64/power6x/fpu/s_llround.S b/sysdeps/powerpc/powerpc64/power6x/fpu/s_llround.S
index 62e1798..6d1db55 100644
--- a/sysdeps/powerpc/powerpc64/power6x/fpu/s_llround.S
+++ b/sysdeps/powerpc/powerpc64/power6x/fpu/s_llround.S
@@ -30,7 +30,7 @@
round to zero instruction. */
.machine "power6"
-ENTRY (__llround)
+ENTRY_TOCLESS (__llround)
CALL_MCOUNT 0
frin fp2,fp1 /* Round to nearest +-0.5. */
fctidz fp3,fp2 /* Convert To Integer DW round toward 0. */
diff --git a/sysdeps/powerpc/powerpc64/power7/add_n.S b/sysdeps/powerpc/powerpc64/power7/add_n.S
index 6425afb..02335c1 100644
--- a/sysdeps/powerpc/powerpc64/power7/add_n.S
+++ b/sysdeps/powerpc/powerpc64/power7/add_n.S
@@ -36,7 +36,7 @@
#define VP r5
#define N r6
-EALIGN(FUNC, 5, 0)
+ENTRY_TOCLESS (FUNC, 5)
#ifdef USE_AS_SUB
addic r0, r0, 0
#else
diff --git a/sysdeps/powerpc/powerpc64/power7/fpu/s_finite.S b/sysdeps/powerpc/powerpc64/power7/fpu/s_finite.S
index 9ccc758..1360289 100644
--- a/sysdeps/powerpc/powerpc64/power7/fpu/s_finite.S
+++ b/sysdeps/powerpc/powerpc64/power7/fpu/s_finite.S
@@ -27,7 +27,7 @@
.section ".text"
.type __finite, @function
.machine power7
-EALIGN (__finite, 4, 0)
+ENTRY (__finite, 4)
CALL_MCOUNT 0
lfd fp0,.LC0@toc(r2)
ftdiv cr7,fp1,fp0
diff --git a/sysdeps/powerpc/powerpc64/power7/fpu/s_isinf.S b/sysdeps/powerpc/powerpc64/power7/fpu/s_isinf.S
index 4482cdd..7c21c78 100644
--- a/sysdeps/powerpc/powerpc64/power7/fpu/s_isinf.S
+++ b/sysdeps/powerpc/powerpc64/power7/fpu/s_isinf.S
@@ -27,7 +27,7 @@
.section ".text"
.type __isinf, @function
.machine power7
-EALIGN (__isinf, 4, 0)
+ENTRY (__isinf, 4)
CALL_MCOUNT 0
lfd fp0,.LC0@toc(r2)
ftdiv cr7,fp1,fp0
diff --git a/sysdeps/powerpc/powerpc64/power7/fpu/s_isnan.S b/sysdeps/powerpc/powerpc64/power7/fpu/s_isnan.S
index 46b08a0..8a925a2 100644
--- a/sysdeps/powerpc/powerpc64/power7/fpu/s_isnan.S
+++ b/sysdeps/powerpc/powerpc64/power7/fpu/s_isnan.S
@@ -27,7 +27,7 @@
.section ".text"
.type __isnan, @function
.machine power7
-EALIGN (__isnan, 4, 0)
+ENTRY (__isnan, 4)
CALL_MCOUNT 0
lfd fp0,.LC0@toc(r2)
ftdiv cr7,fp1,fp0
diff --git a/sysdeps/powerpc/powerpc64/power7/memchr.S b/sysdeps/powerpc/powerpc64/power7/memchr.S
index 5e9707a..ec3ea62 100644
--- a/sysdeps/powerpc/powerpc64/power7/memchr.S
+++ b/sysdeps/powerpc/powerpc64/power7/memchr.S
@@ -25,7 +25,7 @@
# define MEMCHR __memchr
#endif
.machine power7
-ENTRY (MEMCHR)
+ENTRY_TOCLESS (MEMCHR)
CALL_MCOUNT 3
dcbt 0,r3
clrrdi r8,r3,3
diff --git a/sysdeps/powerpc/powerpc64/power7/memcmp.S b/sysdeps/powerpc/powerpc64/power7/memcmp.S
index 96ce8ce..bee0424 100644
--- a/sysdeps/powerpc/powerpc64/power7/memcmp.S
+++ b/sysdeps/powerpc/powerpc64/power7/memcmp.S
@@ -25,7 +25,7 @@
# define MEMCMP memcmp
#endif
.machine power7
-EALIGN (MEMCMP, 4, 0)
+ENTRY_TOCLESS (MEMCMP, 4)
CALL_MCOUNT 3
#define rRTN r3
diff --git a/sysdeps/powerpc/powerpc64/power7/memcpy.S b/sysdeps/powerpc/powerpc64/power7/memcpy.S
index e08993c..641c7e2 100644
--- a/sysdeps/powerpc/powerpc64/power7/memcpy.S
+++ b/sysdeps/powerpc/powerpc64/power7/memcpy.S
@@ -32,7 +32,7 @@
#define cnt 5
.machine power7
-EALIGN (MEMCPY, 5, 0)
+ENTRY_TOCLESS (MEMCPY, 5)
CALL_MCOUNT 3
cmpldi cr1,cnt,31
diff --git a/sysdeps/powerpc/powerpc64/power7/memmove.S b/sysdeps/powerpc/powerpc64/power7/memmove.S
index 4c0f7c3..93baa69 100644
--- a/sysdeps/powerpc/powerpc64/power7/memmove.S
+++ b/sysdeps/powerpc/powerpc64/power7/memmove.S
@@ -31,7 +31,7 @@
# define MEMMOVE memmove
#endif
.machine power7
-EALIGN (MEMMOVE, 5, 0)
+ENTRY_TOCLESS (MEMMOVE, 5)
CALL_MCOUNT 3
L(_memmove):
@@ -826,7 +826,7 @@ libc_hidden_builtin_def (memmove)
/* void bcopy(const void *src [r3], void *dest [r4], size_t n [r5])
Implemented in this file to avoid linker create a stub function call
in the branch to '_memmove'. */
-ENTRY (__bcopy)
+ENTRY_TOCLESS (__bcopy)
mr r6,r3
mr r3,r4
mr r4,r6
diff --git a/sysdeps/powerpc/powerpc64/power7/mempcpy.S b/sysdeps/powerpc/powerpc64/power7/mempcpy.S
index 4e15d1e..904fac5 100644
--- a/sysdeps/powerpc/powerpc64/power7/mempcpy.S
+++ b/sysdeps/powerpc/powerpc64/power7/mempcpy.S
@@ -27,7 +27,7 @@
# define MEMPCPY __mempcpy
#endif
.machine power7
-EALIGN (MEMPCPY, 5, 0)
+ENTRY_TOCLESS (MEMPCPY, 5)
CALL_MCOUNT 3
cmpldi cr1,5,31
diff --git a/sysdeps/powerpc/powerpc64/power7/memrchr.S b/sysdeps/powerpc/powerpc64/power7/memrchr.S
index 4276768..92b9d19 100644
--- a/sysdeps/powerpc/powerpc64/power7/memrchr.S
+++ b/sysdeps/powerpc/powerpc64/power7/memrchr.S
@@ -25,7 +25,7 @@
# define MEMRCHR __memrchr
#endif
.machine power7
-ENTRY (MEMRCHR)
+ENTRY_TOCLESS (MEMRCHR)
CALL_MCOUNT 3
add r7,r3,r5 /* Calculate the last acceptable address. */
neg r0,r7
diff --git a/sysdeps/powerpc/powerpc64/power7/memset.S b/sysdeps/powerpc/powerpc64/power7/memset.S
index 21933c0..f2e2fa1 100644
--- a/sysdeps/powerpc/powerpc64/power7/memset.S
+++ b/sysdeps/powerpc/powerpc64/power7/memset.S
@@ -26,7 +26,7 @@
# define MEMSET memset
#endif
.machine power7
-EALIGN (MEMSET, 5, 0)
+ENTRY_TOCLESS (MEMSET, 5)
CALL_MCOUNT 3
L(_memset):
@@ -388,7 +388,7 @@ libc_hidden_builtin_def (memset)
/* Copied from bzero.S to prevent the linker from inserting a stub
between bzero and memset. */
-ENTRY (__bzero)
+ENTRY_TOCLESS (__bzero)
CALL_MCOUNT 3
mr r5,r4
li r4,0
diff --git a/sysdeps/powerpc/powerpc64/power7/rawmemchr.S b/sysdeps/powerpc/powerpc64/power7/rawmemchr.S
index 48afb75..86ea4a6 100644
--- a/sysdeps/powerpc/powerpc64/power7/rawmemchr.S
+++ b/sysdeps/powerpc/powerpc64/power7/rawmemchr.S
@@ -25,7 +25,7 @@
# define RAWMEMCHR __rawmemchr
#endif
.machine power7
-ENTRY (RAWMEMCHR)
+ENTRY_TOCLESS (RAWMEMCHR)
CALL_MCOUNT 2
dcbt 0,r3
clrrdi r8,r3,3 /* Align the address to doubleword boundary. */
diff --git a/sysdeps/powerpc/powerpc64/power7/strcasecmp.S b/sysdeps/powerpc/powerpc64/power7/strcasecmp.S
index e856b8a..2243187 100644
--- a/sysdeps/powerpc/powerpc64/power7/strcasecmp.S
+++ b/sysdeps/powerpc/powerpc64/power7/strcasecmp.S
@@ -31,10 +31,11 @@
# define STRCMP strcasecmp
#endif
-ENTRY (__STRCMP)
#ifndef USE_IN_EXTENDED_LOCALE_MODEL
+ENTRY (__STRCMP)
CALL_MCOUNT 2
#else
+ENTRY_TOCLESS (__STRCMP)
CALL_MCOUNT 3
#endif
diff --git a/sysdeps/powerpc/powerpc64/power7/strchr.S b/sysdeps/powerpc/powerpc64/power7/strchr.S
index a18e2e1..1d53dbe 100644
--- a/sysdeps/powerpc/powerpc64/power7/strchr.S
+++ b/sysdeps/powerpc/powerpc64/power7/strchr.S
@@ -25,7 +25,7 @@
/* int [r3] strchr (char *s [r3], int c [r4]) */
.machine power7
-ENTRY (STRCHR)
+ENTRY_TOCLESS (STRCHR)
CALL_MCOUNT 2
dcbt 0,r3
clrrdi r8,r3,3 /* Align the address to doubleword boundary. */
diff --git a/sysdeps/powerpc/powerpc64/power7/strchrnul.S b/sysdeps/powerpc/powerpc64/power7/strchrnul.S
index 27bc1f0..eb69953 100644
--- a/sysdeps/powerpc/powerpc64/power7/strchrnul.S
+++ b/sysdeps/powerpc/powerpc64/power7/strchrnul.S
@@ -24,7 +24,7 @@
#endif
/* int [r3] strchrnul (char *s [r3], int c [r4]) */
.machine power7
-ENTRY (STRCHRNUL)
+ENTRY_TOCLESS (STRCHRNUL)
CALL_MCOUNT 2
dcbt 0,r3
clrrdi r8,r3,3 /* Align the address to doubleword boundary. */
diff --git a/sysdeps/powerpc/powerpc64/power7/strcmp.S b/sysdeps/powerpc/powerpc64/power7/strcmp.S
index 14e14f4..69b1ff9 100644
--- a/sysdeps/powerpc/powerpc64/power7/strcmp.S
+++ b/sysdeps/powerpc/powerpc64/power7/strcmp.S
@@ -30,7 +30,7 @@
/* int [r3] strcmp (const char *s1 [r3], const char *s2 [r4]) */
.machine power7
-EALIGN (STRCMP, 4, 0)
+ENTRY_TOCLESS (STRCMP, 4)
CALL_MCOUNT 2
or r9, r3, r4
diff --git a/sysdeps/powerpc/powerpc64/power7/strlen.S b/sysdeps/powerpc/powerpc64/power7/strlen.S
index 63848c4..317dad5 100644
--- a/sysdeps/powerpc/powerpc64/power7/strlen.S
+++ b/sysdeps/powerpc/powerpc64/power7/strlen.S
@@ -25,7 +25,7 @@
# define STRLEN strlen
#endif
.machine power7
-ENTRY (STRLEN)
+ENTRY_TOCLESS (STRLEN)
CALL_MCOUNT 1
dcbt 0,r3
clrrdi r4,r3,3 /* Align the address to doubleword boundary. */
diff --git a/sysdeps/powerpc/powerpc64/power7/strncmp.S b/sysdeps/powerpc/powerpc64/power7/strncmp.S
index d53b31b..ffe7e8e 100644
--- a/sysdeps/powerpc/powerpc64/power7/strncmp.S
+++ b/sysdeps/powerpc/powerpc64/power7/strncmp.S
@@ -28,7 +28,7 @@
const char *s2 [r4],
size_t size [r5]) */
-EALIGN (STRNCMP,5,0)
+ENTRY_TOCLESS (STRNCMP, 5)
CALL_MCOUNT 3
#define rTMP2 r0
diff --git a/sysdeps/powerpc/powerpc64/power7/strncpy.S b/sysdeps/powerpc/powerpc64/power7/strncpy.S
index 88d7979..b2833b8 100644
--- a/sysdeps/powerpc/powerpc64/power7/strncpy.S
+++ b/sysdeps/powerpc/powerpc64/power7/strncpy.S
@@ -67,7 +67,11 @@
#endif
.machine power7
-EALIGN(FUNC_NAME, 4, 0)
+#ifdef MEMSET_is_local
+ENTRY_TOCLESS (FUNC_NAME, 4)
+#else
+ENTRY (FUNC_NAME, 4)
+#endif
CALL_MCOUNT 3
mflr r0 /* load link register LR to r0 */
diff --git a/sysdeps/powerpc/powerpc64/power7/strnlen.S b/sysdeps/powerpc/powerpc64/power7/strnlen.S
index a970b6c..0ee659f 100644
--- a/sysdeps/powerpc/powerpc64/power7/strnlen.S
+++ b/sysdeps/powerpc/powerpc64/power7/strnlen.S
@@ -25,7 +25,7 @@
/* int [r3] strnlen (char *s [r3], int size [r4]) */
.machine power7
-ENTRY (STRNLEN)
+ENTRY_TOCLESS (STRNLEN)
CALL_MCOUNT 2
dcbt 0,r3
clrrdi r8,r3,3
diff --git a/sysdeps/powerpc/powerpc64/power7/strrchr.S b/sysdeps/powerpc/powerpc64/power7/strrchr.S
index c22393d..98310e4 100644
--- a/sysdeps/powerpc/powerpc64/power7/strrchr.S
+++ b/sysdeps/powerpc/powerpc64/power7/strrchr.S
@@ -25,7 +25,7 @@
#endif
.machine power7
-ENTRY (STRRCHR)
+ENTRY_TOCLESS (STRRCHR)
CALL_MCOUNT 2
dcbt 0,r3
clrrdi r8,r3,3 /* Align the address to doubleword boundary. */
diff --git a/sysdeps/powerpc/powerpc64/power7/strstr.S b/sysdeps/powerpc/powerpc64/power7/strstr.S
index 1c43253..c2d727d 100644
--- a/sysdeps/powerpc/powerpc64/power7/strstr.S
+++ b/sysdeps/powerpc/powerpc64/power7/strstr.S
@@ -62,7 +62,8 @@
#define FRAMESIZE (FRAME_MIN_SIZE+32)
.machine power7
-EALIGN (STRSTR, 4, 0)
+/* Can't be ENTRY_TOCLESS due to calling __strstr_ppc which uses r2. */
+ENTRY (STRSTR, 4)
CALL_MCOUNT 2
mflr r0 /* Load link register LR to r0. */
std r31, -8(r1) /* Save callers register r31. */
diff --git a/sysdeps/powerpc/powerpc64/power8/fpu/e_expf.S b/sysdeps/powerpc/powerpc64/power8/fpu/e_expf.S
index 4c42926..d9433d8 100644
--- a/sysdeps/powerpc/powerpc64/power8/fpu/e_expf.S
+++ b/sysdeps/powerpc/powerpc64/power8/fpu/e_expf.S
@@ -55,7 +55,7 @@
float [fp1] expf (float [fp1] x) */
.machine power8
-EALIGN(__ieee754_expf, 4, 0)
+ENTRY (__ieee754_expf, 4)
addis DATA_OFFSET,r2,.Lanchor@toc@ha
addi DATA_OFFSET,DATA_OFFSET,.Lanchor@toc@l
diff --git a/sysdeps/powerpc/powerpc64/power8/fpu/s_cosf.S b/sysdeps/powerpc/powerpc64/power8/fpu/s_cosf.S
index 8dfa007..d45496d 100644
--- a/sysdeps/powerpc/powerpc64/power8/fpu/s_cosf.S
+++ b/sysdeps/powerpc/powerpc64/power8/fpu/s_cosf.S
@@ -39,7 +39,7 @@
float [fp1] cosf (float [fp1] x) */
.machine power8
-EALIGN(__cosf, 4, 0)
+ENTRY (__cosf, 4)
addis r9,r2,L(anchor)@toc@ha
addi r9,r9,L(anchor)@toc@l
diff --git a/sysdeps/powerpc/powerpc64/power8/fpu/s_finite.S b/sysdeps/powerpc/powerpc64/power8/fpu/s_finite.S
index fcdcb60..80181b7 100644
--- a/sysdeps/powerpc/powerpc64/power8/fpu/s_finite.S
+++ b/sysdeps/powerpc/powerpc64/power8/fpu/s_finite.S
@@ -23,7 +23,7 @@
/* int [r3] __finite ([fp1] x) */
-EALIGN (__finite, 4, 0)
+ENTRY_TOCLESS (__finite, 4)
CALL_MCOUNT 0
MFVSRD_R3_V1
lis r9,0x8010
diff --git a/sysdeps/powerpc/powerpc64/power8/fpu/s_isinf.S b/sysdeps/powerpc/powerpc64/power8/fpu/s_isinf.S
index 32814e4..01f57a8 100644
--- a/sysdeps/powerpc/powerpc64/power8/fpu/s_isinf.S
+++ b/sysdeps/powerpc/powerpc64/power8/fpu/s_isinf.S
@@ -23,7 +23,7 @@
/* int [r3] __isinf([fp1] x) */
-EALIGN (__isinf, 4, 0)
+ENTRY_TOCLESS (__isinf, 4)
CALL_MCOUNT 0
MFVSRD_R3_V1
lis r9,0x7ff0 /* r9 = 0x7ff0 */
diff --git a/sysdeps/powerpc/powerpc64/power8/fpu/s_isnan.S b/sysdeps/powerpc/powerpc64/power8/fpu/s_isnan.S
index af52e50..87be552 100644
--- a/sysdeps/powerpc/powerpc64/power8/fpu/s_isnan.S
+++ b/sysdeps/powerpc/powerpc64/power8/fpu/s_isnan.S
@@ -23,7 +23,7 @@
/* int [r3] __isnan([f1] x) */
-EALIGN (__isnan, 4, 0)
+ENTRY_TOCLESS (__isnan, 4)
CALL_MCOUNT 0
MFVSRD_R3_V1
lis r9,0x7ff0
diff --git a/sysdeps/powerpc/powerpc64/power8/fpu/s_llrint.S b/sysdeps/powerpc/powerpc64/power8/fpu/s_llrint.S
index aa180b6..6980abc 100644
--- a/sysdeps/powerpc/powerpc64/power8/fpu/s_llrint.S
+++ b/sysdeps/powerpc/powerpc64/power8/fpu/s_llrint.S
@@ -22,7 +22,7 @@
#define MFVSRD_R3_V1 .long 0x7c230066 /* mfvsrd r3,vs1 */
/* long long int[r3] __llrint (double x[fp1]) */
-ENTRY (__llrint)
+ENTRY_TOCLESS (__llrint)
CALL_MCOUNT 0
fctid fp1,fp1
MFVSRD_R3_V1
diff --git a/sysdeps/powerpc/powerpc64/power8/fpu/s_llround.S b/sysdeps/powerpc/powerpc64/power8/fpu/s_llround.S
index 043fc6a..8bdc162 100644
--- a/sysdeps/powerpc/powerpc64/power8/fpu/s_llround.S
+++ b/sysdeps/powerpc/powerpc64/power8/fpu/s_llround.S
@@ -24,7 +24,7 @@
/* long long [r3] llround (float x [fp1]) */
-ENTRY (__llround)
+ENTRY_TOCLESS (__llround)
CALL_MCOUNT 0
frin fp1,fp1 /* Round to nearest +-0.5. */
fctidz fp1,fp1 /* Convert To Integer DW round toward 0. */
diff --git a/sysdeps/powerpc/powerpc64/power8/fpu/s_sinf.S b/sysdeps/powerpc/powerpc64/power8/fpu/s_sinf.S
index fb0add3..d5335d8 100644
--- a/sysdeps/powerpc/powerpc64/power8/fpu/s_sinf.S
+++ b/sysdeps/powerpc/powerpc64/power8/fpu/s_sinf.S
@@ -39,7 +39,7 @@
float [fp1] sinf (float [fp1] x) */
.machine power8
-EALIGN(__sinf, 4, 0)
+ENTRY (__sinf, 4)
addis r9,r2,L(anchor)@toc@ha
addi r9,r9,L(anchor)@toc@l
diff --git a/sysdeps/powerpc/powerpc64/power8/memcmp.S b/sysdeps/powerpc/powerpc64/power8/memcmp.S
index 46b9c00..ba8cd13 100644
--- a/sysdeps/powerpc/powerpc64/power8/memcmp.S
+++ b/sysdeps/powerpc/powerpc64/power8/memcmp.S
@@ -29,7 +29,7 @@
# define MEMCMP memcmp
#endif
.machine power7
-EALIGN (MEMCMP, 4, 0)
+ENTRY_TOCLESS (MEMCMP, 4)
CALL_MCOUNT 3
#define rRTN r3
diff --git a/sysdeps/powerpc/powerpc64/power8/memset.S b/sysdeps/powerpc/powerpc64/power8/memset.S
index bc734c9..7ad3bb1 100644
--- a/sysdeps/powerpc/powerpc64/power8/memset.S
+++ b/sysdeps/powerpc/powerpc64/power8/memset.S
@@ -31,7 +31,7 @@
handled by the define. It avoid breakage on binutils
that does not support this machine specifier. */
.machine power7
-EALIGN (MEMSET, 5, 0)
+ENTRY_TOCLESS (MEMSET, 5)
CALL_MCOUNT 3
L(_memset):
@@ -447,7 +447,7 @@ libc_hidden_builtin_def (memset)
/* Copied from bzero.S to prevent the linker from inserting a stub
between bzero and memset. */
-ENTRY (__bzero)
+ENTRY_TOCLESS (__bzero)
CALL_MCOUNT 3
mr r5,r4
li r4,0
diff --git a/sysdeps/powerpc/powerpc64/power8/strcasestr.S b/sysdeps/powerpc/powerpc64/power8/strcasestr.S
index 6ac6572..3f59cb0 100644
--- a/sysdeps/powerpc/powerpc64/power8/strcasestr.S
+++ b/sysdeps/powerpc/powerpc64/power8/strcasestr.S
@@ -85,7 +85,7 @@
/* TODO: change this to .machine power8 when the minimum required binutils
allows it. */
.machine power7
-EALIGN (STRCASESTR, 4, 0)
+ENTRY (STRCASESTR, 4)
CALL_MCOUNT 2
mflr r0 /* Load link register LR to r0. */
std r31, -8(r1) /* Save callers register r31. */
diff --git a/sysdeps/powerpc/powerpc64/power8/strchr.S b/sysdeps/powerpc/powerpc64/power8/strchr.S
index e0c185c..63f7533 100644
--- a/sysdeps/powerpc/powerpc64/power8/strchr.S
+++ b/sysdeps/powerpc/powerpc64/power8/strchr.S
@@ -44,7 +44,7 @@
/* TODO: change this to .machine power8 when the minimum required binutils
allows it. */
.machine power7
-ENTRY (FUNC_NAME)
+ENTRY_TOCLESS (FUNC_NAME)
CALL_MCOUNT 2
dcbt 0,r3
clrrdi r8,r3,3 /* Align the address to doubleword boundary. */
diff --git a/sysdeps/powerpc/powerpc64/power8/strcmp.S b/sysdeps/powerpc/powerpc64/power8/strcmp.S
index 770484f..ff19f7f 100644
--- a/sysdeps/powerpc/powerpc64/power8/strcmp.S
+++ b/sysdeps/powerpc/powerpc64/power8/strcmp.S
@@ -31,7 +31,7 @@
64K as default, the page cross handling assumes minimum page size of
4k. */
-EALIGN (STRCMP, 4, 0)
+ENTRY_TOCLESS (STRCMP, 4)
li r0,0
/* Check if [s1]+16 or [s2]+16 will cross a 4K page boundary using
diff --git a/sysdeps/powerpc/powerpc64/power8/strcpy.S b/sysdeps/powerpc/powerpc64/power8/strcpy.S
index 7f2cee4..13e7a0f 100644
--- a/sysdeps/powerpc/powerpc64/power8/strcpy.S
+++ b/sysdeps/powerpc/powerpc64/power8/strcpy.S
@@ -48,7 +48,7 @@
4k. */
.machine power7
-EALIGN (FUNC_NAME, 4, 0)
+ENTRY_TOCLESS (FUNC_NAME, 4)
li r0,0 /* Doubleword with null chars to use
with cmpb. */
diff --git a/sysdeps/powerpc/powerpc64/power8/strlen.S b/sysdeps/powerpc/powerpc64/power8/strlen.S
index 8f4a1fc..8fdb6f5 100644
--- a/sysdeps/powerpc/powerpc64/power8/strlen.S
+++ b/sysdeps/powerpc/powerpc64/power8/strlen.S
@@ -36,7 +36,7 @@
/* TODO: change this to .machine power8 when the minimum required binutils
allows it. */
.machine power7
-EALIGN (STRLEN, 4, 0)
+ENTRY_TOCLESS (STRLEN, 4)
CALL_MCOUNT 1
dcbt 0,r3
clrrdi r4,r3,3 /* Align the address to doubleword boundary. */
diff --git a/sysdeps/powerpc/powerpc64/power8/strncmp.S b/sysdeps/powerpc/powerpc64/power8/strncmp.S
index 3d8df90..84bfcb1 100644
--- a/sysdeps/powerpc/powerpc64/power8/strncmp.S
+++ b/sysdeps/powerpc/powerpc64/power8/strncmp.S
@@ -32,7 +32,7 @@
4k. */
.machine power7
-EALIGN (STRNCMP, 4, 0)
+ENTRY_TOCLESS (STRNCMP, 4)
/* Check if size is 0. */
mr. r10,r5
beq cr0,L(ret0)
diff --git a/sysdeps/powerpc/powerpc64/power8/strncpy.S b/sysdeps/powerpc/powerpc64/power8/strncpy.S
index 552c5cc..150290a 100644
--- a/sysdeps/powerpc/powerpc64/power8/strncpy.S
+++ b/sysdeps/powerpc/powerpc64/power8/strncpy.S
@@ -61,7 +61,11 @@
4k. */
.machine power7
-EALIGN (FUNC_NAME, 4, 0)
+#ifdef MEMSET_is_local
+ENTRY_TOCLESS (FUNC_NAME, 4)
+#else
+ENTRY (FUNC_NAME, 4)
+#endif
CALL_MCOUNT 3
/* Check if the [src]+15 will cross a 4K page by checking if the bit
diff --git a/sysdeps/powerpc/powerpc64/power8/strnlen.S b/sysdeps/powerpc/powerpc64/power8/strnlen.S
index 3eadbfb..07608ff 100644
--- a/sysdeps/powerpc/powerpc64/power8/strnlen.S
+++ b/sysdeps/powerpc/powerpc64/power8/strnlen.S
@@ -59,7 +59,7 @@
/* int [r3] strnlen (char *s [r3], size_t maxlen [r4]) */
/* TODO: change to power8 when minimum required binutils allows it. */
.machine power7
-ENTRY (__strnlen)
+ENTRY_TOCLESS (__strnlen)
CALL_MCOUNT 2
dcbt 0,r3
diff --git a/sysdeps/powerpc/powerpc64/power8/strrchr.S b/sysdeps/powerpc/powerpc64/power8/strrchr.S
index 8eb7485..0ba6138 100644
--- a/sysdeps/powerpc/powerpc64/power8/strrchr.S
+++ b/sysdeps/powerpc/powerpc64/power8/strrchr.S
@@ -77,7 +77,7 @@
vsumsws v2, v2, v0;
#endif /* !__LITTLE_ENDIAN__ */
.machine power7
-ENTRY (strrchr)
+ENTRY_TOCLESS (strrchr)
CALL_MCOUNT 2
dcbt 0,r3
clrrdi r8,r3,3 /* Align the address to doubleword boundary. */
diff --git a/sysdeps/powerpc/powerpc64/power8/strspn.S b/sysdeps/powerpc/powerpc64/power8/strspn.S
index e927189..dcd1df4 100644
--- a/sysdeps/powerpc/powerpc64/power8/strspn.S
+++ b/sysdeps/powerpc/powerpc64/power8/strspn.S
@@ -68,7 +68,7 @@
/* This can be updated to power8 once the minimum version of
binutils supports power8 and the above instructions. */
.machine power7
-EALIGN(STRSPN, 4, 0)
+ENTRY_TOCLESS (STRSPN, 4)
CALL_MCOUNT 2
/* Generate useful constants for later on. */
diff --git a/sysdeps/powerpc/powerpc64/power9/strcmp.S b/sysdeps/powerpc/powerpc64/power9/strcmp.S
index 2dc4f6c..87883ef 100644
--- a/sysdeps/powerpc/powerpc64/power9/strcmp.S
+++ b/sysdeps/powerpc/powerpc64/power9/strcmp.S
@@ -66,7 +66,7 @@
allows it. */
.machine power7
-EALIGN (STRCMP, 4, 0)
+ENTRY_TOCLESS (STRCMP, 4)
li r0, 0
/* Check if [s1]+16 or [s2]+16 will cross a 4K page boundary using
diff --git a/sysdeps/powerpc/powerpc64/power9/strncmp.S b/sysdeps/powerpc/powerpc64/power9/strncmp.S
index c946a5c..ff6f8ac 100644
--- a/sysdeps/powerpc/powerpc64/power9/strncmp.S
+++ b/sysdeps/powerpc/powerpc64/power9/strncmp.S
@@ -68,7 +68,7 @@
/* TODO: change this to .machine power9 when minimum binutils
is upgraded to 2.27. */
.machine power7
-EALIGN (STRNCMP, 4, 0)
+ENTRY_TOCLESS (STRNCMP, 4)
/* Check if size is 0. */
cmpdi cr0, r5, 0
beq cr0, L(ret0)
diff --git a/sysdeps/powerpc/powerpc64/ppc-mcount.S b/sysdeps/powerpc/powerpc64/ppc-mcount.S
index 8312f46..6936211 100644
--- a/sysdeps/powerpc/powerpc64/ppc-mcount.S
+++ b/sysdeps/powerpc/powerpc64/ppc-mcount.S
@@ -24,13 +24,15 @@
ENTRY(_mcount)
mflr r4
ld r11, 0(r1)
+ std r4, FRAME_LR_SAVE(r1)
stdu r1,-FRAME_MIN_SIZE(r1)
cfi_adjust_cfa_offset (FRAME_MIN_SIZE)
- std r4, FRAME_MIN_SIZE+FRAME_LR_SAVE(r1)
cfi_offset (lr, FRAME_LR_SAVE)
ld r3, FRAME_LR_SAVE(r11)
bl JUMPTARGET(__mcount_internal)
+#ifndef SHARED
nop
+#endif
ld r0, FRAME_MIN_SIZE+FRAME_LR_SAVE(r1)
mtlr r0
addi r1,r1,FRAME_MIN_SIZE
diff --git a/sysdeps/powerpc/powerpc64/start.S b/sysdeps/powerpc/powerpc64/start.S
index 937c39a..05ed67e 100644
--- a/sysdeps/powerpc/powerpc64/start.S
+++ b/sysdeps/powerpc/powerpc64/start.S
@@ -62,7 +62,7 @@ L(start_addresses):
.L01:
.tc L(start_addresses)[TC],L(start_addresses)
.section ".text"
-ENTRY(_start)
+ENTRY (_start)
/* Save the stack pointer, in case we're statically linked under Linux. */
mr r9,r1
/* Set up an initial stack frame, and clear the LR. */
@@ -78,7 +78,7 @@ ENTRY(_start)
/* and continue in libc-start, in glibc. */
b JUMPTARGET(__libc_start_main)
-/* The linker needs this nop to recognize that it's OK to call via a
+/* Older versions of ld need this nop to recognize that it's OK to call via a
TOC adjusting stub. */
nop
diff --git a/sysdeps/powerpc/powerpc64/strchr.S b/sysdeps/powerpc/powerpc64/strchr.S
index cbfcc14..c0ddb00 100644
--- a/sysdeps/powerpc/powerpc64/strchr.S
+++ b/sysdeps/powerpc/powerpc64/strchr.S
@@ -26,7 +26,7 @@
# define STRCHR strchr
#endif
-ENTRY (STRCHR)
+ENTRY_TOCLESS (STRCHR)
CALL_MCOUNT 2
#define rTMP1 r0
diff --git a/sysdeps/powerpc/powerpc64/strcmp.S b/sysdeps/powerpc/powerpc64/strcmp.S
index ab5f8c2..69b953f 100644
--- a/sysdeps/powerpc/powerpc64/strcmp.S
+++ b/sysdeps/powerpc/powerpc64/strcmp.S
@@ -26,7 +26,7 @@
# define STRCMP strcmp
#endif
-EALIGN (STRCMP, 4, 0)
+ENTRY_TOCLESS (STRCMP, 4)
CALL_MCOUNT 2
#define rTMP2 r0
diff --git a/sysdeps/powerpc/powerpc64/strlen.S b/sysdeps/powerpc/powerpc64/strlen.S
index 1466624..0d8a38b 100644
--- a/sysdeps/powerpc/powerpc64/strlen.S
+++ b/sysdeps/powerpc/powerpc64/strlen.S
@@ -84,7 +84,7 @@
# define STRLEN strlen
#endif
-ENTRY (STRLEN)
+ENTRY_TOCLESS (STRLEN)
CALL_MCOUNT 1
#define rTMP4 r0
diff --git a/sysdeps/powerpc/powerpc64/strncmp.S b/sysdeps/powerpc/powerpc64/strncmp.S
index 0765998..c314293 100644
--- a/sysdeps/powerpc/powerpc64/strncmp.S
+++ b/sysdeps/powerpc/powerpc64/strncmp.S
@@ -26,7 +26,7 @@
# define STRNCMP strncmp
#endif
-EALIGN (STRNCMP, 4, 0)
+ENTRY_TOCLESS (STRNCMP, 4)
CALL_MCOUNT 3
#define rTMP2 r0
diff --git a/sysdeps/powerpc/powerpc64/sysdep.h b/sysdeps/powerpc/powerpc64/sysdep.h
index 860420e..ab5f395 100644
--- a/sysdeps/powerpc/powerpc64/sysdep.h
+++ b/sysdeps/powerpc/powerpc64/sysdep.h
@@ -146,34 +146,51 @@
#endif /* _CALL_ELF */
-#define ENTRY(name) \
- .section ".text"; \
- ENTRY_2(name); \
- .align ALIGNARG(2); \
-BODY_LABEL(name): \
- cfi_startproc; \
- LOCALENTRY(name)
+ .macro NOPS NARG
+ .if \NARG
+ NOPS \NARG-1
+ nop
+ .endif
+ .endm
-#define EALIGN_W_0 /* No words to insert. */
-#define EALIGN_W_1 nop
-#define EALIGN_W_2 nop;nop
-#define EALIGN_W_3 nop;nop;nop
-#define EALIGN_W_4 EALIGN_W_3;nop
-#define EALIGN_W_5 EALIGN_W_4;nop
-#define EALIGN_W_6 EALIGN_W_5;nop
-#define EALIGN_W_7 EALIGN_W_6;nop
-
-/* EALIGN is like ENTRY, but does alignment to 'words'*4 bytes
- past a 2^alignt boundary. */
-#define EALIGN(name, alignt, words) \
- .section ".text"; \
- ENTRY_2(name); \
- .align ALIGNARG(alignt); \
- EALIGN_W_##words; \
-BODY_LABEL(name): \
+ .macro ENTRY_3 name, alignp2=2, nopwords=0
+ .text
+ ENTRY_2(\name)
+ .p2align \alignp2
+ NOPS \nopwords
+BODY_LABEL(\name):
+ .endm
+
+/* Use ENTRY_TOCLESS for functions that make no use of r2 and
+ guarantee r2 is unchanged on exit. Any function that has @toc or
+ @got relocs uses r2. Functions that call other functions via the
+ PLT use r2. Use ENTRY for functions that may use or change r2.
+ The first argument is the function name.
+ The optional second argument specifies alignment of the function's
+ code, as the logarithm base two of the byte alignment. For
+ example, a value of four aligns to a sixteen byte boundary.
+ The optional third argument specifies the number of NOPs to emit
+ before the start of the function's code. */
+#ifndef PROF
+#define ENTRY_TOCLESS(name, ...) \
+ ENTRY_3 name, ## __VA_ARGS__; \
+ cfi_startproc
+
+#define ENTRY(name, ...) \
+ ENTRY_TOCLESS(name, ## __VA_ARGS__); \
+ LOCALENTRY(name)
+#else
+/* The call to _mcount is potentially via the plt, so profiling code
+ is never free of an r2 use. */
+#define ENTRY_TOCLESS(name, ...) \
+ ENTRY_3 name, ## __VA_ARGS__; \
cfi_startproc; \
LOCALENTRY(name)
+#define ENTRY(name, ...) \
+ ENTRY_TOCLESS(name, ## __VA_ARGS__)
+#endif
+
/* Local labels stripped out by the linker. */
#undef L
#define L(x) .L##x
--
Alan Modra
Australia Development Lab, IBM
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 6/6] PowerPC64 ELFv2 PPC64_OPT_LOCALENTRY
2017-06-01 13:11 ` [PATCH 6/6] PowerPC64 ELFv2 PPC64_OPT_LOCALENTRY Alan Modra
@ 2017-06-03 4:46 ` Alan Modra
2017-06-13 18:21 ` Tulio Magno Quites Machado Filho
0 siblings, 1 reply; 19+ messages in thread
From: Alan Modra @ 2017-06-03 4:46 UTC (permalink / raw)
To: libc-alpha
On Thu, Jun 01, 2017 at 10:41:45PM +0930, Alan Modra wrote:
> diff --git a/sysdeps/powerpc/powerpc64/dl-machine.h b/sysdeps/powerpc/powerpc64/dl-machine.h
[snip]
> + && (STO_PPC64_LOCAL_MASK & refsym->st_other) == 0
> + && (STO_PPC64_LOCAL_MASK & sym->st_other) != 0)
> + _dl_error_localentry (map, refsym);
[snip]
> +extern void attribute_hidden _dl_error_localentry (struct link_map *map,
> + const Elf64_Sym *refsym);
The above of course is stupid and results in warnings "implicit
declaration of function" and "conflicting types". I was accidentally
building with --disable-werror, a thing I don't normally do, so missed
seeing the error. The following revised patch fixes this and puts
_dl_error_localentry definition inside #if _CALL_ELF == 2.
* elf/elf.h (PPC64_OPT_LOCALENTRY): Define.
* sysdeps/alpha/dl-machine.h (elf_machine_fixup_plt): Add
refsym and sym parameters. Adjust callers.
* sysdeps/aarch64/dl-machine.h (elf_machine_fixup_plt): Likewise.
* sysdeps/arm/dl-machine.h (elf_machine_fixup_plt): Likewise.
* sysdeps/generic/dl-machine.h (elf_machine_fixup_plt): Likewise.
* sysdeps/hppa/dl-machine.h (elf_machine_fixup_plt): Likewise.
* sysdeps/i386/dl-machine.h (elf_machine_fixup_plt): Likewise.
* sysdeps/ia64/dl-machine.h (elf_machine_fixup_plt): Likewise.
* sysdeps/m68k/dl-machine.h (elf_machine_fixup_plt): Likewise.
* sysdeps/microblaze/dl-machine.h (elf_machine_fixup_plt): Likewise.
* sysdeps/mips/dl-machine.h (elf_machine_fixup_plt): Likewise.
* sysdeps/nios2/dl-machine.h (elf_machine_fixup_plt): Likewise.
* sysdeps/powerpc/powerpc32/dl-machine.h (elf_machine_fixup_plt):
Likewise.
* sysdeps/s390/s390-32/dl-machine.h (elf_machine_fixup_plt): Likewise.
* sysdeps/s390/s390-64/dl-machine.h (elf_machine_fixup_plt): Likewise.
* sysdeps/sh/dl-machine.h (elf_machine_fixup_plt): Likewise.
* sysdeps/sparc/sparc32/dl-machine.h (elf_machine_fixup_plt): Likewise.
* sysdeps/sparc/sparc64/dl-machine.h (elf_machine_fixup_plt): Likewise.
* sysdeps/tile/dl-machine.h (elf_machine_fixup_plt): Likewise.
* sysdeps/x86_64/dl-machine.h (elf_machine_fixup_plt): Likewise.
* sysdeps/powerpc/powerpc64/dl-machine.c (_dl_error_localentry): New.
(_dl_reloc_overflow): Increase buffser size. Formatting.
* sysdeps/powerpc/powerpc64/dl-machine.h (ppc64_local_entry_offset):
Delete reloc param, add refsym and sym. Check optimized plt
call stubs for localentry:0 functions. Adjust callers.
(elf_machine_fixup_plt, elf_machine_plt_conflict): Add refsym
and sym parameters. Adjust callers.
(_dl_reloc_overflow): Move attribute.
(_dl_error_localentry): Declare.
* elf/dl-runtime.c (_dl_fixup): Save original sym. Pass
refsym and sym to elf_machine_fixup_plt.
* elf/testobj6.c (preload): Call printf.
diff --git a/elf/dl-runtime.c b/elf/dl-runtime.c
index 7d1d240..51d3819 100644
--- a/elf/dl-runtime.c
+++ b/elf/dl-runtime.c
@@ -71,6 +71,7 @@ _dl_fixup (
const PLTREL *const reloc
= (const void *) (D_PTR (l, l_info[DT_JMPREL]) + reloc_offset);
const ElfW(Sym) *sym = &symtab[ELFW(R_SYM) (reloc->r_info)];
+ const ElfW(Sym) *refsym = sym;
void *const rel_addr = (void *)(l->l_addr + reloc->r_offset);
lookup_t result;
DL_FIXUP_VALUE_TYPE value;
@@ -145,7 +146,7 @@ _dl_fixup (
if (__glibc_unlikely (GLRO(dl_bind_not)))
return value;
- return elf_machine_fixup_plt (l, result, reloc, rel_addr, value);
+ return elf_machine_fixup_plt (l, result, refsym, sym, reloc, rel_addr, value);
}
#ifndef PROF
diff --git a/elf/elf.h b/elf/elf.h
index fff893d..3900b4c 100644
--- a/elf/elf.h
+++ b/elf/elf.h
@@ -2544,9 +2544,10 @@ enum
#define DT_PPC64_OPT (DT_LOPROC + 3)
#define DT_PPC64_NUM 4
-/* PowerPC64 specific values for the DT_PPC64_OPT Dyn entry. */
+/* PowerPC64 specific bits in the DT_PPC64_OPT Dyn entry. */
#define PPC64_OPT_TLS 1
#define PPC64_OPT_MULTI_TOC 2
+#define PPC64_OPT_LOCALENTRY 4
/* PowerPC64 specific values for the Elf64_Sym st_other field. */
#define STO_PPC64_LOCAL_BIT 5
diff --git a/elf/testobj6.c b/elf/testobj6.c
index fcba016..84da4c9 100644
--- a/elf/testobj6.c
+++ b/elf/testobj6.c
@@ -1,3 +1,5 @@
+#include <stdio.h>
+
#include "testobj.h"
int
@@ -15,5 +17,6 @@ obj6func2 (int a)
int
preload (int a)
{
+ printf ("testobj6 preload\n");
return a;
}
diff --git a/sysdeps/aarch64/dl-machine.h b/sysdeps/aarch64/dl-machine.h
index 15d79a6..02fab04 100644
--- a/sysdeps/aarch64/dl-machine.h
+++ b/sysdeps/aarch64/dl-machine.h
@@ -245,6 +245,7 @@ dl_platform_init (void)
static inline ElfW(Addr)
elf_machine_fixup_plt (struct link_map *map, lookup_t t,
+ const ElfW(Sym) *refsym, const ElfW(Sym) *sym,
const ElfW(Rela) *reloc,
ElfW(Addr) *reloc_addr,
ElfW(Addr) value)
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index 7580cd2..7077796 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -260,6 +260,7 @@ dl_platform_init (void)
rather than the dynamic linker. */
static inline Elf64_Addr
elf_machine_fixup_plt (struct link_map *map, lookup_t t,
+ const ElfW(Sym) *refsym, const ElfW(Sym) *sym,
const Elf64_Rela *reloc,
Elf64_Addr *got_addr, Elf64_Addr value)
{
@@ -434,11 +435,11 @@ elf_machine_rela (struct link_map *map,
RESOLVE_CONFLICT_FIND_MAP (map, reloc_addr);
reloc = ((const Elf64_Rela *) D_PTR (map, l_info[DT_JMPREL]))
+ (r_type >> 8);
- elf_machine_fixup_plt (map, 0, reloc, reloc_addr, sym_value);
+ elf_machine_fixup_plt (map, 0, 0, 0, reloc, reloc_addr, sym_value);
}
#else
else if (r_type == R_ALPHA_JMP_SLOT)
- elf_machine_fixup_plt (map, 0, reloc, reloc_addr, sym_value);
+ elf_machine_fixup_plt (map, 0, 0, 0, reloc, reloc_addr, sym_value);
#endif
#ifndef RTLD_BOOTSTRAP
else if (r_type == R_ALPHA_REFQUAD)
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
index 2c72972..7053ead 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
@@ -263,6 +263,7 @@ dl_platform_init (void)
static inline Elf32_Addr
elf_machine_fixup_plt (struct link_map *map, lookup_t t,
+ const ElfW(Sym) *refsym, const ElfW(Sym) *sym,
const Elf32_Rel *reloc,
Elf32_Addr *reloc_addr, Elf32_Addr value)
{
diff --git a/sysdeps/generic/dl-machine.h b/sysdeps/generic/dl-machine.h
index 59749bd..4153760 100644
--- a/sysdeps/generic/dl-machine.h
+++ b/sysdeps/generic/dl-machine.h
@@ -51,10 +51,11 @@ elf_machine_load_address (void)
/* Fixup a PLT entry to bounce directly to the function at VALUE. */
-static inline Elf32_Addr
+static inline ElfW(Addr)
elf_machine_fixup_plt (struct link_map *map, lookup_t t,
- const Elf32_Rel *reloc,
- Elf32_Addr *reloc_addr, Elf32_Addr value)
+ const ElfW(Sym) *refsym, const ElfW(Sym) *sym,
+ const ElfW(Rel) *reloc,
+ ElfW(Addr) *reloc_addr, ElfW(Addr) value)
{
return *reloc_addr = value;
}
diff --git a/sysdeps/hppa/dl-machine.h b/sysdeps/hppa/dl-machine.h
index 787b95f..b7bdf87 100644
--- a/sysdeps/hppa/dl-machine.h
+++ b/sysdeps/hppa/dl-machine.h
@@ -112,6 +112,7 @@ elf_machine_load_address (void)
/* Fixup a PLT entry to bounce directly to the function at VALUE. */
static inline struct fdesc __attribute__ ((always_inline))
elf_machine_fixup_plt (struct link_map *map, lookup_t t,
+ const ElfW(Sym) *refsym, const ElfW(Sym) *sym,
const Elf32_Rela *reloc,
Elf32_Addr *reloc_addr, struct fdesc value)
{
@@ -652,13 +653,13 @@ elf_machine_rela (struct link_map *map,
case R_PARISC_IPLT:
if (__builtin_expect (sym_map != NULL, 1))
{
- elf_machine_fixup_plt (NULL, sym_map, reloc, reloc_addr,
+ elf_machine_fixup_plt (NULL, sym_map, NULL, NULL reloc, reloc_addr,
DL_FIXUP_MAKE_VALUE(sym_map, value));
}
else
{
/* If we get here, it's a (weak) undefined sym. */
- elf_machine_fixup_plt (NULL, map, reloc, reloc_addr,
+ elf_machine_fixup_plt (NULL, map, NULL, NULL, reloc, reloc_addr,
DL_FIXUP_MAKE_VALUE(map, value));
}
return;
diff --git a/sysdeps/i386/dl-machine.h b/sysdeps/i386/dl-machine.h
index 57d4a0b..9ee9d02 100644
--- a/sysdeps/i386/dl-machine.h
+++ b/sysdeps/i386/dl-machine.h
@@ -246,6 +246,7 @@ dl_platform_init (void)
static inline Elf32_Addr
elf_machine_fixup_plt (struct link_map *map, lookup_t t,
+ const ElfW(Sym) *refsym, const ElfW(Sym) *sym,
const Elf32_Rel *reloc,
Elf32_Addr *reloc_addr, Elf32_Addr value)
{
diff --git a/sysdeps/ia64/dl-machine.h b/sysdeps/ia64/dl-machine.h
index 9c08161..8d0d3c9 100644
--- a/sysdeps/ia64/dl-machine.h
+++ b/sysdeps/ia64/dl-machine.h
@@ -333,6 +333,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
/* Fixup a PLT entry to bounce directly to the function at VALUE. */
static inline struct fdesc __attribute__ ((always_inline))
elf_machine_fixup_plt (struct link_map *l, lookup_t t,
+ const ElfW(Sym) *refsym, const ElfW(Sym) *sym,
const Elf64_Rela *reloc,
Elf64_Addr *reloc_addr, struct fdesc value)
{
@@ -424,7 +425,7 @@ elf_machine_rela (struct link_map *map,
;/* No adjustment. */
else if (r_type == R_IA64_IPLTLSB)
{
- elf_machine_fixup_plt (NULL, NULL, reloc, reloc_addr,
+ elf_machine_fixup_plt (NULL, NULL, NULL, NULL, reloc, reloc_addr,
DL_FIXUP_MAKE_VALUE (sym_map, value));
return;
}
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h
index 8f457ce..fd8fb00 100644
--- a/sysdeps/m68k/dl-machine.h
+++ b/sysdeps/m68k/dl-machine.h
@@ -182,6 +182,7 @@ _dl_start_user:\n\
static inline Elf32_Addr
elf_machine_fixup_plt (struct link_map *map, lookup_t t,
+ const ElfW(Sym) *refsym, const ElfW(Sym) *sym,
const Elf32_Rela *reloc,
Elf32_Addr *reloc_addr, Elf32_Addr value)
{
diff --git a/sysdeps/microblaze/dl-machine.h b/sysdeps/microblaze/dl-machine.h
index cc80b30..9481ff1 100644
--- a/sysdeps/microblaze/dl-machine.h
+++ b/sysdeps/microblaze/dl-machine.h
@@ -174,6 +174,7 @@ _dl_start_user:\n\
static inline Elf32_Addr
elf_machine_fixup_plt (struct link_map *map, lookup_t t,
+ const ElfW(Sym) *refsym, const ElfW(Sym) *sym,
const Elf32_Rela *reloc,
Elf32_Addr *reloc_addr, Elf32_Addr value)
{
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index ed47513..74ead7f 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -453,6 +453,7 @@ dl_platform_init (void)
the corresponding PLT entry instead. */
static inline ElfW(Addr)
elf_machine_fixup_plt (struct link_map *map, lookup_t t,
+ const ElfW(Sym) *refsym, const ElfW(Sym) *sym,
const ElfW(Rel) *reloc,
ElfW(Addr) *reloc_addr, ElfW(Addr) value)
{
diff --git a/sysdeps/nios2/dl-machine.h b/sysdeps/nios2/dl-machine.h
index 8d2b18d..b5fdd9b 100644
--- a/sysdeps/nios2/dl-machine.h
+++ b/sysdeps/nios2/dl-machine.h
@@ -207,6 +207,7 @@ _start:\n\
static inline Elf32_Addr
elf_machine_fixup_plt (struct link_map *map, lookup_t t,
+ const ElfW(Sym) *refsym, const ElfW(Sym) *sym,
const Elf32_Rela *reloc,
Elf32_Addr *reloc_addr, Elf32_Addr value)
{
diff --git a/sysdeps/powerpc/powerpc32/dl-machine.h b/sysdeps/powerpc/powerpc32/dl-machine.h
index 28eb50f..1f8437e 100644
--- a/sysdeps/powerpc/powerpc32/dl-machine.h
+++ b/sysdeps/powerpc/powerpc32/dl-machine.h
@@ -235,6 +235,7 @@ extern Elf32_Addr __elf_machine_fixup_plt (struct link_map *map,
static inline Elf32_Addr
elf_machine_fixup_plt (struct link_map *map, lookup_t t,
+ const ElfW(Sym) *refsym, const ElfW(Sym) *sym,
const Elf32_Rela *reloc,
Elf32_Addr *reloc_addr, Elf64_Addr finaladdr)
{
diff --git a/sysdeps/powerpc/powerpc64/dl-machine.c b/sysdeps/powerpc/powerpc64/dl-machine.c
index 0eccc66..2cfd43b 100644
--- a/sysdeps/powerpc/powerpc64/dl-machine.c
+++ b/sysdeps/powerpc/powerpc64/dl-machine.c
@@ -24,11 +24,11 @@
void
_dl_reloc_overflow (struct link_map *map,
- const char *name,
- Elf64_Addr *const reloc_addr,
- const Elf64_Sym *refsym)
+ const char *name,
+ Elf64_Addr *const reloc_addr,
+ const Elf64_Sym *refsym)
{
- char buffer[128];
+ char buffer[1024];
char *t;
t = stpcpy (buffer, name);
t = stpcpy (t, " reloc at 0x");
@@ -45,3 +45,19 @@ _dl_reloc_overflow (struct link_map *map,
t = stpcpy (t, " out of range");
_dl_signal_error (0, map->l_name, NULL, buffer);
}
+
+#if _CALL_ELF == 2
+void
+_dl_error_localentry (struct link_map *map, const Elf64_Sym *refsym)
+{
+ char buffer[1024];
+ char *t;
+ const char *strtab;
+
+ strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]);
+ t = stpcpy (buffer, "expected localentry:0 `");
+ t = stpcpy (t, strtab + refsym->st_name);
+ t = stpcpy (t, "'");
+ _dl_signal_error (0, map->l_name, NULL, buffer);
+}
+#endif
diff --git a/sysdeps/powerpc/powerpc64/dl-machine.h b/sysdeps/powerpc/powerpc64/dl-machine.h
index 6391b3a..aeb91b8 100644
--- a/sysdeps/powerpc/powerpc64/dl-machine.h
+++ b/sysdeps/powerpc/powerpc64/dl-machine.h
@@ -440,20 +440,30 @@ elf_machine_runtime_setup (struct link_map *map, int lazy, int profile)
}
#if _CALL_ELF == 2
-/* If the PLT entry whose reloc is 'reloc' resolves to a function in
- the same object, return the target function's local entry point
- offset if usable. */
+extern void attribute_hidden _dl_error_localentry (struct link_map *map,
+ const Elf64_Sym *refsym);
+
+/* If the PLT entry resolves to a function in the same object, return
+ the target function's local entry point offset if usable. */
static inline Elf64_Addr __attribute__ ((always_inline))
ppc64_local_entry_offset (struct link_map *map, lookup_t sym_map,
- const Elf64_Rela *reloc)
+ const ElfW(Sym) *refsym, const ElfW(Sym) *sym)
{
- const Elf64_Sym *symtab;
- const Elf64_Sym *sym;
-
/* If the target function is in a different object, we cannot
use the local entry point. */
if (sym_map != map)
- return 0;
+ {
+ /* Check that optimized plt call stubs for localentry:0 functions
+ are not being satisfied by a non-zero localentry symbol. */
+ if (map->l_info[DT_PPC64(OPT)]
+ && (map->l_info[DT_PPC64(OPT)]->d_un.d_val & PPC64_OPT_LOCALENTRY) != 0
+ && refsym->st_info == ELFW(ST_INFO) (STB_GLOBAL, STT_FUNC)
+ && (STO_PPC64_LOCAL_MASK & refsym->st_other) == 0
+ && (STO_PPC64_LOCAL_MASK & sym->st_other) != 0)
+ _dl_error_localentry (map, refsym);
+
+ return 0;
+ }
/* If the linker inserted multiple TOCs, we cannot use the
local entry point. */
@@ -461,16 +471,13 @@ ppc64_local_entry_offset (struct link_map *map, lookup_t sym_map,
&& (map->l_info[DT_PPC64(OPT)]->d_un.d_val & PPC64_OPT_MULTI_TOC))
return 0;
- /* Otherwise, we can use the local entry point. Retrieve its offset
- from the symbol's ELF st_other field. */
- symtab = (const void *) D_PTR (map, l_info[DT_SYMTAB]);
- sym = &symtab[ELFW(R_SYM) (reloc->r_info)];
-
/* If the target function is an ifunc then the local entry offset is
for the resolver, not the final destination. */
if (__builtin_expect (ELFW(ST_TYPE) (sym->st_info) == STT_GNU_IFUNC, 0))
return 0;
+ /* Otherwise, we can use the local entry point. Retrieve its offset
+ from the symbol's ELF st_other field. */
return PPC64_LOCAL_ENTRY_OFFSET (sym->st_other);
}
#endif
@@ -479,6 +486,7 @@ ppc64_local_entry_offset (struct link_map *map, lookup_t sym_map,
routine. */
static inline Elf64_Addr __attribute__ ((always_inline))
elf_machine_fixup_plt (struct link_map *map, lookup_t sym_map,
+ const ElfW(Sym) *refsym, const ElfW(Sym) *sym,
const Elf64_Rela *reloc,
Elf64_Addr *reloc_addr, Elf64_Addr finaladdr)
{
@@ -534,7 +542,7 @@ elf_machine_fixup_plt (struct link_map *map, lookup_t sym_map,
PPC_DCBST (&plt->fd_func);
PPC_ISYNC;
#else
- finaladdr += ppc64_local_entry_offset (map, sym_map, reloc);
+ finaladdr += ppc64_local_entry_offset (map, sym_map, refsym, sym);
*reloc_addr = finaladdr;
#endif
@@ -543,6 +551,7 @@ elf_machine_fixup_plt (struct link_map *map, lookup_t sym_map,
static inline void __attribute__ ((always_inline))
elf_machine_plt_conflict (struct link_map *map, lookup_t sym_map,
+ const ElfW(Sym) *refsym, const ElfW(Sym) *sym,
const Elf64_Rela *reloc,
Elf64_Addr *reloc_addr, Elf64_Addr finaladdr)
{
@@ -565,7 +574,7 @@ elf_machine_plt_conflict (struct link_map *map, lookup_t sym_map,
PPC_DCBST (&plt->fd_toc);
PPC_SYNC;
#else
- finaladdr += ppc64_local_entry_offset (map, sym_map, reloc);
+ finaladdr += ppc64_local_entry_offset (map, sym_map, refsym, sym);
*reloc_addr = finaladdr;
#endif
}
@@ -604,11 +613,10 @@ elf_machine_plt_value (struct link_map *map, const Elf64_Rela *reloc,
#define dont_expect(X) __builtin_expect ((X), 0)
-extern void _dl_reloc_overflow (struct link_map *map,
- const char *name,
- Elf64_Addr *const reloc_addr,
- const Elf64_Sym *refsym)
- attribute_hidden;
+extern void attribute_hidden _dl_reloc_overflow (struct link_map *map,
+ const char *name,
+ Elf64_Addr *const reloc_addr,
+ const Elf64_Sym *refsym);
auto inline void __attribute__ ((always_inline))
elf_machine_rela_relative (Elf64_Addr l_addr, const Elf64_Rela *reloc,
@@ -728,9 +736,11 @@ elf_machine_rela (struct link_map *map,
/* Fall thru */
case R_PPC64_JMP_SLOT:
#ifdef RESOLVE_CONFLICT_FIND_MAP
- elf_machine_plt_conflict (map, sym_map, reloc, reloc_addr, value);
+ elf_machine_plt_conflict (map, sym_map, refsym, sym,
+ reloc, reloc_addr, value);
#else
- elf_machine_fixup_plt (map, sym_map, reloc, reloc_addr, value);
+ elf_machine_fixup_plt (map, sym_map, refsym, sym,
+ reloc, reloc_addr, value);
#endif
return;
diff --git a/sysdeps/s390/s390-32/dl-machine.h b/sysdeps/s390/s390-32/dl-machine.h
index 2e3c77c..c302c9d 100644
--- a/sysdeps/s390/s390-32/dl-machine.h
+++ b/sysdeps/s390/s390-32/dl-machine.h
@@ -294,6 +294,7 @@ dl_platform_init (void)
static inline Elf32_Addr
elf_machine_fixup_plt (struct link_map *map, lookup_t t,
+ const ElfW(Sym) *refsym, const ElfW(Sym) *sym,
const Elf32_Rela *reloc,
Elf32_Addr *reloc_addr, Elf32_Addr value)
{
diff --git a/sysdeps/s390/s390-64/dl-machine.h b/sysdeps/s390/s390-64/dl-machine.h
index f2aeb1e..7513520 100644
--- a/sysdeps/s390/s390-64/dl-machine.h
+++ b/sysdeps/s390/s390-64/dl-machine.h
@@ -242,6 +242,7 @@ dl_platform_init (void)
static inline Elf64_Addr
elf_machine_fixup_plt (struct link_map *map, lookup_t t,
+ const ElfW(Sym) *refsym, const ElfW(Sym) *sym,
const Elf64_Rela *reloc,
Elf64_Addr *reloc_addr, Elf64_Addr value)
{
diff --git a/sysdeps/sh/dl-machine.h b/sysdeps/sh/dl-machine.h
index 2b468af..7106afb 100644
--- a/sysdeps/sh/dl-machine.h
+++ b/sysdeps/sh/dl-machine.h
@@ -230,6 +230,7 @@ dl_platform_init (void)
static inline Elf32_Addr
elf_machine_fixup_plt (struct link_map *map, lookup_t t,
+ const ElfW(Sym) *refsym, const ElfW(Sym) *sym,
const Elf32_Rela *reloc,
Elf32_Addr *reloc_addr, Elf32_Addr value)
{
diff --git a/sysdeps/sparc/sparc32/dl-machine.h b/sysdeps/sparc/sparc32/dl-machine.h
index e17ac8e..b98a11b 100644
--- a/sysdeps/sparc/sparc32/dl-machine.h
+++ b/sysdeps/sparc/sparc32/dl-machine.h
@@ -292,6 +292,7 @@ _dl_start_user:\n\
static inline Elf32_Addr
elf_machine_fixup_plt (struct link_map *map, lookup_t t,
+ const ElfW(Sym) *refsym, const ElfW(Sym) *sym,
const Elf32_Rela *reloc,
Elf32_Addr *reloc_addr, Elf32_Addr value)
{
diff --git a/sysdeps/sparc/sparc64/dl-machine.h b/sysdeps/sparc/sparc64/dl-machine.h
index 1b59d78..c2871dc 100644
--- a/sysdeps/sparc/sparc64/dl-machine.h
+++ b/sysdeps/sparc/sparc64/dl-machine.h
@@ -85,6 +85,7 @@ elf_machine_load_address (void)
static inline Elf64_Addr __attribute__ ((always_inline))
elf_machine_fixup_plt (struct link_map *map, lookup_t t,
+ const ElfW(Sym) *refsym, const ElfW(Sym) *sym,
const Elf64_Rela *reloc,
Elf64_Addr *reloc_addr, Elf64_Addr value)
{
diff --git a/sysdeps/tile/dl-machine.h b/sysdeps/tile/dl-machine.h
index c1d7845..ae92673 100644
--- a/sysdeps/tile/dl-machine.h
+++ b/sysdeps/tile/dl-machine.h
@@ -239,6 +239,7 @@ dl_platform_init (void)
static inline ElfW(Addr)
elf_machine_fixup_plt (struct link_map *map, lookup_t t,
+ const ElfW(Sym) *refsym, const ElfW(Sym) *sym,
const ElfW(Rela) *reloc,
ElfW(Addr) *reloc_addr, ElfW(Addr) value)
{
@@ -569,7 +570,7 @@ elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc,
switch (r_type)
{
case R_TILE(JMP_SLOT):
- elf_machine_fixup_plt (map, 0, reloc, reloc_addr,
+ elf_machine_fixup_plt (map, 0, 0, 0, reloc, reloc_addr,
value + reloc->r_addend);
return;
diff --git a/sysdeps/x86_64/dl-machine.h b/sysdeps/x86_64/dl-machine.h
index 0015db4..6a04cbc 100644
--- a/sysdeps/x86_64/dl-machine.h
+++ b/sysdeps/x86_64/dl-machine.h
@@ -253,6 +253,7 @@ dl_platform_init (void)
static inline ElfW(Addr)
elf_machine_fixup_plt (struct link_map *map, lookup_t t,
+ const ElfW(Sym) *refsym, const ElfW(Sym) *sym,
const ElfW(Rela) *reloc,
ElfW(Addr) *reloc_addr, ElfW(Addr) value)
{
--
Alan Modra
Australia Development Lab, IBM
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 1/6] PowerPC64, fix calls to _mcount
2017-06-01 13:08 ` [PATCH 1/6] PowerPC64, fix calls to _mcount Alan Modra
@ 2017-06-12 18:07 ` Tulio Magno Quites Machado Filho
0 siblings, 0 replies; 19+ messages in thread
From: Tulio Magno Quites Machado Filho @ 2017-06-12 18:07 UTC (permalink / raw)
To: Alan Modra, libc-alpha
Alan Modra <amodra@gmail.com> writes:
> The macros used in assembly were broken on powerpc64 ELFv1.
>
> * sysdeps/powerpc/powerpc64/sysdep.h: (call_mcount_parm_offset): Delete.
> (SAVE_ARG, REST_ARG, CFI_SAVE_ARG): Correct.
Looks good to me.
--
Tulio Magno
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 2/6] PowerPC64 FRAME_PARM_SAVE
2017-06-01 13:09 ` [PATCH 2/6] PowerPC64 FRAME_PARM_SAVE Alan Modra
@ 2017-06-12 18:07 ` Tulio Magno Quites Machado Filho
0 siblings, 0 replies; 19+ messages in thread
From: Tulio Magno Quites Machado Filho @ 2017-06-12 18:07 UTC (permalink / raw)
To: Alan Modra, libc-alpha
Alan Modra <amodra@gmail.com> writes:
> This is just a tidy. I think FRAME_PARM[1-9]_SAVE confuse the code,
> particularly FRAME_PARM9_SAVE. There are only 8 parameter save slots!
>
> * sysdeps/powerpc/powerpc64/sysdep.h: (FRAME_BACKCHAIN,
> FRAME_CR_SAVE, FRAME_LR_SAVE): Move out of conditional.
> (FRAME_PARM1_SAVE, FRAME_PARM2_SAVE, FRAME_PARM3_SAVE,
> FRAME_PARM4_SAVE, FRAME_PARM5_SAVE, FRAME_PARM6_SAVE,
> FRAME_PARM7_SAVE, FRAME_PARM8_SAVE, FRAME_PARM9_SAVE): Delete.
> * sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S: Replace
> uses of FRAME_PARM[1-9]_SAVE with FRAME_PARM_SAVE plus offset.
Looks good to me.
--
Tulio Magno
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 3/6] PowerPC64 sysdep.h tidy
2017-06-01 13:09 ` [PATCH 3/6] PowerPC64 sysdep.h tidy Alan Modra
@ 2017-06-12 18:12 ` Tulio Magno Quites Machado Filho
2017-06-13 1:27 ` Alan Modra
0 siblings, 1 reply; 19+ messages in thread
From: Tulio Magno Quites Machado Filho @ 2017-06-12 18:12 UTC (permalink / raw)
To: Alan Modra, libc-alpha
Alan Modra <amodra@gmail.com> writes:
> .align on some targets takes a byte alignment, on others like powerpc,
> log2 of the byte alignment. It's a good idea to avoid .align,
> particularly since x86 and powerpc are different. This patch fixes
> the occurrences of .align in powerpc64/sysdep.h, renames DOT_LABEL
> since the macro doesn't have anything to do with adding dots, removes
> extraneous semicolons, and fixes some formatting.
>
> * sysdeps/powerpc/powerpc64/sysdep.h: Formatting.
> (FUNC_LABEL): Rename from DOT_LABEL.
> (ENTRY_1): Use FUNC_LABEL and remove leading space from label.
> Use .p2align rather than .align.
> (TRACEBACK, TRACEBACK_MASK): Use .p2align rather than .align.
> (ABORT_TRANSACTION): Likewise.
> (ENTRY_1, ENTRY_2, END_2, LOCALENTRY): Remove unnecessary semicolons,
> particularly at end. Add semicolon at invocation as necessary.
> (TRACEBACK, TRACEBACK_MASK, PSEUDO, PSEUDO_NOERRNO): Likewise.
> (PSEUDO_ERRVAL, PPC64_LOAD_FUNCPTR, OPD_ENT): Likewise.
> * sysdeps/powerpc/powerpc64/multiarch/strrchr-power8.S (ENTRY,
> END): Adjust to suit.
Looks good to me, but I have just one question...
> diff --git a/sysdeps/powerpc/powerpc64/sysdep.h b/sysdeps/powerpc/powerpc64/sysdep.h
> index 4347323..860420e 100644
> --- a/sysdeps/powerpc/powerpc64/sysdep.h
> +++ b/sysdeps/powerpc/powerpc64/sysdep.h
> @@ -106,25 +106,25 @@
> # define OPD_ENT(name) .quad BODY_LABEL (name), .TOC.@tocbase, 0
> #endif
>
> -#define ENTRY_1(name) \
> +#define ENTRY_1(name) \
> .type BODY_LABEL(name),@function; \
> .globl name; \
> .section ".opd","aw"; \
> - .align 3; \
> -name##: OPD_ENT (name); \
> - .previous;
> + .p2align 3;FUNC_LABEL(name): \
> + OPD_ENT (name); \
> + .previous
I'm just curious: is this format written somewhere or used somewhere else?
--
Tulio Magno
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 4/6] strncpy, stpncpy and strstr fixes
2017-06-01 13:10 ` [PATCH 4/6] strncpy, stpncpy and strstr fixes Alan Modra
@ 2017-06-12 19:55 ` Tulio Magno Quites Machado Filho
0 siblings, 0 replies; 19+ messages in thread
From: Tulio Magno Quites Machado Filho @ 2017-06-12 19:55 UTC (permalink / raw)
To: Alan Modra, libc-alpha
Alan Modra <amodra@gmail.com> writes:
> Makes __stpncpy_power8 call __memset_power8 directly rather than via an
> IFUNC. Fixes a missing _mcount, and removes some redundant NOPS. The
> *_is_local defines are also used in a followup patch.
>
> * sysdeps/powerpc/powerpc64/multiarch/strncpy-power7.S: Define
> MEMSET_is_local.
> * sysdeps/powerpc/powerpc64/multiarch/strncpy-power8.S: Likewise.
> * sysdeps/powerpc/powerpc64/multiarch/stpncpy-power7.S: Likewise.
> * sysdeps/powerpc/powerpc64/multiarch/stpncpy-power8.S: Likewise.
> Define MEMSET.
> * sysdeps/powerpc/powerpc64/multiarch/strstr-power7.S: Define
> STRLEN_is_local, STRNLEN_is_local, and STRCHR_is_local.
> * sysdeps/powerpc/powerpc64/power7/strstr.S: Likewise. Don't add
> nop after local calls.
> * sysdeps/powerpc/powerpc64/power7/strncpy.S: Define MEMSET_is_local.
> Don't add nop after local call.
> * sysdeps/powerpc/powerpc64/power8/strncpy.S: Likewise. Add missing
> CALL_MCOUNT.
Looks good to me.
--
Tulio Magno
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 3/6] PowerPC64 sysdep.h tidy
2017-06-12 18:12 ` Tulio Magno Quites Machado Filho
@ 2017-06-13 1:27 ` Alan Modra
2017-06-13 17:05 ` Tulio Magno Quites Machado Filho
0 siblings, 1 reply; 19+ messages in thread
From: Alan Modra @ 2017-06-13 1:27 UTC (permalink / raw)
To: Tulio Magno Quites Machado Filho; +Cc: libc-alpha
On Mon, Jun 12, 2017 at 03:12:22PM -0300, Tulio Magno Quites Machado Filho wrote:
> Alan Modra <amodra@gmail.com> writes:
>
> > .align on some targets takes a byte alignment, on others like powerpc,
> > log2 of the byte alignment. It's a good idea to avoid .align,
> > particularly since x86 and powerpc are different. This patch fixes
> > the occurrences of .align in powerpc64/sysdep.h, renames DOT_LABEL
> > since the macro doesn't have anything to do with adding dots, removes
> > extraneous semicolons, and fixes some formatting.
[snip]
> Looks good to me, but I have just one question...
>
> > diff --git a/sysdeps/powerpc/powerpc64/sysdep.h b/sysdeps/powerpc/powerpc64/sysdep.h
> > index 4347323..860420e 100644
> > --- a/sysdeps/powerpc/powerpc64/sysdep.h
> > +++ b/sysdeps/powerpc/powerpc64/sysdep.h
> > @@ -106,25 +106,25 @@
> > # define OPD_ENT(name) .quad BODY_LABEL (name), .TOC.@tocbase, 0
> > #endif
> >
> > -#define ENTRY_1(name) \
> > +#define ENTRY_1(name) \
> > .type BODY_LABEL(name),@function; \
> > .globl name; \
> > .section ".opd","aw"; \
> > - .align 3; \
> > -name##: OPD_ENT (name); \
> > - .previous;
> > + .p2align 3;FUNC_LABEL(name): \
> > + OPD_ENT (name); \
> > + .previous
>
> I'm just curious: is this format written somewhere or used somewhere else?
If you're referring to the first line change, macros are generally
defined with a single space before the first continuation, or have
that continuation line up with any following continuation
backslashes. Emacs uses the latter by default with auto-format (at
least my installed emacs does, and it doesn't appear to have
customization that would affect this).
If you're referring to the label change, assembly labels generally
start in the first column (or immediately after a semicolon). On
targets that don't need a colon to mark a label that matters a lot,
since an identifier starting in the first column is a label and
anything past that is a directive or instruction.. PowerPC isn't such
a target, but it's a good convention to follow. I know it doesn't
look as nice the way the macro is written now. Hmm, perhaps I should
change the relevant lines to:
.p2align 3 \
;FUNC_LABEL(name): \
OPD_ENT (name); \
--
Alan Modra
Australia Development Lab, IBM
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 5/6] PowerPC64 ENTRY_TOCLESS
2017-06-01 13:11 ` [PATCH 5/6] PowerPC64 ENTRY_TOCLESS Alan Modra
@ 2017-06-13 12:23 ` Tulio Magno Quites Machado Filho
2017-06-13 14:46 ` Alan Modra
0 siblings, 1 reply; 19+ messages in thread
From: Tulio Magno Quites Machado Filho @ 2017-06-13 12:23 UTC (permalink / raw)
To: Alan Modra, libc-alpha
Alan Modra <amodra@gmail.com> writes:
> A number of functions in the sysdeps/powerpc/powerpc64/ tree don't use
> or change r2, yet declare a global entry that sets up r2. This patch
> fixes that problem, and consolidates the ENTRY and EALIGN macros.
>
> * sysdeps/powerpc/powerpc64/sysdep.h: Formatting.
> (NOPS, ENTRY_3): New macros.
> (ENTRY): Rewrite.
> (ENTRY_TOCLESS): Define.
> (EALIGN, EALIGN_W_0, EALIGN_W_1, EALIGN_W_2, EALIGN_W_4, EALIGN_W_5,
> EALIGN_W_6, EALIGN_W_7, EALIGN_W_8): Delete.
> * sysdeps/powerpc/powerpc64/a2/memcpy.S: Replace EALIGN with ENTRY.
> * sysdeps/powerpc/powerpc64/dl-trampoline.S: Likewise.
> * sysdeps/powerpc/powerpc64/fpu/s_ceil.S: Likewise.
> * sysdeps/powerpc/powerpc64/fpu/s_ceilf.S: Likewise.
> * sysdeps/powerpc/powerpc64/fpu/s_floor.S: Likewise.
> * sysdeps/powerpc/powerpc64/fpu/s_floorf.S: Likewise.
> * sysdeps/powerpc/powerpc64/fpu/s_nearbyint.S: Likewise.
> * sysdeps/powerpc/powerpc64/fpu/s_nearbyintf.S: Likewise.
> * sysdeps/powerpc/powerpc64/fpu/s_rint.S: Likewise.
> * sysdeps/powerpc/powerpc64/fpu/s_rintf.S: Likewise.
> * sysdeps/powerpc/powerpc64/fpu/s_round.S: Likewise.
> * sysdeps/powerpc/powerpc64/fpu/s_roundf.S: Likewise.
> * sysdeps/powerpc/powerpc64/fpu/s_trunc.S: Likewise.
> * sysdeps/powerpc/powerpc64/fpu/s_truncf.S: Likewise.
> * sysdeps/powerpc/powerpc64/memset.S: Likewise.
> * sysdeps/powerpc/powerpc64/power7/fpu/s_finite.S: Likewise.
> * sysdeps/powerpc/powerpc64/power7/fpu/s_isinf.S: Likewise.
> * sysdeps/powerpc/powerpc64/power7/fpu/s_isnan.S: Likewise.
> * sysdeps/powerpc/powerpc64/power7/strstr.S: Likewise.
> * sysdeps/powerpc/powerpc64/power8/fpu/e_expf.S: Likewise.
> * sysdeps/powerpc/powerpc64/power8/fpu/s_cosf.S: Likewise.
> * sysdeps/powerpc/powerpc64/power8/fpu/s_sinf.S: Likewise.
> * sysdeps/powerpc/powerpc64/power8/strcasestr.S: Likewise.
> * sysdeps/powerpc/powerpc64/addmul_1.S: Use ENTRY_TOCLESS.
> * sysdeps/powerpc/powerpc64/cell/memcpy.S: Likewise.
> * sysdeps/powerpc/powerpc64/fpu/s_copysign.S: Likewise.
> * sysdeps/powerpc/powerpc64/fpu/s_copysignl.S: Likewise.
> * sysdeps/powerpc/powerpc64/fpu/s_fabsl.S: Likewise.
> * sysdeps/powerpc/powerpc64/fpu/s_isnan.S: Likewise.
> * sysdeps/powerpc/powerpc64/fpu/s_llrint.S: Likewise.
> * sysdeps/powerpc/powerpc64/fpu/s_llrintf.S: Likewise.
> * sysdeps/powerpc/powerpc64/lshift.S: Likewise.
> * sysdeps/powerpc/powerpc64/memcpy.S: Likewise.
> * sysdeps/powerpc/powerpc64/mul_1.S: Likewise.
> * sysdeps/powerpc/powerpc64/power4/memcmp.S: Likewise.
> * sysdeps/powerpc/powerpc64/power4/memcpy.S: Likewise.
> * sysdeps/powerpc/powerpc64/power4/memset.S: Likewise.
> * sysdeps/powerpc/powerpc64/power4/strncmp.S: Likewise.
> * sysdeps/powerpc/powerpc64/power5+/fpu/s_ceil.S: Likewise.
> * sysdeps/powerpc/powerpc64/power5+/fpu/s_ceilf.S: Likewise.
> * sysdeps/powerpc/powerpc64/power5+/fpu/s_floor.S: Likewise.
> * sysdeps/powerpc/powerpc64/power5+/fpu/s_floorf.S: Likewise.
> * sysdeps/powerpc/powerpc64/power5+/fpu/s_llround.S: Likewise.
> * sysdeps/powerpc/powerpc64/power5+/fpu/s_round.S: Likewise.
> * sysdeps/powerpc/powerpc64/power5+/fpu/s_roundf.S: Likewise.
> * sysdeps/powerpc/powerpc64/power5+/fpu/s_trunc.S: Likewise.
> * sysdeps/powerpc/powerpc64/power5+/fpu/s_truncf.S: Likewise.
> * sysdeps/powerpc/powerpc64/power5/fpu/s_isnan.S: Likewise.
> * sysdeps/powerpc/powerpc64/power6/fpu/s_copysign.S: Likewise.
> * sysdeps/powerpc/powerpc64/power6/fpu/s_isnan.S: Likewise.
> * sysdeps/powerpc/powerpc64/power6/memcpy.S: Likewise.
> * sysdeps/powerpc/powerpc64/power6/memset.S: Likewise.
> * sysdeps/powerpc/powerpc64/power6x/fpu/s_isnan.S: Likewise.
> * sysdeps/powerpc/powerpc64/power6x/fpu/s_llrint.S: Likewise.
> * sysdeps/powerpc/powerpc64/power6x/fpu/s_llround.S: Likewise.
> * sysdeps/powerpc/powerpc64/power7/add_n.S: Likewise.
> * sysdeps/powerpc/powerpc64/power7/memchr.S: Likewise.
> * sysdeps/powerpc/powerpc64/power7/memcmp.S: Likewise.
> * sysdeps/powerpc/powerpc64/power7/memcpy.S: Likewise.
> * sysdeps/powerpc/powerpc64/power7/memmove.S: Likewise.
> * sysdeps/powerpc/powerpc64/power7/mempcpy.S: Likewise.
> * sysdeps/powerpc/powerpc64/power7/memrchr.S: Likewise.
> * sysdeps/powerpc/powerpc64/power7/memset.S: Likewise.
> * sysdeps/powerpc/powerpc64/power7/rawmemchr.S: Likewise.
> * sysdeps/powerpc/powerpc64/power7/strcasecmp.S (strcasecmp_l):
> Likewise.
> * sysdeps/powerpc/powerpc64/power7/strchr.S: Likewise.
> * sysdeps/powerpc/powerpc64/power7/strchrnul.S: Likewise.
> * sysdeps/powerpc/powerpc64/power7/strcmp.S: Likewise.
> * sysdeps/powerpc/powerpc64/power7/strlen.S: Likewise.
> * sysdeps/powerpc/powerpc64/power7/strncmp.S: Likewise.
> * sysdeps/powerpc/powerpc64/power7/strncpy.S: Likewise.
> * sysdeps/powerpc/powerpc64/power7/strnlen.S: Likewise.
> * sysdeps/powerpc/powerpc64/power7/strrchr.S: Likewise.
> * sysdeps/powerpc/powerpc64/power8/fpu/s_finite.S: Likewise.
> * sysdeps/powerpc/powerpc64/power8/fpu/s_isinf.S: Likewise.
> * sysdeps/powerpc/powerpc64/power8/fpu/s_isnan.S: Likewise.
> * sysdeps/powerpc/powerpc64/power8/fpu/s_llrint.S: Likewise.
> * sysdeps/powerpc/powerpc64/power8/fpu/s_llround.S: Likewise.
> * sysdeps/powerpc/powerpc64/power8/memcmp.S: Likewise.
> * sysdeps/powerpc/powerpc64/power8/memset.S: Likewise.
> * sysdeps/powerpc/powerpc64/power8/strchr.S: Likewise.
> * sysdeps/powerpc/powerpc64/power8/strcmp.S: Likewise.
> * sysdeps/powerpc/powerpc64/power8/strcpy.S: Likewise.
> * sysdeps/powerpc/powerpc64/power8/strlen.S: Likewise.
> * sysdeps/powerpc/powerpc64/power8/strncmp.S: Likewise.
> * sysdeps/powerpc/powerpc64/power8/strncpy.S: Likewise.
> * sysdeps/powerpc/powerpc64/power8/strnlen.S: Likewise.
> * sysdeps/powerpc/powerpc64/power8/strrchr.S: Likewise.
> * sysdeps/powerpc/powerpc64/power8/strspn.S: Likewise.
> * sysdeps/powerpc/powerpc64/power9/strcmp.S: Likewise.
> * sysdeps/powerpc/powerpc64/power9/strncmp.S: Likewise.
> * sysdeps/powerpc/powerpc64/strchr.S: Likewise.
> * sysdeps/powerpc/powerpc64/strcmp.S: Likewise.
> * sysdeps/powerpc/powerpc64/strlen.S: Likewise.
> * sysdeps/powerpc/powerpc64/strncmp.S: Likewise.
> * sysdeps/powerpc/powerpc64/ppc-mcount.S: Store LR earlier. Don't
> add nop when SHARED.
> * sysdeps/powerpc/powerpc64/start.S: Fix comment.
> * sysdeps/powerpc/powerpc64/multiarch/strrchr-power8.S (ENTRY): Don't
> define.
> (ENTRY_TOCLESS): Define.
There are 2 more functions that could benefit from this optimization as well:
- sysdeps/powerpc/fpu/s_fmaf.S
- sysdeps/powerpc/fpu/s_fma.S
Notice they're reused in powerpc32.
> diff --git a/sysdeps/powerpc/powerpc64/power8/strcasestr.S b/sysdeps/powerpc/powerpc64/power8/strcasestr.S
> index 6ac6572..3f59cb0 100644
> --- a/sysdeps/powerpc/powerpc64/power8/strcasestr.S
> +++ b/sysdeps/powerpc/powerpc64/power8/strcasestr.S
> @@ -85,7 +85,7 @@
> /* TODO: change this to .machine power8 when the minimum required binutils
> allows it. */
> .machine power7
> -EALIGN (STRCASESTR, 4, 0)
> +ENTRY (STRCASESTR, 4)
> CALL_MCOUNT 2
> mflr r0 /* Load link register LR to r0. */
> std r31, -8(r1) /* Save callers register r31. */
Isn't it safe to use ENTRY_TOCLESS here too?
--
Tulio Magno
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 5/6] PowerPC64 ENTRY_TOCLESS
2017-06-13 12:23 ` Tulio Magno Quites Machado Filho
@ 2017-06-13 14:46 ` Alan Modra
2017-06-13 17:07 ` Tulio Magno Quites Machado Filho
0 siblings, 1 reply; 19+ messages in thread
From: Alan Modra @ 2017-06-13 14:46 UTC (permalink / raw)
To: Tulio Magno Quites Machado Filho; +Cc: libc-alpha
On Tue, Jun 13, 2017 at 09:23:12AM -0300, Tulio Magno Quites Machado Filho wrote:
> Alan Modra <amodra@gmail.com> writes:
>
> > A number of functions in the sysdeps/powerpc/powerpc64/ tree don't use
> > or change r2, yet declare a global entry that sets up r2. This patch
> > fixes that problem, and consolidates the ENTRY and EALIGN macros.
> >
> > * sysdeps/powerpc/powerpc64/sysdep.h: Formatting.
> > (NOPS, ENTRY_3): New macros.
> > (ENTRY): Rewrite.
> > (ENTRY_TOCLESS): Define.
> > (EALIGN, EALIGN_W_0, EALIGN_W_1, EALIGN_W_2, EALIGN_W_4, EALIGN_W_5,
> > EALIGN_W_6, EALIGN_W_7, EALIGN_W_8): Delete.
> > * sysdeps/powerpc/powerpc64/a2/memcpy.S: Replace EALIGN with ENTRY.
> > * sysdeps/powerpc/powerpc64/dl-trampoline.S: Likewise.
> > * sysdeps/powerpc/powerpc64/fpu/s_ceil.S: Likewise.
> > * sysdeps/powerpc/powerpc64/fpu/s_ceilf.S: Likewise.
> > * sysdeps/powerpc/powerpc64/fpu/s_floor.S: Likewise.
> > * sysdeps/powerpc/powerpc64/fpu/s_floorf.S: Likewise.
> > * sysdeps/powerpc/powerpc64/fpu/s_nearbyint.S: Likewise.
> > * sysdeps/powerpc/powerpc64/fpu/s_nearbyintf.S: Likewise.
> > * sysdeps/powerpc/powerpc64/fpu/s_rint.S: Likewise.
> > * sysdeps/powerpc/powerpc64/fpu/s_rintf.S: Likewise.
> > * sysdeps/powerpc/powerpc64/fpu/s_round.S: Likewise.
> > * sysdeps/powerpc/powerpc64/fpu/s_roundf.S: Likewise.
> > * sysdeps/powerpc/powerpc64/fpu/s_trunc.S: Likewise.
> > * sysdeps/powerpc/powerpc64/fpu/s_truncf.S: Likewise.
> > * sysdeps/powerpc/powerpc64/memset.S: Likewise.
> > * sysdeps/powerpc/powerpc64/power7/fpu/s_finite.S: Likewise.
> > * sysdeps/powerpc/powerpc64/power7/fpu/s_isinf.S: Likewise.
> > * sysdeps/powerpc/powerpc64/power7/fpu/s_isnan.S: Likewise.
> > * sysdeps/powerpc/powerpc64/power7/strstr.S: Likewise.
> > * sysdeps/powerpc/powerpc64/power8/fpu/e_expf.S: Likewise.
> > * sysdeps/powerpc/powerpc64/power8/fpu/s_cosf.S: Likewise.
> > * sysdeps/powerpc/powerpc64/power8/fpu/s_sinf.S: Likewise.
> > * sysdeps/powerpc/powerpc64/power8/strcasestr.S: Likewise.
> > * sysdeps/powerpc/powerpc64/addmul_1.S: Use ENTRY_TOCLESS.
> > * sysdeps/powerpc/powerpc64/cell/memcpy.S: Likewise.
> > * sysdeps/powerpc/powerpc64/fpu/s_copysign.S: Likewise.
> > * sysdeps/powerpc/powerpc64/fpu/s_copysignl.S: Likewise.
> > * sysdeps/powerpc/powerpc64/fpu/s_fabsl.S: Likewise.
> > * sysdeps/powerpc/powerpc64/fpu/s_isnan.S: Likewise.
> > * sysdeps/powerpc/powerpc64/fpu/s_llrint.S: Likewise.
> > * sysdeps/powerpc/powerpc64/fpu/s_llrintf.S: Likewise.
> > * sysdeps/powerpc/powerpc64/lshift.S: Likewise.
> > * sysdeps/powerpc/powerpc64/memcpy.S: Likewise.
> > * sysdeps/powerpc/powerpc64/mul_1.S: Likewise.
> > * sysdeps/powerpc/powerpc64/power4/memcmp.S: Likewise.
> > * sysdeps/powerpc/powerpc64/power4/memcpy.S: Likewise.
> > * sysdeps/powerpc/powerpc64/power4/memset.S: Likewise.
> > * sysdeps/powerpc/powerpc64/power4/strncmp.S: Likewise.
> > * sysdeps/powerpc/powerpc64/power5+/fpu/s_ceil.S: Likewise.
> > * sysdeps/powerpc/powerpc64/power5+/fpu/s_ceilf.S: Likewise.
> > * sysdeps/powerpc/powerpc64/power5+/fpu/s_floor.S: Likewise.
> > * sysdeps/powerpc/powerpc64/power5+/fpu/s_floorf.S: Likewise.
> > * sysdeps/powerpc/powerpc64/power5+/fpu/s_llround.S: Likewise.
> > * sysdeps/powerpc/powerpc64/power5+/fpu/s_round.S: Likewise.
> > * sysdeps/powerpc/powerpc64/power5+/fpu/s_roundf.S: Likewise.
> > * sysdeps/powerpc/powerpc64/power5+/fpu/s_trunc.S: Likewise.
> > * sysdeps/powerpc/powerpc64/power5+/fpu/s_truncf.S: Likewise.
> > * sysdeps/powerpc/powerpc64/power5/fpu/s_isnan.S: Likewise.
> > * sysdeps/powerpc/powerpc64/power6/fpu/s_copysign.S: Likewise.
> > * sysdeps/powerpc/powerpc64/power6/fpu/s_isnan.S: Likewise.
> > * sysdeps/powerpc/powerpc64/power6/memcpy.S: Likewise.
> > * sysdeps/powerpc/powerpc64/power6/memset.S: Likewise.
> > * sysdeps/powerpc/powerpc64/power6x/fpu/s_isnan.S: Likewise.
> > * sysdeps/powerpc/powerpc64/power6x/fpu/s_llrint.S: Likewise.
> > * sysdeps/powerpc/powerpc64/power6x/fpu/s_llround.S: Likewise.
> > * sysdeps/powerpc/powerpc64/power7/add_n.S: Likewise.
> > * sysdeps/powerpc/powerpc64/power7/memchr.S: Likewise.
> > * sysdeps/powerpc/powerpc64/power7/memcmp.S: Likewise.
> > * sysdeps/powerpc/powerpc64/power7/memcpy.S: Likewise.
> > * sysdeps/powerpc/powerpc64/power7/memmove.S: Likewise.
> > * sysdeps/powerpc/powerpc64/power7/mempcpy.S: Likewise.
> > * sysdeps/powerpc/powerpc64/power7/memrchr.S: Likewise.
> > * sysdeps/powerpc/powerpc64/power7/memset.S: Likewise.
> > * sysdeps/powerpc/powerpc64/power7/rawmemchr.S: Likewise.
> > * sysdeps/powerpc/powerpc64/power7/strcasecmp.S (strcasecmp_l):
> > Likewise.
> > * sysdeps/powerpc/powerpc64/power7/strchr.S: Likewise.
> > * sysdeps/powerpc/powerpc64/power7/strchrnul.S: Likewise.
> > * sysdeps/powerpc/powerpc64/power7/strcmp.S: Likewise.
> > * sysdeps/powerpc/powerpc64/power7/strlen.S: Likewise.
> > * sysdeps/powerpc/powerpc64/power7/strncmp.S: Likewise.
> > * sysdeps/powerpc/powerpc64/power7/strncpy.S: Likewise.
> > * sysdeps/powerpc/powerpc64/power7/strnlen.S: Likewise.
> > * sysdeps/powerpc/powerpc64/power7/strrchr.S: Likewise.
> > * sysdeps/powerpc/powerpc64/power8/fpu/s_finite.S: Likewise.
> > * sysdeps/powerpc/powerpc64/power8/fpu/s_isinf.S: Likewise.
> > * sysdeps/powerpc/powerpc64/power8/fpu/s_isnan.S: Likewise.
> > * sysdeps/powerpc/powerpc64/power8/fpu/s_llrint.S: Likewise.
> > * sysdeps/powerpc/powerpc64/power8/fpu/s_llround.S: Likewise.
> > * sysdeps/powerpc/powerpc64/power8/memcmp.S: Likewise.
> > * sysdeps/powerpc/powerpc64/power8/memset.S: Likewise.
> > * sysdeps/powerpc/powerpc64/power8/strchr.S: Likewise.
> > * sysdeps/powerpc/powerpc64/power8/strcmp.S: Likewise.
> > * sysdeps/powerpc/powerpc64/power8/strcpy.S: Likewise.
> > * sysdeps/powerpc/powerpc64/power8/strlen.S: Likewise.
> > * sysdeps/powerpc/powerpc64/power8/strncmp.S: Likewise.
> > * sysdeps/powerpc/powerpc64/power8/strncpy.S: Likewise.
> > * sysdeps/powerpc/powerpc64/power8/strnlen.S: Likewise.
> > * sysdeps/powerpc/powerpc64/power8/strrchr.S: Likewise.
> > * sysdeps/powerpc/powerpc64/power8/strspn.S: Likewise.
> > * sysdeps/powerpc/powerpc64/power9/strcmp.S: Likewise.
> > * sysdeps/powerpc/powerpc64/power9/strncmp.S: Likewise.
> > * sysdeps/powerpc/powerpc64/strchr.S: Likewise.
> > * sysdeps/powerpc/powerpc64/strcmp.S: Likewise.
> > * sysdeps/powerpc/powerpc64/strlen.S: Likewise.
> > * sysdeps/powerpc/powerpc64/strncmp.S: Likewise.
> > * sysdeps/powerpc/powerpc64/ppc-mcount.S: Store LR earlier. Don't
> > add nop when SHARED.
> > * sysdeps/powerpc/powerpc64/start.S: Fix comment.
> > * sysdeps/powerpc/powerpc64/multiarch/strrchr-power8.S (ENTRY): Don't
> > define.
> > (ENTRY_TOCLESS): Define.
>
> There are 2 more functions that could benefit from this optimization as well:
> - sysdeps/powerpc/fpu/s_fmaf.S
> - sysdeps/powerpc/fpu/s_fma.S
>
> Notice they're reused in powerpc32.
I see. I hadn't looked for included files. This will mean modifying
powerpc32/sysdep.h to add
#define ENTRY_TOCLESS(name) ENTRY(name)
>
> > diff --git a/sysdeps/powerpc/powerpc64/power8/strcasestr.S b/sysdeps/powerpc/powerpc64/power8/strcasestr.S
> > index 6ac6572..3f59cb0 100644
> > --- a/sysdeps/powerpc/powerpc64/power8/strcasestr.S
> > +++ b/sysdeps/powerpc/powerpc64/power8/strcasestr.S
> > @@ -85,7 +85,7 @@
> > /* TODO: change this to .machine power8 when the minimum required binutils
> > allows it. */
> > .machine power7
> > -EALIGN (STRCASESTR, 4, 0)
> > +ENTRY (STRCASESTR, 4)
> > CALL_MCOUNT 2
> > mflr r0 /* Load link register LR to r0. */
> > std r31, -8(r1) /* Save callers register r31. */
>
>
> Isn't it safe to use ENTRY_TOCLESS here too?
No, the code uses @got@tprel(r2).
--
Alan Modra
Australia Development Lab, IBM
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 3/6] PowerPC64 sysdep.h tidy
2017-06-13 1:27 ` Alan Modra
@ 2017-06-13 17:05 ` Tulio Magno Quites Machado Filho
0 siblings, 0 replies; 19+ messages in thread
From: Tulio Magno Quites Machado Filho @ 2017-06-13 17:05 UTC (permalink / raw)
To: Alan Modra; +Cc: libc-alpha
Alan Modra <amodra@gmail.com> writes:
> On Mon, Jun 12, 2017 at 03:12:22PM -0300, Tulio Magno Quites Machado Filho wrote:
>> Alan Modra <amodra@gmail.com> writes:
>>
>> > diff --git a/sysdeps/powerpc/powerpc64/sysdep.h b/sysdeps/powerpc/powerpc64/sysdep.h
>> > index 4347323..860420e 100644
>> > --- a/sysdeps/powerpc/powerpc64/sysdep.h
>> > +++ b/sysdeps/powerpc/powerpc64/sysdep.h
>> > @@ -106,25 +106,25 @@
>> > # define OPD_ENT(name) .quad BODY_LABEL (name), .TOC.@tocbase, 0
>> > #endif
>> >
>> > -#define ENTRY_1(name) \
>> > +#define ENTRY_1(name) \
>> > .type BODY_LABEL(name),@function; \
>> > .globl name; \
>> > .section ".opd","aw"; \
>> > - .align 3; \
>> > -name##: OPD_ENT (name); \
>> > - .previous;
>> > + .p2align 3;FUNC_LABEL(name): \
>> > + OPD_ENT (name); \
>> > + .previous
>>
>> I'm just curious: is this format written somewhere or used somewhere else?
>
> If you're referring to the label change, assembly labels generally
> start in the first column (or immediately after a semicolon). On
> targets that don't need a colon to mark a label that matters a lot,
> since an identifier starting in the first column is a label and
> anything past that is a directive or instruction.. PowerPC isn't such
> a target, but it's a good convention to follow. I know it doesn't
> look as nice the way the macro is written now.
That's what I was referring to.
> Hmm, perhaps I should change the relevant lines to:
>
> .p2align 3 \
> ;FUNC_LABEL(name): \
> OPD_ENT (name); \
I don't think that's necessary.
I was just trying to clarify what was behind this change in order to adhere
to the same convention next time.
Thanks!
--
Tulio Magno
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 5/6] PowerPC64 ENTRY_TOCLESS
2017-06-13 14:46 ` Alan Modra
@ 2017-06-13 17:07 ` Tulio Magno Quites Machado Filho
0 siblings, 0 replies; 19+ messages in thread
From: Tulio Magno Quites Machado Filho @ 2017-06-13 17:07 UTC (permalink / raw)
To: Alan Modra; +Cc: libc-alpha
Alan Modra <amodra@gmail.com> writes:
> On Tue, Jun 13, 2017 at 09:23:12AM -0300, Tulio Magno Quites Machado Filho wrote:
>> Alan Modra <amodra@gmail.com> writes:
>>
>> There are 2 more functions that could benefit from this optimization as well:
>> - sysdeps/powerpc/fpu/s_fmaf.S
>> - sysdeps/powerpc/fpu/s_fma.S
>>
>> Notice they're reused in powerpc32.
>
> I see. I hadn't looked for included files. This will mean modifying
> powerpc32/sysdep.h to add
>
> #define ENTRY_TOCLESS(name) ENTRY(name)
Looks good to me.
>> > diff --git a/sysdeps/powerpc/powerpc64/power8/strcasestr.S b/sysdeps/powerpc/powerpc64/power8/strcasestr.S
>> > index 6ac6572..3f59cb0 100644
>> > --- a/sysdeps/powerpc/powerpc64/power8/strcasestr.S
>> > +++ b/sysdeps/powerpc/powerpc64/power8/strcasestr.S
>> > @@ -85,7 +85,7 @@
>> > /* TODO: change this to .machine power8 when the minimum required binutils
>> > allows it. */
>> > .machine power7
>> > -EALIGN (STRCASESTR, 4, 0)
>> > +ENTRY (STRCASESTR, 4)
>> > CALL_MCOUNT 2
>> > mflr r0 /* Load link register LR to r0. */
>> > std r31, -8(r1) /* Save callers register r31. */
>>
>>
>> Isn't it safe to use ENTRY_TOCLESS here too?
>
> No, the code uses @got@tprel(r2).
Ack.
Thanks!
--
Tulio Magno
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 6/6] PowerPC64 ELFv2 PPC64_OPT_LOCALENTRY
2017-06-03 4:46 ` Alan Modra
@ 2017-06-13 18:21 ` Tulio Magno Quites Machado Filho
2017-06-14 8:53 ` Alan Modra
0 siblings, 1 reply; 19+ messages in thread
From: Tulio Magno Quites Machado Filho @ 2017-06-13 18:21 UTC (permalink / raw)
To: Alan Modra, libc-alpha
Alan Modra <amodra@gmail.com> writes:
> On Thu, Jun 01, 2017 at 10:41:45PM +0930, Alan Modra wrote:
>> diff --git a/sysdeps/powerpc/powerpc64/dl-machine.h b/sysdeps/powerpc/powerpc64/dl-machine.h
> [snip]
>> + && (STO_PPC64_LOCAL_MASK & refsym->st_other) == 0
>> + && (STO_PPC64_LOCAL_MASK & sym->st_other) != 0)
>> + _dl_error_localentry (map, refsym);
> [snip]
>> +extern void attribute_hidden _dl_error_localentry (struct link_map *map,
>> + const Elf64_Sym *refsym);
>
> The above of course is stupid and results in warnings "implicit
> declaration of function" and "conflicting types". I was accidentally
> building with --disable-werror, a thing I don't normally do, so missed
> seeing the error. The following revised patch fixes this and puts
> _dl_error_localentry definition inside #if _CALL_ELF == 2.
Looks good to me.
Do you plan to recover the commit message from the previous version of the
patch?
--
Tulio Magno
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 6/6] PowerPC64 ELFv2 PPC64_OPT_LOCALENTRY
2017-06-13 18:21 ` Tulio Magno Quites Machado Filho
@ 2017-06-14 8:53 ` Alan Modra
0 siblings, 0 replies; 19+ messages in thread
From: Alan Modra @ 2017-06-14 8:53 UTC (permalink / raw)
To: Tulio Magno Quites Machado Filho; +Cc: libc-alpha
On Tue, Jun 13, 2017 at 03:21:44PM -0300, Tulio Magno Quites Machado Filho wrote:
> Looks good to me.
>
> Do you plan to recover the commit message from the previous version of the
> patch?
Yes, of course. I'm old school when it comes to posting and edit my
emails, unlike some who quote a 1000 line patch when replying with a
single line. Etiquette learned in the days of 1200 baud dialup. ;-)
Patch series pushed. Thanks for reviewing.
--
Alan Modra
Australia Development Lab, IBM
^ permalink raw reply [flat|nested] 19+ messages in thread
end of thread, other threads:[~2017-06-14 8:53 UTC | newest]
Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-01 13:04 [PATCH 0/6] PowerPC64 ELFv2 PPC64_OPT_LOCALENTRY Alan Modra
2017-06-01 13:08 ` [PATCH 1/6] PowerPC64, fix calls to _mcount Alan Modra
2017-06-12 18:07 ` Tulio Magno Quites Machado Filho
2017-06-01 13:09 ` [PATCH 2/6] PowerPC64 FRAME_PARM_SAVE Alan Modra
2017-06-12 18:07 ` Tulio Magno Quites Machado Filho
2017-06-01 13:09 ` [PATCH 3/6] PowerPC64 sysdep.h tidy Alan Modra
2017-06-12 18:12 ` Tulio Magno Quites Machado Filho
2017-06-13 1:27 ` Alan Modra
2017-06-13 17:05 ` Tulio Magno Quites Machado Filho
2017-06-01 13:10 ` [PATCH 4/6] strncpy, stpncpy and strstr fixes Alan Modra
2017-06-12 19:55 ` Tulio Magno Quites Machado Filho
2017-06-01 13:11 ` [PATCH 5/6] PowerPC64 ENTRY_TOCLESS Alan Modra
2017-06-13 12:23 ` Tulio Magno Quites Machado Filho
2017-06-13 14:46 ` Alan Modra
2017-06-13 17:07 ` Tulio Magno Quites Machado Filho
2017-06-01 13:11 ` [PATCH 6/6] PowerPC64 ELFv2 PPC64_OPT_LOCALENTRY Alan Modra
2017-06-03 4:46 ` Alan Modra
2017-06-13 18:21 ` Tulio Magno Quites Machado Filho
2017-06-14 8:53 ` Alan Modra
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).