Create linker_find_def.

It turns out I didn't need it, but it could be useful in the future, so
I'll leave it in.
This commit is contained in:
Bill Currie 2012-11-09 11:57:06 +09:00
parent 4ef4711c3b
commit afbab60c25
2 changed files with 11 additions and 0 deletions

View file

@ -38,6 +38,7 @@ void linker_begin (void);
int linker_add_string (const char *str);
void linker_add_def (const char *name, struct type_s *type, unsigned flags,
int v);
struct qfo_def_s *linker_find_def (const char *name);
int linker_add_qfo (struct qfo_s *qfo);
int linker_add_object_file (const char *filename);
int linker_add_lib (const char *libname);

View file

@ -564,6 +564,16 @@ linker_add_def (const char *name, type_t *type, unsigned flags, int v)
make_def (qfo_near_data_space, name, type, flags, v);
}
qfo_def_t *
linker_find_def (const char *name)
{
defref_t *r;
if ((r = Hash_Find (defined_defs, name)))
return REF (r);
return 0;
}
/** Initialize the linker state.
*/
void