Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
* sysdeps/unix/sysv/linux/i386/sysdep.h
	(SETUP_PIC_REG, LOAD_PIC_REG): Move these macros ...
	* sysdeps/i386/sysdep.h [PIC]: ... to here.
  • Loading branch information
Roland McGrath committed May 25, 2005
1 parent ce9b3bc commit 1f70840
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 26 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
@@ -1,3 +1,9 @@
2005-05-24 Roland McGrath <roland@redhat.com>

* sysdeps/unix/sysv/linux/i386/sysdep.h
(SETUP_PIC_REG, LOAD_PIC_REG): Move these macros ...
* sysdeps/i386/sysdep.h [PIC]: ... to here.

2005-05-23 Roland McGrath <roland@redhat.com>

* sysdeps/arm, sysdeps/unix/arm, sysdeps/unix/sysv/linux/arm:
Expand Down
27 changes: 27 additions & 0 deletions sysdeps/i386/sysdep.h
Expand Up @@ -131,6 +131,33 @@ lose: SYSCALL_PIC_SETUP \
0: popl %ebx; \
cfi_adjust_cfa_offset (-4); \
addl $_GLOBAL_OFFSET_TABLE+[.-0b], %ebx;

# ifndef HAVE_HIDDEN
# define SETUP_PIC_REG(reg) \
call 1f; \
.subsection 1; \
1:movl (%esp), %e##reg; \
ret; \
.previous
# else
# define SETUP_PIC_REG(reg) \
.ifndef __i686.get_pc_thunk.reg; \
.section .gnu.linkonce.t.__i686.get_pc_thunk.reg,"ax",@progbits; \
.globl __i686.get_pc_thunk.reg; \
.hidden __i686.get_pc_thunk.reg; \
.type __i686.get_pc_thunk.reg,@function; \
__i686.get_pc_thunk.reg: \
movl (%esp), %e##reg; \
ret; \
.size __i686.get_pc_thunk.reg, . - __i686.get_pc_thunk.reg; \
.previous; \
.endif; \
call __i686.get_pc_thunk.reg
# endif

# define LOAD_PIC_REG(reg) \
SETUP_PIC_REG(reg); addl $_GLOBAL_OFFSET_TABLE_, %e##reg

#else
#define JUMPTARGET(name) name
#define SYSCALL_PIC_SETUP /* Nothing. */
Expand Down
26 changes: 0 additions & 26 deletions sysdeps/unix/sysv/linux/i386/sysdep.h
Expand Up @@ -109,32 +109,6 @@
# define SYSCALL_ERROR_HANDLER /* Nothing here; code in sysdep.S is used. */
#else

# ifndef HAVE_HIDDEN
# define SETUP_PIC_REG(reg) \
call 1f; \
.subsection 1; \
1:movl (%esp), %e##reg; \
ret; \
.previous
# else
# define SETUP_PIC_REG(reg) \
.ifndef __i686.get_pc_thunk.reg; \
.section .gnu.linkonce.t.__i686.get_pc_thunk.reg,"ax",@progbits; \
.globl __i686.get_pc_thunk.reg; \
.hidden __i686.get_pc_thunk.reg; \
.type __i686.get_pc_thunk.reg,@function; \
__i686.get_pc_thunk.reg: \
movl (%esp), %e##reg; \
ret; \
.size __i686.get_pc_thunk.reg, . - __i686.get_pc_thunk.reg; \
.previous; \
.endif; \
call __i686.get_pc_thunk.reg
# endif

# define LOAD_PIC_REG(reg) \
SETUP_PIC_REG(reg); addl $_GLOBAL_OFFSET_TABLE_, %e##reg

# if RTLD_PRIVATE_ERRNO
# define SYSCALL_ERROR_HANDLER \
0:SETUP_PIC_REG(cx); \
Expand Down

0 comments on commit 1f70840

Please sign in to comment.