am ce876beb: am a41e6426: Merge "Tone down some of the overly-verbose linker logging."
* commit 'ce876bebf250d386a06ebc1145c6959e30bf413c': Tone down some of the overly-verbose linker logging.
This commit is contained in:
commit
da71c7d9a3
@ -160,7 +160,8 @@ static char __linker_dl_err_buf[768];
|
|||||||
#define DL_ERR(fmt, x...) \
|
#define DL_ERR(fmt, x...) \
|
||||||
do { \
|
do { \
|
||||||
format_buffer(__linker_dl_err_buf, sizeof(__linker_dl_err_buf), fmt, ##x); \
|
format_buffer(__linker_dl_err_buf, sizeof(__linker_dl_err_buf), fmt, ##x); \
|
||||||
ERROR(fmt "\n", ##x); \
|
/* If LD_DEBUG is set high enough, send every dlerror(3) message to the log. */ \
|
||||||
|
DEBUG(fmt "\n", ##x); \
|
||||||
} while(0)
|
} while(0)
|
||||||
|
|
||||||
const char* linker_get_error() {
|
const char* linker_get_error() {
|
||||||
@ -644,7 +645,7 @@ static int open_library_on_path(const char* name, const char* const paths[]) {
|
|||||||
for (size_t i = 0; paths[i] != NULL; ++i) {
|
for (size_t i = 0; paths[i] != NULL; ++i) {
|
||||||
int n = format_buffer(buf, sizeof(buf), "%s/%s", paths[i], name);
|
int n = format_buffer(buf, sizeof(buf), "%s/%s", paths[i], name);
|
||||||
if (n < 0 || n >= static_cast<int>(sizeof(buf))) {
|
if (n < 0 || n >= static_cast<int>(sizeof(buf))) {
|
||||||
WARN("Ignoring very long library path: %s/%s\n", paths[i], name);
|
PRINT("Warning: ignoring very long library path: %s/%s\n", paths[i], name);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
int fd = TEMP_FAILURE_RETRY(open(buf, O_RDONLY | O_CLOEXEC));
|
int fd = TEMP_FAILURE_RETRY(open(buf, O_RDONLY | O_CLOEXEC));
|
||||||
@ -960,7 +961,7 @@ static int soinfo_unload(soinfo* si) {
|
|||||||
si->refcount = 0;
|
si->refcount = 0;
|
||||||
} else {
|
} else {
|
||||||
si->refcount--;
|
si->refcount--;
|
||||||
PRINT("not unloading '%s', decrementing refcount to %d\n", si->name, si->refcount);
|
TRACE("not unloading '%s', decrementing refcount to %d\n", si->name, si->refcount);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -71,8 +71,6 @@ extern int format_fd(int, const char *, ...) __attribute__((__format__(printf, 2
|
|||||||
#define PRINT(x...) _PRINTVF(-1, x)
|
#define PRINT(x...) _PRINTVF(-1, x)
|
||||||
#define INFO(x...) _PRINTVF(0, x)
|
#define INFO(x...) _PRINTVF(0, x)
|
||||||
#define TRACE(x...) _PRINTVF(1, x)
|
#define TRACE(x...) _PRINTVF(1, x)
|
||||||
#define WARN(fmt,args...) _PRINTVF(-1, "%s:%d| WARNING: " fmt, __FILE__, __LINE__, ## args)
|
|
||||||
#define ERROR(fmt,args...) _PRINTVF(-1, "%s:%d| ERROR: " fmt, __FILE__, __LINE__, ## args)
|
|
||||||
|
|
||||||
#if TRACE_DEBUG
|
#if TRACE_DEBUG
|
||||||
#define DEBUG(x...) _PRINTVF(2, "DEBUG: " x)
|
#define DEBUG(x...) _PRINTVF(2, "DEBUG: " x)
|
||||||
@ -82,9 +80,4 @@ extern int format_fd(int, const char *, ...) __attribute__((__format__(printf, 2
|
|||||||
|
|
||||||
#define TRACE_TYPE(t,x...) do { if (DO_TRACE_##t) { TRACE(x); } } while (0)
|
#define TRACE_TYPE(t,x...) do { if (DO_TRACE_##t) { TRACE(x); } } while (0)
|
||||||
|
|
||||||
#if TIMING
|
|
||||||
#undef WARN
|
|
||||||
#define WARN(x...) do {} while (0)
|
|
||||||
#endif /* TIMING */
|
|
||||||
|
|
||||||
#endif /* _LINKER_DEBUG_H_ */
|
#endif /* _LINKER_DEBUG_H_ */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user