Blame SOURCES/glibc-rh1505492-bounded-13.patch

147e83
commit 2969121014b150036551c93a09da7686ffcac817
147e83
Author: Joseph Myers <joseph@codesourcery.com>
147e83
Date:   Sun Feb 17 21:57:26 2013 +0000
147e83
147e83
    Remove bounded-pointers handling from x86_64 assembly sources.
147e83
147e83
Conflicts:
147e83
	sysdeps/x86_64/bp-asm.h
147e83
	  (Copyright header change, file removed manually.)
147e83
	sysdeps/x86_64/strcmp.S
147e83
	  (Context change due to earlier IS_IN backport.)
147e83
147e83
diff --git a/sysdeps/unix/sysv/linux/x86_64/clone.S b/sysdeps/unix/sysv/linux/x86_64/clone.S
147e83
index 53f9fbd782848988..9a88bbc94e3f14e9 100644
147e83
--- a/sysdeps/unix/sysv/linux/x86_64/clone.S
147e83
+++ b/sysdeps/unix/sysv/linux/x86_64/clone.S
147e83
@@ -22,8 +22,6 @@
147e83
 #define _ERRNO_H	1
147e83
 #include <bits/errno.h>
147e83
 #include <asm-syntax.h>
147e83
-#include <bp-sym.h>
147e83
-#include <bp-asm.h>
147e83
 
147e83
 #define CLONE_VM	0x00000100
147e83
 #define CLONE_THREAD	0x00010000
147e83
@@ -52,7 +50,7 @@
147e83
 
147e83
 
147e83
         .text
147e83
-ENTRY (BP_SYM (__clone))
147e83
+ENTRY (__clone)
147e83
 	/* Sanity check arguments.  */
147e83
 	movq	$-EINVAL,%rax
147e83
 	testq	%rdi,%rdi		/* no NULL function pointers */
147e83
@@ -117,6 +115,6 @@ L(thread_start):
147e83
 	cfi_endproc;
147e83
 
147e83
 	cfi_startproc;
147e83
-PSEUDO_END (BP_SYM (__clone))
147e83
+PSEUDO_END (__clone)
147e83
 
147e83
-weak_alias (BP_SYM (__clone), BP_SYM (clone))
147e83
+weak_alias (__clone, clone)
147e83
diff --git a/sysdeps/unix/sysv/linux/x86_64/sysdep.h b/sysdeps/unix/sysv/linux/x86_64/sysdep.h
147e83
index 3e91c38dcf83bd8b..4b5105dbfde763d2 100644
147e83
--- a/sysdeps/unix/sysv/linux/x86_64/sysdep.h
147e83
+++ b/sysdeps/unix/sysv/linux/x86_64/sysdep.h
147e83
@@ -20,8 +20,6 @@
147e83
 
147e83
 /* There is some commonality.  */
147e83
 #include <sysdeps/unix/x86_64/sysdep.h>
147e83
-#include <bp-sym.h>
147e83
-#include <bp-asm.h>
147e83
 #include <tls.h>
147e83
 
147e83
 #if IS_IN (rtld)
147e83
diff --git a/sysdeps/unix/x86_64/sysdep.S b/sysdeps/unix/x86_64/sysdep.S
147e83
index db13ac49d7e19f4e..f8f66ed03ef5fb0d 100644
147e83
--- a/sysdeps/unix/x86_64/sysdep.S
147e83
+++ b/sysdeps/unix/x86_64/sysdep.S
147e83
@@ -18,8 +18,6 @@
147e83
 #include <sysdep.h>
147e83
 #define _ERRNO_H
147e83
 #include <bits/errno.h>
147e83
-#include <bp-asm.h>
147e83
-#include <bp-sym.h>
147e83
 #include <tls.h>
147e83
 
147e83
 #if IS_IN (rtld)
147e83
diff --git a/sysdeps/x86_64/bp-asm.h b/sysdeps/x86_64/bp-asm.h
147e83
deleted file mode 100644
147e83
index 355ec8f634bc8e8e..0000000000000000
147e83
--- a/sysdeps/x86_64/bp-asm.h
147e83
+++ /dev/null
147e83
@@ -1,140 +0,0 @@
147e83
-/* Bounded-pointer definitions for x86-64 assembler.
147e83
-   Copyright (C) 2001 Free Software Foundation, Inc.
147e83
-
147e83
-   The GNU C Library is free software; you can redistribute it and/or
147e83
-   modify it under the terms of the GNU Lesser General Public
147e83
-   License as published by the Free Software Foundation; either
147e83
-   version 2.1 of the License, or (at your option) any later version.
147e83
-
147e83
-   The GNU C Library is distributed in the hope that it will be useful,
147e83
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
147e83
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
147e83
-   Lesser General Public License for more details.
147e83
-
147e83
-   You should have received a copy of the GNU Lesser General Public
147e83
-   License along with the GNU C Library; if not, see
147e83
-   <http://www.gnu.org/licenses/>.  */
147e83
-
147e83
-#ifndef _bp_asm_h_
147e83
-# define _bp_asm_h_ 1
147e83
-
147e83
-# if __ASSEMBLER__
147e83
-
147e83
-#  if __BOUNDED_POINTERS__
147e83
-
147e83
-/* Bounded pointers occupy three words.  */
147e83
-#   define PTR_SIZE 24
147e83
-/* Bounded pointer return values are passed back through a hidden
147e83
-   argument that points to caller-allocate space.  The hidden arg
147e83
-   occupies one word on the stack.  */
147e83
-#   define RTN_SIZE 6
147e83
-/* Although the caller pushes the hidden arg, the callee is
147e83
-   responsible for popping it.  */
147e83
-#   define RET_PTR ret $RTN_SIZE
147e83
-/* Maintain frame pointer chain in leaf assembler functions for the benefit
147e83
-   of debugging stack traces when bounds violations occur.  */
147e83
-#   define ENTER pushq %rbp; movq %rsp, %rbp
147e83
-#   define LEAVE movq %rbp, %rsp; popq %rbp
147e83
-/* Stack space overhead of procedure-call linkage: return address and
147e83
-   frame pointer.  */
147e83
-#   define LINKAGE 16
147e83
-/* Stack offset of return address after calling ENTER.  */
147e83
-#   define PCOFF 8
147e83
-
147e83
-/* Int 5 is the "bound range" exception also raised by the "bound"
147e83
-   instruction.  */
147e83
-#   define BOUNDS_VIOLATED int $5
147e83
-
147e83
-#   define CHECK_BOUNDS_LOW(VAL_REG, BP_MEM)	\
147e83
-	cmpq 8+BP_MEM, VAL_REG;			\
147e83
-	jae 0f; /* continue if value >= low */	\
147e83
-	BOUNDS_VIOLATED;			\
147e83
-    0:
147e83
-
147e83
-#   define CHECK_BOUNDS_HIGH(VAL_REG, BP_MEM, Jcc)	\
147e83
-	cmpq 16+BP_MEM, VAL_REG;			\
147e83
-	Jcc 0f; /* continue if value < high */		\
147e83
-	BOUNDS_VIOLATED;				\
147e83
-    0:
147e83
-
147e83
-#   define CHECK_BOUNDS_BOTH(VAL_REG, BP_MEM)	\
147e83
-	cmpq 8+BP_MEM, VAL_REG;			\
147e83
-	jb 1f; /* die if value < low */		\
147e83
-	cmpq 16+BP_MEM, VAL_REG;		\
147e83
-	jb 0f; /* continue if value < high */	\
147e83
-    1:	BOUNDS_VIOLATED;			\
147e83
-    0:
147e83
-
147e83
-#   define CHECK_BOUNDS_BOTH_WIDE(VAL_REG, BP_MEM, LENGTH)	\
147e83
-	CHECK_BOUNDS_LOW(VAL_REG, BP_MEM);			\
147e83
-	addl LENGTH, VAL_REG;					\
147e83
-	cmpq 16+BP_MEM, VAL_REG;					\
147e83
-	jbe 0f; /* continue if value <= high */			\
147e83
-	BOUNDS_VIOLATED;					\
147e83
-    0:	subq LENGTH, VAL_REG /* restore value */
147e83
-
147e83
-/* Take bounds from BP_MEM and affix them to the pointer
147e83
-   value in %rax, stuffing all into memory at RTN(%esp).
147e83
-   Use %rdx as a scratch register.  */
147e83
-
147e83
-#   define RETURN_BOUNDED_POINTER(BP_MEM)	\
147e83
-	movq RTN(%rsp), %rdx;			\
147e83
-	movq %rax, 0(%rdx);			\
147e83
-	movq 8+BP_MEM, %rax;			\
147e83
-	movq %rax, 4(%rdx);			\
147e83
-	movq 16+BP_MEM, %rax;			\
147e83
-	movq %rax, 8(%rdx)
147e83
-
147e83
-#   define RETURN_NULL_BOUNDED_POINTER		\
147e83
-	movl RTN(%rsp), %rdx;			\
147e83
-	movl %rax, 0(%rdx);			\
147e83
-	movl %rax, 4(%rdx);			\
147e83
-	movl %rax, 8(%rdx)
147e83
-
147e83
-/* The caller of __errno_location is responsible for allocating space
147e83
-   for the three-word BP return-value and passing pushing its address
147e83
-   as an implicit first argument.  */
147e83
-#   define PUSH_ERRNO_LOCATION_RETURN		\
147e83
-	subl $16, %esp;				\
147e83
-	subl $8, %esp;				\
147e83
-	pushq %rsp
147e83
-
147e83
-/* __errno_location is responsible for popping the implicit first
147e83
-   argument, but we must pop the space for the BP itself.  We also
147e83
-   dereference the return value in order to dig out the pointer value.  */
147e83
-#   define POP_ERRNO_LOCATION_RETURN		\
147e83
-	popq %rax;				\
147e83
-	addq $16, %rsp
147e83
-
147e83
-#  else /* !__BOUNDED_POINTERS__ */
147e83
-
147e83
-/* Unbounded pointers occupy one word.  */
147e83
-#   define PTR_SIZE 8
147e83
-/* Unbounded pointer return values are passed back in the register %rax.  */
147e83
-#   define RTN_SIZE 0
147e83
-/* Use simple return instruction for unbounded pointer values.  */
147e83
-#   define RET_PTR ret
147e83
-/* Don't maintain frame pointer chain for leaf assembler functions.  */
147e83
-#   define ENTER
147e83
-#   define LEAVE
147e83
-/* Stack space overhead of procedure-call linkage: return address only.  */
147e83
-#   define LINKAGE 8
147e83
-/* Stack offset of return address after calling ENTER.  */
147e83
-#   define PCOFF 0
147e83
-
147e83
-#   define CHECK_BOUNDS_LOW(VAL_REG, BP_MEM)
147e83
-#   define CHECK_BOUNDS_HIGH(VAL_REG, BP_MEM, Jcc)
147e83
-#   define CHECK_BOUNDS_BOTH(VAL_REG, BP_MEM)
147e83
-#   define CHECK_BOUNDS_BOTH_WIDE(VAL_REG, BP_MEM, LENGTH)
147e83
-#   define RETURN_BOUNDED_POINTER(BP_MEM)
147e83
-
147e83
-#   define RETURN_NULL_BOUNDED_POINTER
147e83
-
147e83
-#   define PUSH_ERRNO_LOCATION_RETURN
147e83
-#   define POP_ERRNO_LOCATION_RETURN
147e83
-
147e83
-#  endif /* !__BOUNDED_POINTERS__ */
147e83
-
147e83
-# endif /* __ASSEMBLER__ */
147e83
-
147e83
-#endif /* _bp_asm_h_ */
147e83
diff --git a/sysdeps/x86_64/bsd-_setjmp.S b/sysdeps/x86_64/bsd-_setjmp.S
147e83
index 434e342aec5699c7..5591dd67562506bb 100644
147e83
--- a/sysdeps/x86_64/bsd-_setjmp.S
147e83
+++ b/sysdeps/x86_64/bsd-_setjmp.S
147e83
@@ -25,16 +25,14 @@
147e83
 #define _ASM
147e83
 #define _SETJMP_H
147e83
 #include <bits/setjmp.h>
147e83
-#include "bp-sym.h"
147e83
-#include "bp-asm.h"
147e83
 
147e83
-ENTRY (BP_SYM (_setjmp))
147e83
+ENTRY (_setjmp)
147e83
 	/* Set up arguments, we only need to set the second arg.  */
147e83
 	xorl %esi, %esi
147e83
 #ifdef PIC
147e83
 	jmp HIDDEN_JUMPTARGET (__sigsetjmp)
147e83
 #else
147e83
-	jmp BP_SYM (__sigsetjmp)
147e83
+	jmp __sigsetjmp
147e83
 #endif
147e83
-END (BP_SYM (_setjmp))
147e83
+END (_setjmp)
147e83
 libc_hidden_def (_setjmp)
147e83
diff --git a/sysdeps/x86_64/bsd-setjmp.S b/sysdeps/x86_64/bsd-setjmp.S
147e83
index 17717f703b3aa360..87e8bc07495d68d1 100644
147e83
--- a/sysdeps/x86_64/bsd-setjmp.S
147e83
+++ b/sysdeps/x86_64/bsd-setjmp.S
147e83
@@ -25,15 +25,13 @@
147e83
 #define _ASM
147e83
 #define _SETJMP_H
147e83
 #include <bits/setjmp.h>
147e83
-#include "bp-sym.h"
147e83
-#include "bp-asm.h"
147e83
 
147e83
-ENTRY (BP_SYM (setjmp))
147e83
+ENTRY (setjmp)
147e83
 	/* Set up arguments, we only need to set the 2nd arg.  */
147e83
 	movl $1, %esi
147e83
 #ifdef	PIC
147e83
 	jmp HIDDEN_JUMPTARGET (__sigsetjmp)
147e83
 #else
147e83
-	jmp BP_SYM (__sigsetjmp)
147e83
+	jmp __sigsetjmp
147e83
 #endif
147e83
-END (BP_SYM (setjmp))
147e83
+END (setjmp)
147e83
diff --git a/sysdeps/x86_64/mempcpy.S b/sysdeps/x86_64/mempcpy.S
147e83
index 5cb256e65bdffd77..acee5e56b174c8bb 100644
147e83
--- a/sysdeps/x86_64/mempcpy.S
147e83
+++ b/sysdeps/x86_64/mempcpy.S
147e83
@@ -3,6 +3,6 @@
147e83
 #define __memcpy_chk __mempcpy_chk
147e83
 #include <sysdeps/x86_64/memcpy.S>
147e83
 
147e83
-libc_hidden_def (BP_SYM (__mempcpy))
147e83
-weak_alias (BP_SYM (__mempcpy), BP_SYM (mempcpy))
147e83
+libc_hidden_def (__mempcpy)
147e83
+weak_alias (__mempcpy, mempcpy)
147e83
 libc_hidden_builtin_def (mempcpy)
147e83
diff --git a/sysdeps/x86_64/rtld-strchr.S b/sysdeps/x86_64/rtld-strchr.S
147e83
index dcd26da84009c6f3..2148190dc1312411 100644
147e83
--- a/sysdeps/x86_64/rtld-strchr.S
147e83
+++ b/sysdeps/x86_64/rtld-strchr.S
147e83
@@ -19,12 +19,10 @@
147e83
 
147e83
 #include <sysdep.h>
147e83
 #include "asm-syntax.h"
147e83
-#include "bp-sym.h"
147e83
-#include "bp-asm.h"
147e83
 
147e83
 
147e83
 	.text
147e83
-ENTRY (BP_SYM (strchr))
147e83
+ENTRY (strchr)
147e83
 
147e83
 	/* Before we start with the main loop we process single bytes
147e83
 	   until the source pointer is aligned.  This has two reasons:
147e83
@@ -284,7 +282,7 @@ ENTRY (BP_SYM (strchr))
147e83
 6:
147e83
 	nop
147e83
 	retq
147e83
-END (BP_SYM (strchr))
147e83
+END (strchr)
147e83
 
147e83
-weak_alias (BP_SYM (strchr), BP_SYM (index))
147e83
+weak_alias (strchr, index)
147e83
 libc_hidden_builtin_def (strchr)
147e83
diff --git a/sysdeps/x86_64/rtld-strlen.S b/sysdeps/x86_64/rtld-strlen.S
147e83
index 7293f875513ce3e5..0d4f5b3c474b42a6 100644
147e83
--- a/sysdeps/x86_64/rtld-strlen.S
147e83
+++ b/sysdeps/x86_64/rtld-strlen.S
147e83
@@ -19,8 +19,6 @@
147e83
 
147e83
 #include <sysdep.h>
147e83
 #include "asm-syntax.h"
147e83
-#include "bp-sym.h"
147e83
-#include "bp-asm.h"
147e83
 
147e83
 
147e83
 	.text
147e83
diff --git a/sysdeps/x86_64/setjmp.S b/sysdeps/x86_64/setjmp.S
147e83
index dd87c484f9dac4ce..0d3865a7efd78ac4 100644
147e83
--- a/sysdeps/x86_64/setjmp.S
147e83
+++ b/sysdeps/x86_64/setjmp.S
147e83
@@ -61,10 +61,10 @@ ENTRY (__sigsetjmp)
147e83
 #else
147e83
 	/* Make a tail call to __sigjmp_save; it takes the same args.  */
147e83
 # ifdef	PIC
147e83
-	jmp C_SYMBOL_NAME (BP_SYM (__sigjmp_save))@PLT
147e83
+	jmp C_SYMBOL_NAME (__sigjmp_save)@PLT
147e83
 # else
147e83
-	jmp BP_SYM (__sigjmp_save)
147e83
+	jmp __sigjmp_save
147e83
 # endif
147e83
 #endif
147e83
-END (BP_SYM (__sigsetjmp))
147e83
+END (__sigsetjmp)
147e83
 hidden_def (__sigsetjmp)
147e83
diff --git a/sysdeps/x86_64/start.S b/sysdeps/x86_64/start.S
147e83
index e603463044eee26f..a288aa3265679fac 100644
147e83
--- a/sysdeps/x86_64/start.S
147e83
+++ b/sysdeps/x86_64/start.S
147e83
@@ -54,7 +54,6 @@
147e83
 */
147e83
 
147e83
 #include <sysdep.h>
147e83
-#include "bp-sym.h"
147e83
 
147e83
 	.text
147e83
 	.globl _start
147e83
@@ -106,21 +105,21 @@ _start:
147e83
 	mov __libc_csu_fini@GOTPCREL(%rip), %R8_LP
147e83
 	mov __libc_csu_init@GOTPCREL(%rip), %RCX_LP
147e83
 
147e83
-	mov BP_SYM (main)@GOTPCREL(%rip), %RDI_LP
147e83
+	mov main@GOTPCREL(%rip), %RDI_LP
147e83
 
147e83
 	/* Call the user's main function, and exit with its value.
147e83
 	   But let the libc call main.	  */
147e83
-	call BP_SYM (__libc_start_main)@PLT
147e83
+	call __libc_start_main@PLT
147e83
 #else
147e83
 	/* Pass address of our own entry points to .fini and .init.  */
147e83
 	mov $__libc_csu_fini, %R8_LP
147e83
 	mov $__libc_csu_init, %RCX_LP
147e83
 
147e83
-	mov $BP_SYM (main), %RDI_LP
147e83
+	mov $main, %RDI_LP
147e83
 
147e83
 	/* Call the user's main function, and exit with its value.
147e83
 	   But let the libc call main.	  */
147e83
-	call BP_SYM (__libc_start_main)
147e83
+	call __libc_start_main
147e83
 #endif
147e83
 
147e83
 	hlt			/* Crash if somehow `exit' does return.	 */
147e83
diff --git a/sysdeps/x86_64/strcat.S b/sysdeps/x86_64/strcat.S
147e83
index 535a18dd3f82cf8c..bd0ebda1ce806234 100644
147e83
--- a/sysdeps/x86_64/strcat.S
147e83
+++ b/sysdeps/x86_64/strcat.S
147e83
@@ -20,12 +20,10 @@
147e83
 
147e83
 #include <sysdep.h>
147e83
 #include "asm-syntax.h"
147e83
-#include "bp-sym.h"
147e83
-#include "bp-asm.h"
147e83
 
147e83
 
147e83
 	.text
147e83
-ENTRY (BP_SYM (strcat))
147e83
+ENTRY (strcat)
147e83
 	movq %rdi, %rcx		/* Dest. register. */
147e83
 	andl $7, %ecx		/* mask alignment bits */
147e83
 	movq %rdi, %rax		/* Duplicate destination pointer.  */
147e83
@@ -255,5 +253,5 @@ ENTRY (BP_SYM (strcat))
147e83
 24:
147e83
 	movq	%rdi, %rax	/* Source is return value.  */
147e83
 	retq
147e83
-END (BP_SYM (strcat))
147e83
+END (strcat)
147e83
 libc_hidden_builtin_def (strcat)
147e83
diff --git a/sysdeps/x86_64/strcmp.S b/sysdeps/x86_64/strcmp.S
147e83
index ac10cc70d10f84cf..6d5aa19f87afca00 100644
147e83
--- a/sysdeps/x86_64/strcmp.S
147e83
+++ b/sysdeps/x86_64/strcmp.S
147e83
@@ -22,8 +22,6 @@
147e83
 
147e83
 #include <sysdep.h>
147e83
 #include "asm-syntax.h"
147e83
-#include "bp-sym.h"
147e83
-#include "bp-asm.h"
147e83
 
147e83
 #undef UPDATE_STRNCMP_COUNTER
147e83
 
147e83
@@ -128,7 +126,7 @@ libc_hidden_def (__strncasecmp)
147e83
 	/* FALLTHROUGH to strncasecmp_l.  */
147e83
 #endif
147e83
 
147e83
-ENTRY (BP_SYM (STRCMP))
147e83
+ENTRY (STRCMP)
147e83
 #if !IS_IN (libc)
147e83
 /* Simple version since we can't use SSE registers in ld.so.  */
147e83
 L(oop):	movb	(%rdi), %al
147e83
@@ -146,7 +144,7 @@ L(neq):	movl	$1, %eax
147e83
 	movl	$-1, %ecx
147e83
 	cmovbl	%ecx, %eax
147e83
 	ret
147e83
-END (BP_SYM (STRCMP))
147e83
+END (STRCMP)
147e83
 #else	/* !IS_IN (libc) */
147e83
 # ifdef USE_AS_STRCASECMP_L
147e83
 	/* We have to fall back on the C implementation for locales
147e83
@@ -2282,7 +2280,7 @@ LABEL(Byte0):
147e83
 
147e83
 	sub	%ecx, %eax
147e83
 	ret
147e83
-END (BP_SYM (STRCMP))
147e83
+END (STRCMP)
147e83
 
147e83
 	.section .rodata,"a",@progbits
147e83
 	.p2align 3
147e83
diff --git a/sysdeps/x86_64/strcpy.S b/sysdeps/x86_64/strcpy.S
147e83
index 65216d26e1475489..5444658236bcb668 100644
147e83
--- a/sysdeps/x86_64/strcpy.S
147e83
+++ b/sysdeps/x86_64/strcpy.S
147e83
@@ -19,15 +19,13 @@
147e83
 
147e83
 #include <sysdep.h>
147e83
 #include "asm-syntax.h"
147e83
-#include "bp-sym.h"
147e83
-#include "bp-asm.h"
147e83
 
147e83
 #ifndef USE_AS_STPCPY
147e83
 # define STRCPY strcpy
147e83
 #endif
147e83
 
147e83
 	.text
147e83
-ENTRY (BP_SYM (STRCPY))
147e83
+ENTRY (STRCPY)
147e83
 	movq %rsi, %rcx		/* Source register. */
147e83
 	andl $7, %ecx		/* mask alignment bits */
147e83
 	movq %rdi, %rdx		/* Duplicate destination pointer.  */
147e83
@@ -152,7 +150,7 @@ ENTRY (BP_SYM (STRCPY))
147e83
 	movq	%rdi, %rax	/* Source is return value.  */
147e83
 #endif
147e83
 	retq
147e83
-END (BP_SYM (STRCPY))
147e83
+END (STRCPY)
147e83
 #ifndef USE_AS_STPCPY
147e83
 libc_hidden_builtin_def (strcpy)
147e83
 #endif
147e83
diff --git a/sysdeps/x86_64/strcpy_chk.S b/sysdeps/x86_64/strcpy_chk.S
147e83
index 1640e69235bf6808..ad8f594fa5b9f2db 100644
147e83
--- a/sysdeps/x86_64/strcpy_chk.S
147e83
+++ b/sysdeps/x86_64/strcpy_chk.S
147e83
@@ -20,8 +20,6 @@
147e83
 
147e83
 #include <sysdep.h>
147e83
 #include "asm-syntax.h"
147e83
-#include "bp-sym.h"
147e83
-#include "bp-asm.h"
147e83
 
147e83
 #ifndef USE_AS_STPCPY_CHK
147e83
 # define STRCPY_CHK __strcpy_chk
147e83
diff --git a/sysdeps/x86_64/strtok.S b/sysdeps/x86_64/strtok.S
147e83
index 4028a47f243d9a54..b221e4cd724f7234 100644
147e83
--- a/sysdeps/x86_64/strtok.S
147e83
+++ b/sysdeps/x86_64/strtok.S
147e83
@@ -21,8 +21,6 @@
147e83
 
147e83
 #include <sysdep.h>
147e83
 #include "asm-syntax.h"
147e83
-#include "bp-sym.h"
147e83
-#include "bp-asm.h"
147e83
 
147e83
 /* This file can be used for the strtok and strtok_r functions:
147e83
 
147e83
@@ -59,7 +57,7 @@ save_ptr:
147e83
 #endif
147e83
 
147e83
 	.text
147e83
-ENTRY (BP_SYM (FUNCTION))
147e83
+ENTRY (FUNCTION)
147e83
 	/* First we create a table with flags for all possible characters.
147e83
 	   For the ASCII (7bit/8bit) or ISO-8859-X character sets which are
147e83
 	   supported by the C string functions we have 256 characters.
147e83
@@ -207,4 +205,4 @@ L(returnNULL):
147e83
 	mov %RDX_LP, SAVE_PTR
147e83
 	jmp L(epilogue)
147e83
 
147e83
-END (BP_SYM (FUNCTION))
147e83
+END (FUNCTION)
147e83
diff --git a/sysdeps/x86_64/strtok_r.S b/sysdeps/x86_64/strtok_r.S
147e83
index 8ce0089c7b72390d..f0db78c67a8ef6a4 100644
147e83
--- a/sysdeps/x86_64/strtok_r.S
147e83
+++ b/sysdeps/x86_64/strtok_r.S
147e83
@@ -1,5 +1,5 @@
147e83
 #define FUNCTION __strtok_r
147e83
 #define USE_AS_STRTOK_R	1
147e83
 #include <sysdeps/x86_64/strtok.S>
147e83
-weak_alias (BP_SYM (__strtok_r), BP_SYM (strtok_r))
147e83
-strong_alias (BP_SYM (__strtok_r), BP_SYM (__GI___strtok_r))
147e83
+weak_alias (__strtok_r, strtok_r)
147e83
+strong_alias (__strtok_r, __GI___strtok_r)