Merge "linker: reduce size by nearly 20KB"

This commit is contained in:
David 'Digit' Turner 2012-06-19 14:51:28 -07:00 committed by Android (Google) Code Review
commit 823aeb9294

View File

@ -172,6 +172,21 @@ vsnprintf(char *buff, size_t bufsize, const char *format, va_list args)
return format_buffer(buff, bufsize, format, args);
}
/* The pthread implementation uses snprintf(). If we define it here, we
* avoid pulling the stdio vfprintf() implementation into the linker
* saving about 19KB of machine code.
*/
int
snprintf(char* buff, size_t bufsize, const char* format, ...)
{
va_list args;
int ret;
va_start(args, format);
ret = vsnprintf(buff, bufsize, format, args);
va_end(args);
return ret;
}
#if LINKER_DEBUG
#if !LINKER_DEBUG_TO_LOG