From 9a96febdf57b79b8724ddbf740cd1bf44901da73 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Fri, 4 Mar 2011 14:51:09 +0900 Subject: [PATCH] Fix the hordes of bogus defs. They were caused by unused external defs, so not processing unused externs in the first place is the simplest solution. --- tools/qfcc/source/linker.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/qfcc/source/linker.c b/tools/qfcc/source/linker.c index c1c3a448f..363247c5b 100644 --- a/tools/qfcc/source/linker.c +++ b/tools/qfcc/source/linker.c @@ -350,6 +350,8 @@ add_defs (qfo_t *qfo, qfo_mspace_t *space, qfo_mspace_t *dest_space) odef->file = linker_add_string (QFOSTR (qfo, idef->file)); type = (qfot_type_t *) (char *) (qfo_type_defs->d.data + idef->type); odef->type = type->t.class; // pointer to type in work + if (odef->flags & QFOD_EXTERNAL && !odef->num_relocs) + continue; ref = get_defref (odef, dest_space); work_defrefs[num_work_defrefs++] = ref; process_def (ref, dest_space);