From: Peter Johnson Date: Sat, 14 Jul 2007 04:34:41 +0000 (-0000) Subject: Merge bc-int.h into bytecode.h, removing YASM_BC_INTERNAL in the process. X-Git-Tag: v0.6.2~8^2~18 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a958ef6df8d9b4140e1e8445e34a7773dcf6b14b;p=yasm Merge bc-int.h into bytecode.h, removing YASM_BC_INTERNAL in the process. svn path=/trunk/yasm/; revision=1894 --- diff --git a/libyasm.h b/libyasm.h index 91596b7f..bd38c646 100644 --- a/libyasm.h +++ b/libyasm.h @@ -32,8 +32,6 @@ * \endlicense * * Additional parts may be included via: - * - YASM_BC_INTERNAL: reveal bytecode internal structures via bc-int.h - * inclusion * - YASM_EXPR_INTERNAL: reveal expr internal structures via expr-int.h * inclusion */ @@ -79,9 +77,6 @@ typedef unsigned long uintptr_t; #include #include -#ifdef YASM_BC_INTERNAL -#include -#endif #ifdef YASM_EXPR_INTERNAL #include #endif diff --git a/libyasm/Makefile.inc b/libyasm/Makefile.inc index 98dbfa68..ee84ac48 100644 --- a/libyasm/Makefile.inc +++ b/libyasm/Makefile.inc @@ -52,7 +52,6 @@ modincludedir = $(includedir)/libyasm modinclude_HEADERS = libyasm/arch.h modinclude_HEADERS += libyasm/assocdat.h -modinclude_HEADERS += libyasm/bc-int.h modinclude_HEADERS += libyasm/bitvect.h modinclude_HEADERS += libyasm/bytecode.h modinclude_HEADERS += libyasm/compat-queue.h diff --git a/libyasm/bc-align.c b/libyasm/bc-align.c index 52474e71..e4e6b648 100644 --- a/libyasm/bc-align.c +++ b/libyasm/bc-align.c @@ -36,8 +36,6 @@ #include "bytecode.h" -#include "bc-int.h" - typedef struct bytecode_align { /*@only@*/ yasm_expr *boundary; /* alignment boundary */ diff --git a/libyasm/bc-data.c b/libyasm/bc-data.c index cb7dc310..8560da31 100644 --- a/libyasm/bc-data.c +++ b/libyasm/bc-data.c @@ -38,8 +38,6 @@ #include "bytecode.h" #include "arch.h" -#include "bc-int.h" - struct yasm_dataval { /*@reldef@*/ STAILQ_ENTRY(yasm_dataval) link; diff --git a/libyasm/bc-incbin.c b/libyasm/bc-incbin.c index 13703105..55634468 100644 --- a/libyasm/bc-incbin.c +++ b/libyasm/bc-incbin.c @@ -41,8 +41,6 @@ #include "file.h" -#include "bc-int.h" - typedef struct bytecode_incbin { /*@only@*/ char *filename; /* file to include data from */ diff --git a/libyasm/bc-int.h b/libyasm/bc-int.h deleted file mode 100644 index d941ad6a..00000000 --- a/libyasm/bc-int.h +++ /dev/null @@ -1,128 +0,0 @@ -/* $Id$ - * Bytecode internal structures header file - * - * Copyright (C) 2001-2007 Peter Johnson - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND OTHER CONTRIBUTORS ``AS IS'' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR OTHER CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ -#ifndef YASM_BC_INT_H -#define YASM_BC_INT_H - -typedef struct yasm_bytecode_callback { - void (*destroy) (/*@only@*/ void *contents); - void (*print) (const void *contents, FILE *f, int indent_level); - void (*finalize) (yasm_bytecode *bc, yasm_bytecode *prev_bc); - int (*calc_len) (yasm_bytecode *bc, yasm_bc_add_span_func add_span, - void *add_span_data); - int (*expand) (yasm_bytecode *bc, int span, long old_val, long new_val, - /*@out@*/ long *neg_thres, /*@out@*/ long *pos_thres); - int (*tobytes) (yasm_bytecode *bc, unsigned char **bufp, void *d, - yasm_output_value_func output_value, - /*@null@*/ yasm_output_reloc_func output_reloc); - enum yasm_bytecode_special_type { - YASM_BC_SPECIAL_NONE = 0, - YASM_BC_SPECIAL_RESERVE,/* Reserves space instead of outputting data */ - YASM_BC_SPECIAL_OFFSET, /* Adjusts offset instead of calculating len */ - YASM_BC_SPECIAL_INSN /* Instruction bytecode */ - } special; -} yasm_bytecode_callback; - -struct yasm_bytecode { - /*@reldef@*/ STAILQ_ENTRY(yasm_bytecode) link; - - /*@null@*/ const yasm_bytecode_callback *callback; - - /* Pointer to section containing bytecode; NULL if not part of a section. */ - /*@dependent@*/ /*@null@*/ yasm_section *section; - - /* number of times bytecode is repeated, NULL=1. */ - /*@only@*/ /*@null@*/ yasm_expr *multiple; - - unsigned long len; /* total length of entire bytecode - (not including multiple copies) */ - long mult_int; /* number of copies: integer version */ - - /* where it came from */ - unsigned long line; - - /* other assembler state info */ - unsigned long offset; /* ~0UL if unknown */ - unsigned long bc_index; - - /* NULL-terminated array of labels that point to this bytecode (as the - * bytecode previous to the label). NULL if no labels point here. */ - /*@null@*/ yasm_symrec **symrecs; - - /* bytecode-type-specific data (type identified by callback) */ - void *contents; -}; - -/** Create a bytecode of any specified type. - * \param callback bytecode callback functions, if NULL, creates empty - * bytecode (may not be resolved or output) - * \param contents type-specific data - * \param line virtual line (from yasm_linemap) - * \return Newly allocated bytecode of the specified type. - */ -/*@only@*/ yasm_bytecode *yasm_bc_create_common - (/*@null@*/ const yasm_bytecode_callback *callback, - /*@only@*/ /*@null@*/ void *contents, unsigned long line); - -/** Transform a bytecode of any type into a different type. - * \param bc bytecode to transform - * \param callback new bytecode callback function - * \param contents new type-specific data - */ -void yasm_bc_transform(yasm_bytecode *bc, - const yasm_bytecode_callback *callback, - void *contents); - -/** Common bytecode callback finalize function, for where no finalization - * is ever required for this type of bytecode. - */ -void yasm_bc_finalize_common(yasm_bytecode *bc, yasm_bytecode *prev_bc); - -/** Common bytecode callback calc_len function, for where the bytecode has - * no calculatable length. Causes an internal error if called. - */ -int yasm_bc_calc_len_common(yasm_bytecode *bc, yasm_bc_add_span_func add_span, - void *add_span_data); - -/** Common bytecode callback expand function, for where the bytecode is - * always short (calc_len never calls add_span). Causes an internal - * error if called. - */ -int yasm_bc_expand_common - (yasm_bytecode *bc, int span, long old_val, long new_val, - /*@out@*/ long *neg_thres, /*@out@*/ long *pos_thres); - -/** Common bytecode callback tobytes function, for where the bytecode - * cannot be converted to bytes. Causes an internal error if called. - */ -int yasm_bc_tobytes_common - (yasm_bytecode *bc, unsigned char **bufp, void *d, - yasm_output_value_func output_value, - /*@null@*/ yasm_output_reloc_func output_reloc); - -#define yasm_bc__next(x) STAILQ_NEXT(x, link) - -#endif diff --git a/libyasm/bc-org.c b/libyasm/bc-org.c index da1f743d..e354f23e 100644 --- a/libyasm/bc-org.c +++ b/libyasm/bc-org.c @@ -38,8 +38,6 @@ #include "bytecode.h" -#include "bc-int.h" - typedef struct bytecode_org { unsigned long start; /* target starting offset within section */ diff --git a/libyasm/bc-reserve.c b/libyasm/bc-reserve.c index 66224dcf..1bc0c888 100644 --- a/libyasm/bc-reserve.c +++ b/libyasm/bc-reserve.c @@ -37,7 +37,6 @@ #include "bytecode.h" -#include "bc-int.h" #include "expr-int.h" diff --git a/libyasm/bytecode.c b/libyasm/bytecode.c index e8ea9872..3828795c 100644 --- a/libyasm/bytecode.c +++ b/libyasm/bytecode.c @@ -38,7 +38,6 @@ #include "bytecode.h" -#include "bc-int.h" #include "expr-int.h" diff --git a/libyasm/bytecode.h b/libyasm/bytecode.h index 8fa273bd..0cf1888a 100644 --- a/libyasm/bytecode.h +++ b/libyasm/bytecode.h @@ -41,6 +41,231 @@ typedef struct yasm_datavalhead yasm_datavalhead; /*@reldef@*/ STAILQ_HEAD(yasm_datavalhead, yasm_dataval); +/** Add a dependent span for a bytecode. + * \param add_span_data add_span_data passed into bc_calc_len() + * \param bc bytecode containing span + * \param id non-zero identifier for span; may be any non-zero value + * if <0, expand is called for any change; + * if >0, expand is only called when exceeds threshold + * \param value dependent value for bytecode expansion + * \param neg_thres negative threshold for long/short decision + * \param pos_thres positive threshold for long/short decision + */ +typedef void (*yasm_bc_add_span_func) + (void *add_span_data, yasm_bytecode *bc, int id, const yasm_value *value, + long neg_thres, long pos_thres); + +/** Bytecode callback structure. Any implementation of a specific bytecode + * must implement these functions and this callback structure. The bytecode + * implementation-specific data is stored in #yasm_bytecode.contents. + */ +typedef struct yasm_bytecode_callback { + /** Destroys the implementation-specific data. + * Called from yasm_bc_destroy(). + * \param contents #yasm_bytecode.contents + */ + void (*destroy) (/*@only@*/ void *contents); + + /** Prints the implementation-specific data (for debugging purposes). + * Called from yasm_bc_print(). + * \param contents #yasm_bytecode.contents + * \param f file + * \param indent_level indentation level + */ + void (*print) (const void *contents, FILE *f, int indent_level); + + /** Finalizes the bytecode after parsing. Called from yasm_bc_finalize(). + * A generic fill-in for this is yasm_bc_finalize_common(). + * \param bc bytecode + * \param prev_bc bytecode directly preceding bc + */ + void (*finalize) (yasm_bytecode *bc, yasm_bytecode *prev_bc); + + /** Calculates the minimum size of a bytecode. + * Called from yasm_bc_calc_len(). + * A generic fill-in for this is yasm_bc_calc_len_common(), but as this + * function internal errors when called, be very careful when using it! + * This function should simply add to bc->len and not set it directly + * (it's initialized by yasm_bc_calc_len() prior to passing control to + * this function). + * + * \param bc bytecode + * \param add_span function to call to add a span + * \param add_span_data extra data to be passed to add_span function + * \return 0 if no error occurred, nonzero if there was an error + * recognized (and output) during execution. + * \note May store to bytecode updated expressions. + */ + int (*calc_len) (yasm_bytecode *bc, yasm_bc_add_span_func add_span, + void *add_span_data); + + /** Recalculates the bytecode's length based on an expanded span length. + * Called from yasm_bc_expand(). + * A generic fill-in for this is yasm_bc_expand_common(), but as this + * function internal errors when called, if used, ensure that calc_len() + * never adds a span. + * This function should simply add to bc->len to increase the length by + * a delta amount. + * \param bc bytecode + * \param span span ID (as given to add_span in calc_len) + * \param old_val previous span value + * \param new_val new span value + * \param neg_thres negative threshold for long/short decision + * (returned) + * \param pos_thres positive threshold for long/short decision + * (returned) + * \return 0 if bc no longer dependent on this span's length, negative if + * there was an error recognized (and output) during execution, + * and positive if bc size may increase for this span further + * based on the new negative and positive thresholds returned. + * \note May store to bytecode updated expressions. + */ + int (*expand) (yasm_bytecode *bc, int span, long old_val, long new_val, + /*@out@*/ long *neg_thres, /*@out@*/ long *pos_thres); + + /** Convert a bytecode into its byte representation. + * Called from yasm_bc_tobytes(). + * A generic fill-in for this is yasm_bc_tobytes_common(), but as this + * function internal errors when called, be very careful when using it! + * \param bc bytecode + * \param buf byte representation destination buffer + * \param bufsize size of buf (in bytes) prior to call; size of the + * generated data after call + * \param gap if nonzero, indicates the data does not really + * need to exist in the object file; if nonzero, + * contents of buf are undefined [output] + * \param d data to pass to each call to + * output_value/output_reloc + * \param output_value function to call to convert values into their byte + * representation + * \param output_reloc function to call to output relocation entries + * for a single sym + * \return Newly allocated buffer that should be used instead of buf for + * reading the byte representation, or NULL if buf was big enough + * to hold the entire byte representation. + * \note May result in non-reversible changes to the bytecode, but it's + * preferable if calling this function twice would result in the + * same output. + */ + int (*tobytes) (yasm_bytecode *bc, unsigned char **bufp, void *d, + yasm_output_value_func output_value, + /*@null@*/ yasm_output_reloc_func output_reloc); + + /** Special bytecode classifications. Most bytecode types should use + * #YASM_BC_SPECIAL_NONE. Others cause special handling to kick in + * in various parts of yasm. + */ + enum yasm_bytecode_special_type { + YASM_BC_SPECIAL_NONE = 0, + + /** Bytecode reserves space instead of outputting data. */ + YASM_BC_SPECIAL_RESERVE, + + /** Adjusts offset instead of calculating len. */ + YASM_BC_SPECIAL_OFFSET, + + /** Instruction bytecode. */ + YASM_BC_SPECIAL_INSN + } special; +} yasm_bytecode_callback; + +/** A bytecode. */ +struct yasm_bytecode { + /** Bytecodes are stored as a singly linked list, with tail insertion. + * \see section.h (#yasm_section). + */ + /*@reldef@*/ STAILQ_ENTRY(yasm_bytecode) link; + + /** The bytecode callback structure for this bytecode. May be NULL + * during partial initialization. + */ + /*@null@*/ const yasm_bytecode_callback *callback; + + /** Pointer to section containing bytecode; NULL if not part of a + * section. + */ + /*@dependent@*/ /*@null@*/ yasm_section *section; + + /** Number of times bytecode is repeated. + * NULL=1 (to save space in the common case). + */ + /*@only@*/ /*@null@*/ yasm_expr *multiple; + + /** Total length of entire bytecode (not including multiple copies). */ + unsigned long len; + + /** Number of copies, integer version. */ + long mult_int; + + /** Line number where bytecode was defined. */ + unsigned long line; + + /** Offset of bytecode from beginning of its section. + * 0-based, ~0UL (e.g. all 1 bits) if unknown. + */ + unsigned long offset; + + /** Unique integer index of bytecode. Used during optimization. */ + unsigned long bc_index; + + /** NULL-terminated array of labels that point to this bytecode (as the + * bytecode previous to the label). NULL if no labels point here. + */ + /*@null@*/ yasm_symrec **symrecs; + + /** Implementation-specific data (type identified by callback). */ + void *contents; +}; + +/** Create a bytecode of any specified type. + * \param callback bytecode callback functions, if NULL, creates empty + * bytecode (may not be resolved or output) + * \param contents type-specific data + * \param line virtual line (from yasm_linemap) + * \return Newly allocated bytecode of the specified type. + */ +/*@only@*/ yasm_bytecode *yasm_bc_create_common + (/*@null@*/ const yasm_bytecode_callback *callback, + /*@only@*/ /*@null@*/ void *contents, unsigned long line); + +/** Transform a bytecode of any type into a different type. + * \param bc bytecode to transform + * \param callback new bytecode callback function + * \param contents new type-specific data + */ +void yasm_bc_transform(yasm_bytecode *bc, + const yasm_bytecode_callback *callback, + void *contents); + +/** Common bytecode callback finalize function, for where no finalization + * is ever required for this type of bytecode. + */ +void yasm_bc_finalize_common(yasm_bytecode *bc, yasm_bytecode *prev_bc); + +/** Common bytecode callback calc_len function, for where the bytecode has + * no calculatable length. Causes an internal error if called. + */ +int yasm_bc_calc_len_common(yasm_bytecode *bc, yasm_bc_add_span_func add_span, + void *add_span_data); + +/** Common bytecode callback expand function, for where the bytecode is + * always short (calc_len never calls add_span). Causes an internal + * error if called. + */ +int yasm_bc_expand_common + (yasm_bytecode *bc, int span, long old_val, long new_val, + /*@out@*/ long *neg_thres, /*@out@*/ long *pos_thres); + +/** Common bytecode callback tobytes function, for where the bytecode + * cannot be converted to bytes. Causes an internal error if called. + */ +int yasm_bc_tobytes_common + (yasm_bytecode *bc, unsigned char **bufp, void *d, + yasm_output_value_func output_value, + /*@null@*/ yasm_output_reloc_func output_reloc); + +#define yasm_bc__next(x) STAILQ_NEXT(x, link) + /** Set multiple field of a bytecode. * A bytecode can be repeated a number of times when output. This function * sets that multiple. @@ -184,20 +409,6 @@ void yasm_bc_finalize(yasm_bytecode *bc, yasm_bytecode *prev_bc); */ unsigned long yasm_bc_next_offset(yasm_bytecode *precbc); -/** Add a dependent span for a bytecode. - * \param add_span_data add_span_data passed into bc_calc_len() - * \param bc bytecode containing span - * \param id non-zero identifier for span; may be any non-zero value - * if <0, expand is called for any change; - * if >0, expand is only called when exceeds threshold - * \param value dependent value for bytecode expansion - * \param neg_thres negative threshold for long/short decision - * \param pos_thres positive threshold for long/short decision - */ -typedef void (*yasm_bc_add_span_func) - (void *add_span_data, yasm_bytecode *bc, int id, const yasm_value *value, - long neg_thres, long pos_thres); - /** Resolve EQUs in a bytecode and calculate its minimum size. * Generates dependent bytecode spans for cases where, if the length spanned * increases, it could cause the bytecode size to increase. @@ -220,7 +431,7 @@ int yasm_bc_calc_len(yasm_bytecode *bc, yasm_bc_add_span_func add_span, * \param old_val previous span value * \param new_val new span value * \param neg_thres negative threshold for long/short decision (returned) - * \param pos_thres postivie threshold for long/short decision (returned) + * \param pos_thres positive threshold for long/short decision (returned) * \return 0 if bc no longer dependent on this span's length, negative if * there was an error recognized (and output) during execution, and * positive if bc size may increase for this span further based on the diff --git a/libyasm/coretype.h b/libyasm/coretype.h index dd4eeec4..395a9c43 100644 --- a/libyasm/coretype.h +++ b/libyasm/coretype.h @@ -74,10 +74,7 @@ typedef struct yasm_assoc_data_callback { */ typedef struct yasm_errwarns yasm_errwarns; -/** Bytecode (opaque type). - * \see bytecode.h for related functions. - * Define YASM_BC_INTERNAL to get visible internals. - */ +/** Bytecode. \see bytecode.h for defails and related functions. */ typedef struct yasm_bytecode yasm_bytecode; /** Object. \see section.h for details and related functions. */ diff --git a/libyasm/insn.c b/libyasm/insn.c index 219a56c0..7127b410 100644 --- a/libyasm/insn.c +++ b/libyasm/insn.c @@ -38,8 +38,6 @@ #include "insn.h" #include "arch.h" -#include "bc-int.h" - void yasm_ea_set_segreg(yasm_effaddr *ea, uintptr_t segreg) diff --git a/libyasm/section.c b/libyasm/section.c index b5fc6aed..21ea56a9 100644 --- a/libyasm/section.c +++ b/libyasm/section.c @@ -50,7 +50,6 @@ #include "objfmt.h" #include "expr-int.h" -#include "bc-int.h" #include "inttree.h" diff --git a/libyasm/value.c b/libyasm/value.c index 0a5936c7..2fcabf49 100644 --- a/libyasm/value.c +++ b/libyasm/value.c @@ -44,7 +44,6 @@ #include "arch.h" #include "expr-int.h" -#include "bc-int.h" void yasm_value_initialize(/*@out@*/ yasm_value *value, diff --git a/modules/arch/lc3b/lc3bbc.c b/modules/arch/lc3b/lc3bbc.c index f864b328..e87aa8f5 100644 --- a/modules/arch/lc3b/lc3bbc.c +++ b/modules/arch/lc3b/lc3bbc.c @@ -27,7 +27,6 @@ #include /*@unused@*/ RCSID("$Id$"); -#define YASM_BC_INTERNAL #include #include "lc3barch.h" diff --git a/modules/arch/lc3b/lc3bid.re b/modules/arch/lc3b/lc3bid.re index 47c94644..bfdb4c0b 100644 --- a/modules/arch/lc3b/lc3bid.re +++ b/modules/arch/lc3b/lc3bid.re @@ -27,7 +27,6 @@ #include RCSID("$Id$"); -#define YASM_BC_INTERNAL #define YASM_EXPR_INTERNAL #include diff --git a/modules/arch/x86/x86bc.c b/modules/arch/x86/x86bc.c index cff6e583..5a73e5de 100644 --- a/modules/arch/x86/x86bc.c +++ b/modules/arch/x86/x86bc.c @@ -27,7 +27,6 @@ #include /*@unused@*/ RCSID("$Id$"); -#define YASM_BC_INTERNAL #define YASM_EXPR_INTERNAL #include diff --git a/modules/arch/x86/x86id.c b/modules/arch/x86/x86id.c index ce26da38..69e609a5 100644 --- a/modules/arch/x86/x86id.c +++ b/modules/arch/x86/x86id.c @@ -28,7 +28,6 @@ #include RCSID("$Id$"); -#define YASM_BC_INTERNAL #define YASM_EXPR_INTERNAL #include #include diff --git a/modules/dbgfmts/codeview/cv-dbgfmt.c b/modules/dbgfmts/codeview/cv-dbgfmt.c index 2cb23255..65ce493e 100644 --- a/modules/dbgfmts/codeview/cv-dbgfmt.c +++ b/modules/dbgfmts/codeview/cv-dbgfmt.c @@ -27,7 +27,6 @@ #include /*@unused@*/ RCSID("$Id$"); -#define YASM_BC_INTERNAL #include #include "cv-dbgfmt.h" diff --git a/modules/dbgfmts/codeview/cv-symline.c b/modules/dbgfmts/codeview/cv-symline.c index 6ad141a1..6d0874f8 100644 --- a/modules/dbgfmts/codeview/cv-symline.c +++ b/modules/dbgfmts/codeview/cv-symline.c @@ -30,7 +30,6 @@ #include /*@unused@*/ RCSID("$Id$"); -#define YASM_BC_INTERNAL #include #include "cv-dbgfmt.h" diff --git a/modules/dbgfmts/codeview/cv-type.c b/modules/dbgfmts/codeview/cv-type.c index 433013ea..47adc234 100644 --- a/modules/dbgfmts/codeview/cv-type.c +++ b/modules/dbgfmts/codeview/cv-type.c @@ -30,7 +30,6 @@ #include /*@unused@*/ RCSID("$Id$"); -#define YASM_BC_INTERNAL #include #include "cv-dbgfmt.h" diff --git a/modules/dbgfmts/dwarf2/dwarf2-dbgfmt.c b/modules/dbgfmts/dwarf2/dwarf2-dbgfmt.c index e889f51f..6e89a13d 100644 --- a/modules/dbgfmts/dwarf2/dwarf2-dbgfmt.c +++ b/modules/dbgfmts/dwarf2/dwarf2-dbgfmt.c @@ -27,7 +27,6 @@ #include /*@unused@*/ RCSID("$Id$"); -#define YASM_BC_INTERNAL #include #include "dwarf2-dbgfmt.h" diff --git a/modules/dbgfmts/dwarf2/dwarf2-info.c b/modules/dbgfmts/dwarf2/dwarf2-info.c index be6cf605..9c3d52a5 100644 --- a/modules/dbgfmts/dwarf2/dwarf2-info.c +++ b/modules/dbgfmts/dwarf2/dwarf2-info.c @@ -34,7 +34,6 @@ #include #endif -#define YASM_BC_INTERNAL #include #include "dwarf2-dbgfmt.h" diff --git a/modules/dbgfmts/dwarf2/dwarf2-line.c b/modules/dbgfmts/dwarf2/dwarf2-line.c index 90dc7ea9..e8d84d8c 100644 --- a/modules/dbgfmts/dwarf2/dwarf2-line.c +++ b/modules/dbgfmts/dwarf2/dwarf2-line.c @@ -30,7 +30,6 @@ #include /*@unused@*/ RCSID("$Id$"); -#define YASM_BC_INTERNAL #include #include "dwarf2-dbgfmt.h" diff --git a/modules/dbgfmts/stabs/stabs-dbgfmt.c b/modules/dbgfmts/stabs/stabs-dbgfmt.c index ad25581a..5e908308 100644 --- a/modules/dbgfmts/stabs/stabs-dbgfmt.c +++ b/modules/dbgfmts/stabs/stabs-dbgfmt.c @@ -27,7 +27,6 @@ #include /*@unused@*/ RCSID("$Id$"); -#define YASM_BC_INTERNAL #include typedef enum { diff --git a/modules/listfmts/nasm/nasm-listfmt.c b/modules/listfmts/nasm/nasm-listfmt.c index 8b550435..ef5adde1 100644 --- a/modules/listfmts/nasm/nasm-listfmt.c +++ b/modules/listfmts/nasm/nasm-listfmt.c @@ -27,7 +27,6 @@ #include /*@unused@*/ RCSID("$Id$"); -#define YASM_BC_INTERNAL #include /* NOTE: For this code to generate relocation information, the relocations diff --git a/modules/objfmts/bin/bin-objfmt.c b/modules/objfmts/bin/bin-objfmt.c index cf06d50b..56515726 100644 --- a/modules/objfmts/bin/bin-objfmt.c +++ b/modules/objfmts/bin/bin-objfmt.c @@ -27,7 +27,6 @@ #include /*@unused@*/ RCSID("$Id$"); -#define YASM_BC_INTERNAL #define YASM_EXPR_INTERNAL #include diff --git a/modules/objfmts/coff/coff-objfmt.c b/modules/objfmts/coff/coff-objfmt.c index cb4719de..de31df71 100644 --- a/modules/objfmts/coff/coff-objfmt.c +++ b/modules/objfmts/coff/coff-objfmt.c @@ -28,7 +28,6 @@ #include /*@unused@*/ RCSID("$Id$"); -#define YASM_BC_INTERNAL #define YASM_EXPR_INTERNAL #include diff --git a/modules/objfmts/coff/win64-except.c b/modules/objfmts/coff/win64-except.c index 82b5f616..cbda39d3 100644 --- a/modules/objfmts/coff/win64-except.c +++ b/modules/objfmts/coff/win64-except.c @@ -27,7 +27,6 @@ #include /*@unused@*/ RCSID("$Id$"); -#define YASM_BC_INTERNAL #define YASM_EXPR_INTERNAL #include diff --git a/modules/objfmts/elf/elf-objfmt.c b/modules/objfmts/elf/elf-objfmt.c index ecf13f40..5f726eac 100644 --- a/modules/objfmts/elf/elf-objfmt.c +++ b/modules/objfmts/elf/elf-objfmt.c @@ -44,7 +44,6 @@ * Each Section is spatially disjoint, and has exactly one SHT entry. */ -#define YASM_BC_INTERNAL #define YASM_EXPR_INTERNAL #include diff --git a/modules/objfmts/macho/macho-objfmt.c b/modules/objfmts/macho/macho-objfmt.c index 507279e0..d1462829 100644 --- a/modules/objfmts/macho/macho-objfmt.c +++ b/modules/objfmts/macho/macho-objfmt.c @@ -108,7 +108,6 @@ /* optional: automatically prefix underscores to global exported symbols */ /*#define AUTO_UNDERSCORE*/ -#define YASM_BC_INTERNAL #define YASM_EXPR_INTERNAL #include diff --git a/modules/objfmts/rdf/rdf-objfmt.c b/modules/objfmts/rdf/rdf-objfmt.c index 64047915..6a0f6923 100644 --- a/modules/objfmts/rdf/rdf-objfmt.c +++ b/modules/objfmts/rdf/rdf-objfmt.c @@ -27,7 +27,6 @@ #include /*@unused@*/ RCSID("$Id$"); -#define YASM_BC_INTERNAL #define YASM_EXPR_INTERNAL #include diff --git a/modules/objfmts/xdf/xdf-objfmt.c b/modules/objfmts/xdf/xdf-objfmt.c index a0c58848..f68237e6 100644 --- a/modules/objfmts/xdf/xdf-objfmt.c +++ b/modules/objfmts/xdf/xdf-objfmt.c @@ -27,7 +27,6 @@ #include /*@unused@*/ RCSID("$Id$"); -#define YASM_BC_INTERNAL #define YASM_EXPR_INTERNAL #include