Add more linker debug log.
Main change is to log errors directly where they occur, to correlate with
other dlopen/dlsym logs.
Test: Build & boot with and without LinkerLogger::flags_ initialised to kLogDlopen
Change-Id: If36f52914dc97cedd95dc9375c291640c6891728
diff --git a/linker/linker_globals.h b/linker/linker_globals.h
index de05238..83cedca 100644
--- a/linker/linker_globals.h
+++ b/linker/linker_globals.h
@@ -53,8 +53,20 @@
#define DL_ERR_AND_LOG(fmt, x...) \
do { \
- DL_ERR(fmt, x); \
- PRINT(fmt, x); \
+ DL_ERR(fmt, ##x); \
+ PRINT(fmt, ##x); \
+ } while (false)
+
+#define DL_OPEN_ERR(fmt, x...) \
+ do { \
+ DL_ERR(fmt, ##x); \
+ LD_LOG(kLogDlopen, fmt, ##x); \
+ } while (false)
+
+#define DL_SYM_ERR(fmt, x...) \
+ do { \
+ DL_ERR(fmt, ##x); \
+ LD_LOG(kLogDlsym, fmt, ##x); \
} while (false)
constexpr ElfW(Versym) kVersymNotNeeded = 0;