mirror of https://github.com/google/oss-fuzz.git
Fix binutils fuzzer build breakage (#9754)
This commit is contained in:
parent
d94d0609a5
commit
c60716c298
|
@ -31,31 +31,16 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
|
|||
reg_section = NULL;
|
||||
|
||||
const char *fakeArgv[3];
|
||||
int fakeArgc = 3;
|
||||
fakeArgv[0] = "fuzz_as";
|
||||
fakeArgv[1] = filename; // Assemble our fake source file.
|
||||
fakeArgv[2] = NULL;
|
||||
|
||||
gas_early_init (&fakeArgc, &fakeArgv);
|
||||
|
||||
out_file_name = "/tmp/tmp-out";
|
||||
|
||||
// as initialition. This follows the flow of ordinary main function
|
||||
hex_init ();
|
||||
if (bfd_init () != BFD_INIT_MAGIC)
|
||||
abort ();
|
||||
obstack_begin (¬es, chunksize);
|
||||
symbol_begin ();
|
||||
frag_init ();
|
||||
subsegs_begin ();
|
||||
read_begin ();
|
||||
input_scrub_begin ();
|
||||
expr_begin ();
|
||||
macro_init (flag_macro_alternate, flag_mri, 0, macro_expr);
|
||||
|
||||
output_file_create (out_file_name);
|
||||
dot_symbol_init ();
|
||||
itbl_init ();
|
||||
dwarf2_init ();
|
||||
local_symbol_make (".gasversion.", absolute_section,
|
||||
&predefined_address_frag, BFD_VERSION / 10000UL);
|
||||
gas_init ();
|
||||
|
||||
// Main fuzzer target. Assemble our random data.
|
||||
perform_an_assembly_pass (2, (char**)fakeArgv);
|
||||
|
|
|
@ -17,7 +17,6 @@ limitations under the License.
|
|||
#include "sysdep.h"
|
||||
#include "bfd.h"
|
||||
#include "libiberty.h"
|
||||
#include "progress.h"
|
||||
#include "getopt.h"
|
||||
#include "aout/ar.h"
|
||||
#include "bucomm.h"
|
||||
|
|
Loading…
Reference in New Issue