summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorUlrich Drepper <[email protected]>2005-08-03 02:05:39 +0000
committerUlrich Drepper <[email protected]>2005-08-03 02:05:39 +0000
commita38998e815ccde5d90ff0800c31da255eb3430d3 (patch)
treee5f035b73eeaf4033f159351ecad375f63d3a0aa /tests
parentef9c9c8fca98a8f9b6aa7c3604ba47e74094e181 (diff)
Add some patches from the disasm-branch branch.
The asm_begin interface changed. In text mode output is really written to the file.
Diffstat (limited to 'tests')
-rw-r--r--tests/ChangeLog12
-rw-r--r--tests/Makefile.am18
-rw-r--r--tests/asm-tst1.c13
-rw-r--r--tests/asm-tst2.c13
-rw-r--r--tests/asm-tst3.c13
-rw-r--r--tests/asm-tst4.c13
-rw-r--r--tests/asm-tst5.c13
-rw-r--r--tests/asm-tst6.c13
-rw-r--r--tests/asm-tst7.c13
-rw-r--r--tests/asm-tst8.c13
-rw-r--r--tests/asm-tst9.c13
11 files changed, 120 insertions, 27 deletions
diff --git a/tests/ChangeLog b/tests/ChangeLog
index 22aee322..d5926489 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,5 +1,17 @@
2005-08-02 Ulrich Drepper <[email protected]>
+ * Makefile.am: Add -ldl to asm_tst[1-9]_LDASS.
+ * asm-tst1.c: Adjust for new asm_begin interface. Open backend
+ library first.
+ * asm-tst2.c: Likewise.
+ * asm-tst3.c: Likewise.
+ * asm-tst4.c: Likewise.
+ * asm-tst5.c: Likewise.
+ * asm-tst6.c: Likewise.
+ * asm-tst7.c: Likewise.
+ * asm-tst8.c: Likewise.
+ * asm-tst9.c: Likewise.
+
* msg_tst.c: Add new error message.
2005-07-28 Ulrich Drepper <[email protected]>
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 5560d6ee..07b87e0e 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -101,15 +101,15 @@ allfcts_LDADD = $(libdw) $(libelf) $(libmudflap)
line2addr_no_Wformat = yes
line2addr_LDADD = $(libdw) $(libelf) $(libmudflap)
#show_ciefde_LDADD = ../libdwarf/libdwarf.so $(libelf) $(libmudflap)
-asm_tst1_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap)
-asm_tst2_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap)
-asm_tst3_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap)
-asm_tst4_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap)
-asm_tst5_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap)
-asm_tst6_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap)
-asm_tst7_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap)
-asm_tst8_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap)
-asm_tst9_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap)
+asm_tst1_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl
+asm_tst2_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl
+asm_tst3_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl
+asm_tst4_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl
+asm_tst5_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl
+asm_tst6_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl
+asm_tst7_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl
+asm_tst8_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl
+asm_tst9_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl
dwflmodtest_LDADD = $(libdw) $(libebl) $(libelf) $(libmudflap)
CLEANFILES = xxx
diff --git a/tests/asm-tst1.c b/tests/asm-tst1.c
index b76930d0..cfaae345 100644
--- a/tests/asm-tst1.c
+++ b/tests/asm-tst1.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002 Red Hat, Inc.
+/* Copyright (C) 2002, 2005 Red Hat, Inc.
Written by Ulrich Drepper <[email protected]>, 2002.
This program is Open Source software; you can redistribute it and/or
@@ -66,7 +66,14 @@ main (void)
elf_version (EV_CURRENT);
- ctx = asm_begin (fname, false, EM_386, ELFCLASS32, ELFDATA2LSB);
+ Ebl *ebl = ebl_openbackend_machine (EM_386);
+ if (ebl == NULL)
+ {
+ puts ("cannot open backend library");
+ return 1;
+ }
+
+ ctx = asm_begin (fname, ebl, false);
if (ctx == NULL)
{
printf ("cannot create assembler context: %s\n", asm_errmsg (-1));
@@ -235,5 +242,7 @@ main (void)
/* We don't need the file anymore. */
unlink (fname);
+ ebl_closebackend (ebl);
+
return result;
}
diff --git a/tests/asm-tst2.c b/tests/asm-tst2.c
index a309976d..b9a1037f 100644
--- a/tests/asm-tst2.c
+++ b/tests/asm-tst2.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002 Red Hat, Inc.
+/* Copyright (C) 2002, 2005 Red Hat, Inc.
Written by Ulrich Drepper <[email protected]>, 2002.
This program is Open Source software; you can redistribute it and/or
@@ -65,7 +65,14 @@ main (void)
elf_version (EV_CURRENT);
- ctx = asm_begin (fname, false, EM_386, ELFCLASS32, ELFDATA2LSB);
+ Ebl *ebl = ebl_openbackend_machine (EM_386);
+ if (ebl == NULL)
+ {
+ puts ("cannot open backend library");
+ return 1;
+ }
+
+ ctx = asm_begin (fname, ebl, false);
if (ctx == NULL)
{
printf ("cannot create assembler context: %s\n", asm_errmsg (-1));
@@ -257,5 +264,7 @@ main (void)
/* We don't need the file anymore. */
unlink (fname);
+ ebl_closebackend (ebl);
+
return result;
}
diff --git a/tests/asm-tst3.c b/tests/asm-tst3.c
index fb79ea78..155613c5 100644
--- a/tests/asm-tst3.c
+++ b/tests/asm-tst3.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002 Red Hat, Inc.
+/* Copyright (C) 2002, 2005 Red Hat, Inc.
Written by Ulrich Drepper <[email protected]>, 2002.
This program is Open Source software; you can redistribute it and/or
@@ -57,7 +57,14 @@ main (void)
elf_version (EV_CURRENT);
- ctx = asm_begin (fname, false, EM_386, ELFCLASS32, ELFDATA2LSB);
+ Ebl *ebl = ebl_openbackend_machine (EM_386);
+ if (ebl == NULL)
+ {
+ puts ("cannot open backend library");
+ return 1;
+ }
+
+ ctx = asm_begin (fname, ebl, false);
if (ctx == NULL)
{
printf ("cannot create assembler context: %s\n", asm_errmsg (-1));
@@ -318,5 +325,7 @@ main (void)
/* We don't need the file anymore. */
unlink (fname);
+ ebl_closebackend (ebl);
+
return result;
}
diff --git a/tests/asm-tst4.c b/tests/asm-tst4.c
index 29d6485d..50c3c5a5 100644
--- a/tests/asm-tst4.c
+++ b/tests/asm-tst4.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2004 Red Hat, Inc.
+/* Copyright (C) 2002, 2004, 2005 Red Hat, Inc.
Written by Ulrich Drepper <[email protected]>, 2002.
This program is Open Source software; you can redistribute it and/or
@@ -33,7 +33,14 @@ main (void)
elf_version (EV_CURRENT);
- ctx = asm_begin (fname, false, EM_386, ELFCLASS32, ELFDATA2LSB);
+ Ebl *ebl = ebl_openbackend_machine (EM_386);
+ if (ebl == NULL)
+ {
+ puts ("cannot open backend library");
+ return 1;
+ }
+
+ ctx = asm_begin (fname, ebl, false);
if (ctx == NULL)
{
printf ("cannot create assembler context: %s\n", asm_errmsg (-1));
@@ -84,5 +91,7 @@ env LD_LIBRARY_PATH=../libelf ../src/elflint -q asm-tst4-out.o"));
/* We don't need the file anymore. */
unlink (fname);
+ ebl_closebackend (ebl);
+
return result;
}
diff --git a/tests/asm-tst5.c b/tests/asm-tst5.c
index 4f761aed..e5881a53 100644
--- a/tests/asm-tst5.c
+++ b/tests/asm-tst5.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2004 Red Hat, Inc.
+/* Copyright (C) 2002, 2004, 2005 Red Hat, Inc.
Written by Ulrich Drepper <[email protected]>, 2002.
This program is Open Source software; you can redistribute it and/or
@@ -35,7 +35,14 @@ main (void)
elf_version (EV_CURRENT);
- ctx = asm_begin (fname, false, EM_386, ELFCLASS32, ELFDATA2LSB);
+ Ebl *ebl = ebl_openbackend_machine (EM_386);
+ if (ebl == NULL)
+ {
+ puts ("cannot open backend library");
+ return 1;
+ }
+
+ ctx = asm_begin (fname, ebl, false);
if (ctx == NULL)
{
printf ("cannot create assembler context: %s\n", asm_errmsg (-1));
@@ -96,5 +103,7 @@ env LD_LIBRARY_PATH=../libelf ../src/elflint -q asm-tst5-out.o"));
/* We don't need the file anymore. */
unlink (fname);
+ ebl_closebackend (ebl);
+
return result;
}
diff --git a/tests/asm-tst6.c b/tests/asm-tst6.c
index ece69bc2..5ceded65 100644
--- a/tests/asm-tst6.c
+++ b/tests/asm-tst6.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2004 Red Hat, Inc.
+/* Copyright (C) 2002, 2004, 2005 Red Hat, Inc.
Written by Ulrich Drepper <[email protected]>, 2002.
This program is Open Source software; you can redistribute it and/or
@@ -33,7 +33,14 @@ main (void)
elf_version (EV_CURRENT);
- ctx = asm_begin (fname, false, EM_386, ELFCLASS32, ELFDATA2LSB);
+ Ebl *ebl = ebl_openbackend_machine (EM_386);
+ if (ebl == NULL)
+ {
+ puts ("cannot open backend library");
+ return 1;
+ }
+
+ ctx = asm_begin (fname, ebl, false);
if (ctx == NULL)
{
printf ("cannot create assembler context: %s\n", asm_errmsg (-1));
@@ -130,5 +137,7 @@ env LD_LIBRARY_PATH=../libelf ../src/elflint -q asm-tst6-out.o"));
/* We don't need the file anymore. */
unlink (fname);
+ ebl_closebackend (ebl);
+
return result;
}
diff --git a/tests/asm-tst7.c b/tests/asm-tst7.c
index ebd45594..5c94d895 100644
--- a/tests/asm-tst7.c
+++ b/tests/asm-tst7.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002 Red Hat, Inc.
+/* Copyright (C) 2002, 2005 Red Hat, Inc.
Written by Ulrich Drepper <[email protected]>, 2002.
This program is Open Source software; you can redistribute it and/or
@@ -33,7 +33,14 @@ main (void)
elf_version (EV_CURRENT);
- ctx = asm_begin (fname, false, EM_386, ELFCLASS32, ELFDATA2LSB);
+ Ebl *ebl = ebl_openbackend_machine (EM_386);
+ if (ebl == NULL)
+ {
+ puts ("cannot open backend library");
+ return 1;
+ }
+
+ ctx = asm_begin (fname, ebl, false);
if (ctx == NULL)
{
printf ("cannot create assembler context: %s\n", asm_errmsg (-1));
@@ -160,5 +167,7 @@ main (void)
/* We don't need the file anymore. */
unlink (fname);
+ ebl_closebackend (ebl);
+
return result;
}
diff --git a/tests/asm-tst8.c b/tests/asm-tst8.c
index 6ce7c9c0..cfe53fca 100644
--- a/tests/asm-tst8.c
+++ b/tests/asm-tst8.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002 Red Hat, Inc.
+/* Copyright (C) 2002, 2005 Red Hat, Inc.
Written by Ulrich Drepper <[email protected]>, 2002.
This program is Open Source software; you can redistribute it and/or
@@ -33,7 +33,14 @@ main (void)
elf_version (EV_CURRENT);
- ctx = asm_begin (fname, false, EM_386, ELFCLASS32, ELFDATA2LSB);
+ Ebl *ebl = ebl_openbackend_machine (EM_386);
+ if (ebl == NULL)
+ {
+ puts ("cannot open backend library");
+ return 1;
+ }
+
+ ctx = asm_begin (fname, ebl, false);
if (ctx == NULL)
{
printf ("cannot create assembler context: %s\n", asm_errmsg (-1));
@@ -168,5 +175,7 @@ main (void)
/* We don't need the file anymore. */
unlink (fname);
+ ebl_closebackend (ebl);
+
return result;
}
diff --git a/tests/asm-tst9.c b/tests/asm-tst9.c
index 28bb4787..1f03d8d7 100644
--- a/tests/asm-tst9.c
+++ b/tests/asm-tst9.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002 Red Hat, Inc.
+/* Copyright (C) 2002, 2005 Red Hat, Inc.
Written by Ulrich Drepper <[email protected]>, 2002.
This program is Open Source software; you can redistribute it and/or
@@ -85,7 +85,14 @@ main (void)
elf_version (EV_CURRENT);
- ctx = asm_begin (fname, false, EM_386, ELFCLASS32, ELFDATA2LSB);
+ Ebl *ebl = ebl_openbackend_machine (EM_386);
+ if (ebl == NULL)
+ {
+ puts ("cannot open backend library");
+ return 1;
+ }
+
+ ctx = asm_begin (fname, ebl, false);
if (ctx == NULL)
{
printf ("cannot create assembler context: %s\n", asm_errmsg (-1));
@@ -314,5 +321,7 @@ main (void)
/* We don't need the file anymore. */
unlink (fname);
+ ebl_closebackend (ebl);
+
return result;
}