diff options
author | Ulrich Drepper <drepper@redhat.com> | 2005-08-03 02:05:39 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2005-08-03 02:05:39 +0000 |
commit | a38998e815ccde5d90ff0800c31da255eb3430d3 (patch) | |
tree | e5f035b73eeaf4033f159351ecad375f63d3a0aa /tests/asm-tst3.c | |
parent | ef9c9c8fca98a8f9b6aa7c3604ba47e74094e181 (diff) | |
download | elfutils-a38998e815ccde5d90ff0800c31da255eb3430d3.tar.gz |
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-tst3.c')
-rw-r--r-- | tests/asm-tst3.c | 13 |
1 files changed, 11 insertions, 2 deletions
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 <drepper@redhat.com>, 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; } |