From 3adada2a00a0dde156aef9cd5050cb148cefbf45 Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Mon, 21 Oct 2002 05:01:30 +0000 Subject: [PATCH] Don't treat xfree as a real function (taking its address), as this doesn't work if dmalloc is enabled. svn path=/trunk/yasm/; revision=770 --- modules/objfmts/bin/bin-objfmt.c | 8 +++++++- src/objfmts/bin/bin-objfmt.c | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/modules/objfmts/bin/bin-objfmt.c b/modules/objfmts/bin/bin-objfmt.c index 14120d4a..796be6aa 100644 --- a/modules/objfmts/bin/bin-objfmt.c +++ b/modules/objfmts/bin/bin-objfmt.c @@ -393,6 +393,12 @@ bin_objfmt_sections_switch(sectionhead *headp, valparamhead *valparams, return NULL; } +static void +bin_objfmt_section_data_delete(/*@only@*/ void *d) +{ + xfree(d); +} + static void bin_objfmt_common_declare(/*@unused@*/ symrec *sym, /*@only@*/ expr *size, /*@unused@*/ /*@null@*/ @@ -454,7 +460,7 @@ objfmt yasm_bin_LTX_objfmt = { bin_objfmt_output, bin_objfmt_cleanup, bin_objfmt_sections_switch, - xfree, + bin_objfmt_section_data_delete, bin_objfmt_section_data_print, NULL /*bin_objfmt_extern_declare*/, NULL /*bin_objfmt_global_declare*/, diff --git a/src/objfmts/bin/bin-objfmt.c b/src/objfmts/bin/bin-objfmt.c index 14120d4a..796be6aa 100644 --- a/src/objfmts/bin/bin-objfmt.c +++ b/src/objfmts/bin/bin-objfmt.c @@ -393,6 +393,12 @@ bin_objfmt_sections_switch(sectionhead *headp, valparamhead *valparams, return NULL; } +static void +bin_objfmt_section_data_delete(/*@only@*/ void *d) +{ + xfree(d); +} + static void bin_objfmt_common_declare(/*@unused@*/ symrec *sym, /*@only@*/ expr *size, /*@unused@*/ /*@null@*/ @@ -454,7 +460,7 @@ objfmt yasm_bin_LTX_objfmt = { bin_objfmt_output, bin_objfmt_cleanup, bin_objfmt_sections_switch, - xfree, + bin_objfmt_section_data_delete, bin_objfmt_section_data_print, NULL /*bin_objfmt_extern_declare*/, NULL /*bin_objfmt_global_declare*/,