aboutsummaryrefslogtreecommitdiff
path: root/ld/ldmisc.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2005-11-18 04:12:27 +0000
committerAlan Modra <amodra@gmail.com>2005-11-18 04:12:27 +0000
commit94b50910fb44b8b019b32dba42a22ff2f8fcf6be (patch)
tree65a6f03533b0abb36eb9e54f8350072e44c2c867 /ld/ldmisc.c
parentd97a892405988f4cdb131805eb8b96987dff4892 (diff)
downloadgdb-94b50910fb44b8b019b32dba42a22ff2f8fcf6be.zip
gdb-94b50910fb44b8b019b32dba42a22ff2f8fcf6be.tar.gz
gdb-94b50910fb44b8b019b32dba42a22ff2f8fcf6be.tar.bz2
* ldlang.c (lang_size_sections_1): Revert 2005-11-16 functional
changes to section alignment. * ldmisc.c (vfinfo): Handle %ld and %lu.
Diffstat (limited to 'ld/ldmisc.c')
-rw-r--r--ld/ldmisc.c25
1 files changed, 21 insertions, 4 deletions
diff --git a/ld/ldmisc.c b/ld/ldmisc.c
index 4797c29..3ba4221 100644
--- a/ld/ldmisc.c
+++ b/ld/ldmisc.c
@@ -55,6 +55,8 @@
%W hex bfd_vma with 0x with no leading zeros taking up 8 spaces
%X no object output, fail return
%d integer, like printf
+ %ld long, like printf
+ %lu unsigned long, like printf
%s arbitrary string, like printf
%u integer, like printf
%v hex bfd_vma, no leading zeros
@@ -78,10 +80,6 @@ vfinfo (FILE *fp, const char *fmt, va_list arg, bfd_boolean is_warning)
fmt++;
switch (*fmt++)
{
- default:
- fprintf (fp, "%%%c", fmt[-1]);
- break;
-
case '%':
/* literal % */
putc ('%', fp);
@@ -407,6 +405,25 @@ vfinfo (FILE *fp, const char *fmt, va_list arg, bfd_boolean is_warning)
/* unsigned integer, like printf */
fprintf (fp, "%u", va_arg (arg, unsigned int));
break;
+
+ case 'l':
+ if (*fmt == 'd')
+ {
+ fprintf (fp, "%ld", va_arg (arg, long));
+ ++fmt;
+ break;
+ }
+ else if (*fmt == 'u')
+ {
+ fprintf (fp, "%lu", va_arg (arg, unsigned long));
+ ++fmt;
+ break;
+ }
+ /* Fall thru */
+
+ default:
+ fprintf (fp, "%%%c", fmt[-1]);
+ break;
}
}
}