From 211b11c8ae873c4c77857d756e8ab5e5103472d1 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Tue, 2 Jul 2002 23:08:44 +0000 Subject: [PATCH] some storage and obj file fixes --- tools/qfcc/source/def.c | 3 +++ tools/qfcc/source/obj_file.c | 1 + 2 files changed, 4 insertions(+) diff --git a/tools/qfcc/source/def.c b/tools/qfcc/source/def.c index daa7eb9d9..b8dd29b63 100644 --- a/tools/qfcc/source/def.c +++ b/tools/qfcc/source/def.c @@ -150,6 +150,7 @@ set_storage_bits (def_t *def, storage_class_t storage) case st_local: break; } + def->initialized = 0; } static const char *vector_component_names[] = {"%s_x", "%s_y", "%s_z"}; @@ -248,6 +249,8 @@ get_def (type_t *type, const char *name, scope_t *scope, } } set_storage_bits (def, storage); + if (storage == st_extern || storage == st_static) + def_initialized (def); return def; } diff --git a/tools/qfcc/source/obj_file.c b/tools/qfcc/source/obj_file.c index 87de5680c..94f00a35c 100644 --- a/tools/qfcc/source/obj_file.c +++ b/tools/qfcc/source/obj_file.c @@ -190,6 +190,7 @@ setup_data (void) func->line_info = LittleLong (f->aux->line_info); func->num_parms = LittleLong (function_parms (f, func->parm_size)); func->relocs = LittleLong (reloc - relocs); + func->num_relocs = LittleLong (count_relocs (f->refs)); write_relocs (f->refs, &reloc); if (f->scope)