aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-i386/combreloc.s
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2002-10-10 07:49:11 +0000
committerJakub Jelinek <jakub@redhat.com>2002-10-10 07:49:11 +0000
commit2030e6d786607499a56eeda4a28d2e0c2ba585aa (patch)
treed1a1f437c53e27ab5b2a7fdf27ade9476eac4901 /ld/testsuite/ld-i386/combreloc.s
parent967c0d836c8acc7fa86dd490c483f850dbadb851 (diff)
downloadgdb-2030e6d786607499a56eeda4a28d2e0c2ba585aa.zip
gdb-2030e6d786607499a56eeda4a28d2e0c2ba585aa.tar.gz
gdb-2030e6d786607499a56eeda4a28d2e0c2ba585aa.tar.bz2
* ld-i386/combreloc.s: New test.
* ld-i386/combreloc.d: New test. * ld-i386/i386.exp (i386tests): Add it.
Diffstat (limited to 'ld/testsuite/ld-i386/combreloc.s')
-rw-r--r--ld/testsuite/ld-i386/combreloc.s22
1 files changed, 22 insertions, 0 deletions
diff --git a/ld/testsuite/ld-i386/combreloc.s b/ld/testsuite/ld-i386/combreloc.s
new file mode 100644
index 0000000..2a78a7c
--- /dev/null
+++ b/ld/testsuite/ld-i386/combreloc.s
@@ -0,0 +1,22 @@
+ .text
+ .globl _start, foo
+ .type _start,@function
+_start:
+ pushl %ebp
+ movl %esp, %ebp
+ pushl %ebx
+ call 1f
+1: popl %ebx
+ addl $_GLOBAL_OFFSET_TABLE_+[.-1b], %ebx
+ movl _start@GOT(%ebx), %eax
+ movl (%eax), %eax
+ call foo@PLT
+ movl (%esp), %ebx
+ leave
+foo: ret
+ .data
+ .long _start
+ .section "__libc_subfreeres", "aw", @progbits
+ .long _start
+ .section "__libc_atexit", "aw", @progbits
+ .long _start