Merge "Do not include '\0' when writing error messages to stderr"
This commit is contained in:
commit
f2de6b0f6e
@ -146,7 +146,7 @@ static unsigned bitmask[4096];
|
|||||||
{ \
|
{ \
|
||||||
const char* msg = "ERROR: " #name " called from the dynamic linker!\n"; \
|
const char* msg = "ERROR: " #name " called from the dynamic linker!\n"; \
|
||||||
__libc_android_log_write(ANDROID_LOG_FATAL, "linker", msg); \
|
__libc_android_log_write(ANDROID_LOG_FATAL, "linker", msg); \
|
||||||
write(2, msg, sizeof(msg)); \
|
write(2, msg, strlen(msg)); \
|
||||||
abort(); \
|
abort(); \
|
||||||
}
|
}
|
||||||
#define UNUSED __attribute__((unused))
|
#define UNUSED __attribute__((unused))
|
||||||
@ -1916,9 +1916,9 @@ static unsigned __linker_init_post_relocation(unsigned **elfdata, unsigned linke
|
|||||||
somain = si;
|
somain = si;
|
||||||
|
|
||||||
if (!soinfo_link_image(si)) {
|
if (!soinfo_link_image(si)) {
|
||||||
char errmsg[] = "CANNOT LINK EXECUTABLE\n";
|
const char* msg = "CANNOT LINK EXECUTABLE\n";
|
||||||
write(2, __linker_dl_err_buf, strlen(__linker_dl_err_buf));
|
write(2, __linker_dl_err_buf, strlen(__linker_dl_err_buf));
|
||||||
write(2, errmsg, sizeof(errmsg));
|
write(2, msg, strlen(msg));
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user