Skip to content
Snippets Groups Projects
Commit fed9ce4c authored by Vivek Das Mohapatra's avatar Vivek Das Mohapatra
Browse files

Clean up the DEBUG messages some more

parent 830171cb
No related branches found
No related tags found
1 merge request!311Build capsule-capture-libs from a bundled copy of libcapsule
...@@ -839,6 +839,7 @@ load_ld_cache (ldlibs_t *libs, const char *path) ...@@ -839,6 +839,7 @@ load_ld_cache (ldlibs_t *libs, const char *path)
// plain modern (circa 2016) cache map: // plain modern (circa 2016) cache map:
if( memcmp( libs->cache_mmap->magic, CACHEMAGIC, sizeof(CACHEMAGIC) -1 ) ) if( memcmp( libs->cache_mmap->magic, CACHEMAGIC, sizeof(CACHEMAGIC) -1 ) )
{ {
DEBUG( DEBUG_LDCACHE, "New format ld cache" );
libs->cache.new = (struct cache_file_new *)libs->cache_mmap; libs->cache.new = (struct cache_file_new *)libs->cache_mmap;
// if the magic strings don't reside at the expected offsets, bail out: // if the magic strings don't reside at the expected offsets, bail out:
...@@ -863,6 +864,8 @@ load_ld_cache (ldlibs_t *libs, const char *path) ...@@ -863,6 +864,8 @@ load_ld_cache (ldlibs_t *libs, const char *path)
size_t offset = ALIGN_CACHE( block ); size_t offset = ALIGN_CACHE( block );
int nlibs = libs->cache_mmap->nlibs; int nlibs = libs->cache_mmap->nlibs;
DEBUG( DEBUG_LDCACHE, "Old format ld cache" );
// it's an old-style cache, unless we successfully probe for a // it's an old-style cache, unless we successfully probe for a
// nested new cache inside it: // nested new cache inside it:
libs->ctype = CACHE_OLD; libs->ctype = CACHE_OLD;
...@@ -887,24 +890,21 @@ load_ld_cache (ldlibs_t *libs, const char *path) ...@@ -887,24 +890,21 @@ load_ld_cache (ldlibs_t *libs, const char *path)
} }
else else
{ {
DEBUG( DEBUG_LDCACHE, "... with a new style cache inside" );
libs->ctype = CACHE_NEW; libs->ctype = CACHE_NEW;
libs->cache_data = (char *)libs->cache.new; libs->cache_data = (char *)libs->cache.new;
} }
} }
} }
if (libs->cache_fd >= 0) if( libs->cache_fd >= 0 )
{ {
if (libs->debug) DEBUG( DEBUG_LDCACHE, "Opened ld.cache at %s", cachepath );
fprintf(stderr, "Opened ld.cache at %s\n", cachepath);
rv = 1; rv = 1;
} }
else else
{ {
if (libs->debug) DEBUG( DEBUG_LDCACHE, "No ld.cache at %s", cachepath );
fprintf(stderr, "No ld.cache at %s\n", cachepath);
rv = 0; rv = 0;
} }
...@@ -1316,7 +1316,7 @@ static int install_wrappers ( void *dl_handle, ...@@ -1316,7 +1316,7 @@ static int install_wrappers ( void *dl_handle,
if( errcode ) if( errcode )
*errcode = EINVAL; *errcode = EINVAL;
DEBUG( DEBUG_WRAPPERS, "mangling dlopen symbols: %s", *error ); DEBUG( DEBUG_WRAPPERS, "mangling capsule symbols: %s", *error );
return -1; return -1;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment