diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2007-07-12 09:30:20 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2007-07-12 09:30:20 +0200 |
commit | 93abe4f36b22c7f84bd40eb24c9d39a4f6631c2b (patch) | |
tree | 62a934c83838b5cab7594fa61b23efcdaaf8ac45 /lib/vsprintf.c | |
parent | 64042b5672f016a2e878337ed74de6f7aa08aad6 (diff) | |
download | barebox-93abe4f36b22c7f84bd40eb24c9d39a4f6631c2b.tar.gz barebox-93abe4f36b22c7f84bd40eb24c9d39a4f6631c2b.tar.xz |
make printf position independent
Diffstat (limited to 'lib/vsprintf.c')
-rw-r--r-- | lib/vsprintf.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/vsprintf.c b/lib/vsprintf.c index 77fb2a450a..c6fbfe35dd 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c @@ -15,6 +15,7 @@ #include <linux/ctype.h> #include <common.h> +#include <reloc.h> unsigned long simple_strtoul(const char *cp,char **endp,unsigned int base) { @@ -114,11 +115,11 @@ static char * number(char * str, long num, int base, int size, int precision ,in #endif { char c,sign,tmp[66]; - const char *digits="0123456789abcdefghijklmnopqrstuvwxyz"; + const char *digits = RELOC("0123456789abcdefghijklmnopqrstuvwxyz"); int i; if (type & LARGE) - digits = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; + digits = RELOC("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"); if (type & LEFT) type &= ~ZEROPAD; if (base < 2 || base > 36) @@ -269,7 +270,7 @@ int vsprintf(char *buf, const char *fmt, va_list args) case 's': s = va_arg(args, char *); if (!s) - s = "<NULL>"; + s = RELOC("<NULL>"); len = strnlen(s, precision); |