mirror of git://sourceware.org/git/glibc.git
powerpc: Fix --disable-multi-arch build on POWER8
Add missing symbols of stpncpy and strcasestr when multi-arch is disabled. Fix memset call from strncpy/stpncpy when multi-arch is disabled.
This commit is contained in:
parent
b5537473c2
commit
c24480ce3b
15
ChangeLog
15
ChangeLog
|
@ -1,3 +1,18 @@
|
||||||
|
2016-06-06 Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>
|
||||||
|
|
||||||
|
* sysdeps/powerpc/powerpc64/power8/strcasestr.S (__strcasestr):
|
||||||
|
New symbol defined as libc_hidden_def.
|
||||||
|
(strcasestr): Became a weak alias to __strcasestr.
|
||||||
|
* sysdeps/powerpc/powerpc64/power8/strncpy.S: Handle memset calls
|
||||||
|
according to multi-arch support. Move __stpncpy hidden
|
||||||
|
definition from here to...
|
||||||
|
* sysdeps/powerpc/powerpc64/power8/stpncpy.S: ...here. Add
|
||||||
|
symbol stpncpy.
|
||||||
|
* sysdeps/powerpc/powerpc64/multiarch/stpncpy-power8.S: Undefine
|
||||||
|
libc_hidden_builtin_def.
|
||||||
|
* sysdeps/powerpc/powerpc64/multiarch/strncpy-power8.S: Specify which
|
||||||
|
memset symbol to use when multi-arch support is available.
|
||||||
|
|
||||||
2016-06-06 Stefan Liebler <stli@linux.vnet.ibm.com>
|
2016-06-06 Stefan Liebler <stli@linux.vnet.ibm.com>
|
||||||
|
|
||||||
* dlfcn/tst-rec-dlopen.c: Include string.h.
|
* dlfcn/tst-rec-dlopen.c: Include string.h.
|
||||||
|
|
|
@ -36,4 +36,7 @@
|
||||||
TRACEBACK(__stpncpy_power8) \
|
TRACEBACK(__stpncpy_power8) \
|
||||||
END_2(__stpncpy_power8)
|
END_2(__stpncpy_power8)
|
||||||
|
|
||||||
|
#undef libc_hidden_builtin_def
|
||||||
|
#define libc_hidden_builtin_def(name)
|
||||||
|
|
||||||
#include <sysdeps/powerpc/powerpc64/power8/stpncpy.S>
|
#include <sysdeps/powerpc/powerpc64/power8/stpncpy.S>
|
||||||
|
|
|
@ -37,4 +37,7 @@
|
||||||
#undef libc_hidden_builtin_def
|
#undef libc_hidden_builtin_def
|
||||||
#define libc_hidden_builtin_def(name)
|
#define libc_hidden_builtin_def(name)
|
||||||
|
|
||||||
|
/* memset is used to pad the end of the string. */
|
||||||
|
#define MEMSET __memset_power8
|
||||||
|
|
||||||
#include <sysdeps/powerpc/powerpc64/power8/strncpy.S>
|
#include <sysdeps/powerpc/powerpc64/power8/strncpy.S>
|
||||||
|
|
|
@ -18,3 +18,7 @@
|
||||||
|
|
||||||
#define USE_AS_STPNCPY
|
#define USE_AS_STPNCPY
|
||||||
#include <sysdeps/powerpc/powerpc64/power8/strncpy.S>
|
#include <sysdeps/powerpc/powerpc64/power8/strncpy.S>
|
||||||
|
|
||||||
|
weak_alias (__stpncpy, stpncpy)
|
||||||
|
libc_hidden_def (__stpncpy)
|
||||||
|
libc_hidden_builtin_def (stpncpy)
|
||||||
|
|
|
@ -81,7 +81,7 @@
|
||||||
/* TODO: change this to .machine power8 when the minimum required binutils
|
/* TODO: change this to .machine power8 when the minimum required binutils
|
||||||
allows it. */
|
allows it. */
|
||||||
.machine power7
|
.machine power7
|
||||||
EALIGN (strcasestr, 4, 0)
|
EALIGN (__strcasestr, 4, 0)
|
||||||
CALL_MCOUNT 2
|
CALL_MCOUNT 2
|
||||||
mflr r0 /* Load link register LR to r0. */
|
mflr r0 /* Load link register LR to r0. */
|
||||||
std r31, -8(r1) /* Save callers register r31. */
|
std r31, -8(r1) /* Save callers register r31. */
|
||||||
|
@ -527,5 +527,8 @@ L(end):
|
||||||
cfi_restore(r31)
|
cfi_restore(r31)
|
||||||
mtlr r0 /* Branch to link register. */
|
mtlr r0 /* Branch to link register. */
|
||||||
blr
|
blr
|
||||||
END (strcasestr)
|
END (__strcasestr)
|
||||||
|
|
||||||
|
weak_alias (__strcasestr, strcasestr)
|
||||||
|
libc_hidden_def (__strcasestr)
|
||||||
libc_hidden_builtin_def (strcasestr)
|
libc_hidden_builtin_def (strcasestr)
|
||||||
|
|
|
@ -24,6 +24,16 @@
|
||||||
# define FUNC_NAME strncpy
|
# define FUNC_NAME strncpy
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef MEMSET
|
||||||
|
/* For builds without IFUNC support, local calls should be made to internal
|
||||||
|
GLIBC symbol (created by libc_hidden_builtin_def). */
|
||||||
|
# ifdef SHARED
|
||||||
|
# define MEMSET __GI_memset
|
||||||
|
# else
|
||||||
|
# define MEMSET memset
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#define FRAMESIZE (FRAME_MIN_SIZE+48)
|
#define FRAMESIZE (FRAME_MIN_SIZE+48)
|
||||||
|
|
||||||
/* Implements the function
|
/* Implements the function
|
||||||
|
@ -223,7 +233,7 @@ L(zero_pad_start_1):
|
||||||
stdu r1,-FRAMESIZE(r1)
|
stdu r1,-FRAMESIZE(r1)
|
||||||
cfi_adjust_cfa_offset(FRAMESIZE)
|
cfi_adjust_cfa_offset(FRAMESIZE)
|
||||||
|
|
||||||
bl __memset_power8
|
bl MEMSET
|
||||||
nop
|
nop
|
||||||
|
|
||||||
/* Restore the stack frame. */
|
/* Restore the stack frame. */
|
||||||
|
@ -442,8 +452,6 @@ L(zero_pad_start_prepare_1):
|
||||||
b L(zero_pad_start_1)
|
b L(zero_pad_start_1)
|
||||||
END (FUNC_NAME)
|
END (FUNC_NAME)
|
||||||
|
|
||||||
#ifdef USE_AS_STPNCPY
|
#ifndef USE_AS_STPNCPY
|
||||||
libc_hidden_def (__stpncpy)
|
|
||||||
#else
|
|
||||||
libc_hidden_builtin_def (strncpy)
|
libc_hidden_builtin_def (strncpy)
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue