summaryrefslogtreecommitdiffstats
path: root/tests/asm-tst4.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2005-08-03 02:05:39 +0000
committerUlrich Drepper <drepper@redhat.com>2005-08-03 02:05:39 +0000
commita38998e815ccde5d90ff0800c31da255eb3430d3 (patch)
treee5f035b73eeaf4033f159351ecad375f63d3a0aa /tests/asm-tst4.c
parentef9c9c8fca98a8f9b6aa7c3604ba47e74094e181 (diff)
downloadandroid_external_elfutils-a38998e815ccde5d90ff0800c31da255eb3430d3.tar.gz
android_external_elfutils-a38998e815ccde5d90ff0800c31da255eb3430d3.tar.bz2
android_external_elfutils-a38998e815ccde5d90ff0800c31da255eb3430d3.zip
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/asm-tst4.c')
-rw-r--r--tests/asm-tst4.c13
1 files changed, 11 insertions, 2 deletions
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 <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));
@@ -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;
}