Skip to content

Commit

Permalink
wl: cleanup linker code
Browse files Browse the repository at this point in the history
add detection for LHEADR OMF record
  • Loading branch information
jmalak committed May 14, 2024
1 parent 98abaed commit 1e280e8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions bld/wl/c/objomf.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
*
* Open Watcom Project
*
* Copyright (c) 2002-2023 The Open Watcom Contributors. All Rights Reserved.
* Copyright (c) 2002-2024 The Open Watcom Contributors. All Rights Reserved.
* Portions Copyright (c) 1983-2002 Sybase, Inc. All Rights Reserved.
*
* ========================================================================
Expand Down Expand Up @@ -130,7 +130,7 @@ bool IsOMF( file_list *list, unsigned long loc )
byte *rec;

rec = CacheRead( list, loc, sizeof( unsigned_8 ) );
return( rec != NULL && *rec == CMD_THEADR );
return( rec != NULL && ( *rec == CMD_THEADR || *rec == CMD_LHEADR ) );
}

char *GetOMFName( file_list *list, unsigned long *loc )
Expand Down
6 changes: 2 additions & 4 deletions bld/wl/c/objorl.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,14 +161,12 @@ static void ClearCachedData( file_list *list )
/********************************************/
{
readcache *cache;
readcache *next;

for( cache = ReadCacheList; cache != NULL; cache = next ) {
next = cache->next;
while( (cache = ReadCacheList) != NULL ) {
ReadCacheList = cache->next;
CacheFree( list, cache->data );
_LnkFree( cache );
}
ReadCacheList = NULL;
}

bool IsORL( file_list *list, unsigned long loc )
Expand Down

0 comments on commit 1e280e8

Please sign in to comment.