[ELF][Hexagon][test] check .got.plt order
authorShankar Easwaran <shankare@codeaurora.org>
Wed, 20 Mar 2013 23:39:43 +0000 (23:39 +0000)
committerShankar Easwaran <shankare@codeaurora.org>
Wed, 20 Mar 2013 23:39:43 +0000 (23:39 +0000)
llvm-svn: 177604

lld/test/elf/Hexagon/Inputs/got-plt-order.c [new file with mode: 0644]
lld/test/elf/Hexagon/Inputs/got-plt-order.o [new file with mode: 0644]
lld/test/elf/Hexagon/hexagon-got-plt-order.test [new file with mode: 0644]

diff --git a/lld/test/elf/Hexagon/Inputs/got-plt-order.c b/lld/test/elf/Hexagon/Inputs/got-plt-order.c
new file mode 100644 (file)
index 0000000..621f670
--- /dev/null
@@ -0,0 +1,6 @@
+int c = 10;
+int fn() { c = 20; return 0; }
+
+int fn1() {
+  return fn();
+}
diff --git a/lld/test/elf/Hexagon/Inputs/got-plt-order.o b/lld/test/elf/Hexagon/Inputs/got-plt-order.o
new file mode 100644 (file)
index 0000000..e97678b
Binary files /dev/null and b/lld/test/elf/Hexagon/Inputs/got-plt-order.o differ
diff --git a/lld/test/elf/Hexagon/hexagon-got-plt-order.test b/lld/test/elf/Hexagon/hexagon-got-plt-order.test
new file mode 100644 (file)
index 0000000..366d67a
--- /dev/null
@@ -0,0 +1,6 @@
+RUN: lld -core -target hexagon %p/Inputs/got-plt-order.o \
+RUN: -output=%t -noinhibit-exec -output-type=shared
+RUN: llvm-objdump -section-headers %t | FileCheck %s
+
+CHECK: .got
+CHECK-NEXT: .got.plt