This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [patch] Add external symbol table file support for gprof
- From: Matthias Klose <doko at ubuntu dot com>
- To: Dongsheng Xing <homer dot xing at yahoo dot com>
- Cc: binutils at sourceware dot org
- Date: Sun, 14 Jun 2009 12:23:38 -0400
- Subject: Re: [patch] Add external symbol table file support for gprof
- References: <736435.46216.qm@web43415.mail.sp1.yahoo.com>
Dongsheng Xing schrieb:
> Hi, Matthias,
>
> I am sorry for the mistake I made.
> I cannot regenerate the ``expects type long unsigned int *'' warning on my computer with gcc 4.4.0. But I guess this warning is caused by '%lx'. I wish that the following patch will take out the warning.
>
> Best Regards,
> Homer
>
>
> diff -rup binutils-2.19.51.origin/gprof/corefile.c binutils-2.19.51/gprof/corefile.c
> --- binutils-2.19.51.origin/gprof/corefile.c 2009-06-14 21:00:29.000000000 +0800
> +++ binutils-2.19.51/gprof/corefile.c 2009-06-14 21:04:35.000000000 +0800
> @@ -509,7 +509,7 @@ core_create_syms_from (const char * sym_
>
> sym_init (symtab.limit);
>
> - sscanf (address, "%lx", &(symtab.limit->addr) );
> + sscanf (address, "%" BFD_VMA_FMT "x", &(symtab.limit->addr) );
>
> symtab.limit->name = (char *) xmalloc (strlen (name) + 1);
> strcpy ((char *) symtab.limit->name, name);
thanks, this fixes the build error (on i486-linux-gnu).
Matthias