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