about summary refs log tree commit diff
path: root/config.h.in
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2022-01-13 14:59:29 +0100
committerFlorian Weimer <fweimer@redhat.com>2022-01-13 14:59:44 +0100
commita78e6a10d0b50d0ca80309775980fc99944b1727 (patch)
tree19f7d5292f87eb81b13cc4684c2c818bcbbe7a5e /config.h.in
parentf9dab1b5f23d0fb008a56c7c6c8919adb49d3611 (diff)
downloadglibc-a78e6a10d0b50d0ca80309775980fc99944b1727.tar.gz
glibc-a78e6a10d0b50d0ca80309775980fc99944b1727.tar.xz
glibc-a78e6a10d0b50d0ca80309775980fc99944b1727.zip
i386: Remove broken CAN_USE_REGISTER_ASM_EBP (bug 28771)
The configure check for CAN_USE_REGISTER_ASM_EBP tried to compile a
simple function that uses %ebp as an inline assembly operand.  If
compilation failed, CAN_USE_REGISTER_ASM_EBP was set 0, which
eventually had these consequences:

(1) %ebx was avoided as an inline assembly operand, with an
    assembler macro hack to avoid unnecessary register moves.
(2) %ebp was avoided as an inline assembly operand, using an
    out-of-line syscall function for 6-argument system calls.

(1) is no longer needed for any GCC version that is supported for
building glibc.  %ebx can be used directly as a register operand.
Therefore, this commit removes the %ebx avoidance completely.  This
avoids the assembler macro hack, which turns out to be incompatible
with the current Systemtap probe macros (which switch to .altmacro
unconditionally).

(2) is still needed in many build configurations.  The existing
configure check cannot really capture that because the simple function
succeeds to compile, while the full glibc build still fails.
Therefore, this commit removes the check, the CAN_USE_REGISTER_ASM_EBP
macro, and uses the out-of-line syscall function for 6-argument system
calls unconditionally.

Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
Diffstat (limited to 'config.h.in')
-rw-r--r--config.h.in4
1 files changed, 0 insertions, 4 deletions
diff --git a/config.h.in b/config.h.in
index 82ade1cec4..ff8597413d 100644
--- a/config.h.in
+++ b/config.h.in
@@ -277,10 +277,6 @@
 /* Define if static PIE is enabled.  */
 #define ENABLE_STATIC_PIE 0
 
-/* Some compiler options may now allow to use ebp in __asm__ (used mainly
-   in i386 6 argument syscall issue).  */
-#define CAN_USE_REGISTER_ASM_EBP 0
-
 /* The default value of x86 CET control.  */
 #define DEFAULT_DL_X86_CET_CONTROL cet_elf_property