This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.
Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
We cannot jmp to a global symbol with PIC. The old asm works by
accident where the old assembler optimizes the jump to a symbol
defined in the same file. The new assembler uses relocation for
global jumps. BTW, glibc 2.2 is ok.
--
H.J. Lu (hjl@gnu.org)
---
2000-06-03 H.J. Lu <hjl@gnu.org>
* sysdeps/i386/elf/setjmp.S (setjmp): Use local symbol entry
for jmp to support PIC.
Index: sysdeps/i386/elf/setjmp.S
===================================================================
RCS file: /work/cvs/gnu/glibc-2.1/sysdeps/i386/elf/setjmp.S,v
retrieving revision 1.1.1.2
diff -u -p -r1.1.1.2 setjmp.S
--- sysdeps/i386/elf/setjmp.S 1997/12/05 00:28:47 1.1.1.2
+++ sysdeps/i386/elf/setjmp.S 2000/06/04 04:48:21
@@ -31,7 +31,7 @@ ENTRY (setjmp)
pushl $1 /* Push second argument of zero. */
pushl %ecx /* Push back first argument. */
pushl %eax /* Push back return PC. */
- jmp __sigsetjmp
+ jmp sigsetjmp
END (setjmp)
/* Binary compatibility entry point. */
@@ -45,6 +45,7 @@ ENTRY (__setjmp)
pushl %eax /* Push back return address. */
ENTRY (__sigsetjmp)
+sigsetjmp:
movl 4(%esp), %eax /* User's jmp_buf in %eax. */
/* Save registers. */
movl %ebx, (JB_BX*4)(%eax)
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |