aboutsummaryrefslogtreecommitdiff
path: root/ld/ldmisc.c
diff options
context:
space:
mode:
Diffstat (limited to 'ld/ldmisc.c')
-rw-r--r--ld/ldmisc.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/ld/ldmisc.c b/ld/ldmisc.c
index d49cf17..74baa98 100644
--- a/ld/ldmisc.c
+++ b/ld/ldmisc.c
@@ -57,12 +57,13 @@
%d integer, like printf
%ld long, like printf
%lu unsigned long, like printf
+ %p native (host) void* pointer, like printf
%s arbitrary string, like printf
%u integer, like printf
%v hex bfd_vma, no leading zeros
*/
-static void
+void
vfinfo (FILE *fp, const char *fmt, va_list arg, bfd_boolean is_warning)
{
bfd_boolean fatal = FALSE;
@@ -368,6 +369,11 @@ vfinfo (FILE *fp, const char *fmt, va_list arg, bfd_boolean is_warning)
}
break;
+ case 'p':
+ /* native (host) void* pointer, like printf */
+ fprintf (fp, "%p", va_arg (arg, void *));
+ break;
+
case 's':
/* arbitrary string, like printf */
fprintf (fp, "%s", va_arg (arg, char *));