Commit 3cf75195 authored by simonmar's avatar simonmar

[project @ 2001-02-12 12:22:01 by simonmar]

add some assertions
parent 7954c508
/* -----------------------------------------------------------------------------
* $Id: Linker.c,v 1.22 2001/02/11 17:51:07 simonmar Exp $
* $Id: Linker.c,v 1.23 2001/02/12 12:22:01 simonmar Exp $
*
* (c) The GHC Team, 2000
*
......@@ -285,6 +285,7 @@ void *
lookupSymbol( char *lbl )
{
SymbolVal *val;
ASSERT(symhash != NULL);
val = lookupStrHashTable(symhash, lbl);
if (val == NULL) {
......@@ -415,6 +416,9 @@ unloadObj( char *path )
{
ObjectCode *oc, *prev;
ASSERT(symhash != NULL);
ASSERT(objects != NULL);
prev = NULL;
for (oc = objects; oc; prev = oc, oc = oc->next) {
if (!strcmp(oc->fileName,path)) {
......@@ -1290,6 +1294,8 @@ ocGetNames_ELF ( ObjectCode* oc )
Elf32_Shdr* shdr = (Elf32_Shdr*) (ehdrC + ehdr->e_shoff);
char* sh_strtab = ehdrC + shdr[ehdr->e_shstrndx].sh_offset;
ASSERT(symhash != NULL);
if (!strtab) {
belch("ocGetNames_ELF: no strtab");
return 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment