aboutsummaryrefslogtreecommitdiff
path: root/tcccoff.c
diff options
context:
space:
mode:
authorgrischka <grischka>2009-05-11 18:45:44 +0200
committergrischka <grischka>2009-05-11 18:45:44 +0200
commitf9181416f604c1c0715fc538316948a9f957a3c3 (patch)
tree44b516fd9c79bd470322480540feda94acb2c6d9 /tcccoff.c
parent5c6509578e78db8978b19ab81c4f26398f13c82d (diff)
downloadtinycc-f9181416f604c1c0715fc538316948a9f957a3c3.tar.gz
tinycc-f9181416f604c1c0715fc538316948a9f957a3c3.tar.bz2
move some global variables into TCCState
Diffstat (limited to 'tcccoff.c')
-rw-r--r--tcccoff.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/tcccoff.c b/tcccoff.c
index de7d87c..1ee9b0c 100644
--- a/tcccoff.c
+++ b/tcccoff.c
@@ -183,7 +183,7 @@ int tcc_output_coff(TCCState *s1, FILE *f)
coff_sec->s_nlnno = 0;
coff_sec->s_lnnoptr = 0;
- if (do_debug && tcc_sect == stext) {
+ if (s1->do_debug && tcc_sect == stext) {
// count how many line nos data
// also find association between source file name and function
@@ -311,7 +311,7 @@ int tcc_output_coff(TCCState *s1, FILE *f)
file_hdr.f_symptr = file_pointer; /* file pointer to symtab */
- if (do_debug)
+ if (s1->do_debug)
file_hdr.f_nsyms = coff_nb_syms; /* number of symtab entries */
else
file_hdr.f_nsyms = 0;
@@ -362,7 +362,7 @@ int tcc_output_coff(TCCState *s1, FILE *f)
// group the symbols in order of filename, func1, func2, etc
// finally global symbols
- if (do_debug)
+ if (s1->do_debug)
SortSymbolTable();
// write line no data
@@ -371,7 +371,7 @@ int tcc_output_coff(TCCState *s1, FILE *f)
coff_sec = &section_header[i];
tcc_sect = s1->sections[i];
- if (do_debug && tcc_sect == stext) {
+ if (s1->do_debug && tcc_sect == stext) {
// count how many line nos data
@@ -499,7 +499,7 @@ int tcc_output_coff(TCCState *s1, FILE *f)
}
// write symbol table
- if (do_debug) {
+ if (s1->do_debug) {
int k;
struct syment csym;
AUXFUNC auxfunc;
@@ -670,7 +670,7 @@ int tcc_output_coff(TCCState *s1, FILE *f)
}
}
- if (do_debug) {
+ if (s1->do_debug) {
// write string table
// first write the size