summaryrefslogtreecommitdiff
path: root/elfutils/tests/asm-tst8.c
diff options
context:
space:
mode:
Diffstat (limited to 'elfutils/tests/asm-tst8.c')
-rw-r--r--elfutils/tests/asm-tst8.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/elfutils/tests/asm-tst8.c b/elfutils/tests/asm-tst8.c
index 6ce7c9c0..cfe53fca 100644
--- a/elfutils/tests/asm-tst8.c
+++ b/elfutils/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 <drepper@redhat.com>, 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;
}