From: "Jiang, Haochen" <haochen.jiang@intel.com>
To: Alan Modra <amodra@gmail.com>,
"binutils@sourceware.org" <binutils@sourceware.org>
Subject: RE: Renaming .debug to .zdebug and vice versa
Date: Mon, 5 Dec 2022 02:36:45 +0000 [thread overview]
Message-ID: <SA1PR11MB5946ADE768E2742396DE471BEC189@SA1PR11MB5946.namprd11.prod.outlook.com> (raw)
In-Reply-To: <Y40WXnjN0f0LjrIt@squeak.grove.modra.org>
> +static inline char *
> +bfd_zdebug_name_to_debug (bfd *abfd, const char *name) {
Hi Alan,
It seems that after this patch I fail to build Binutils on x86_64 with the error
following:
../../bfd/bfd.h: In function 'char* bfd_zdebug_name_to_debug(bfd*, const char*)':
../../bfd/bfd.h:7983:30: error: invalid conversion from 'void*' to 'char*' [-fpermissive]
char *new_name = bfd_alloc (abfd, len);
~~~~~~~~~~^~~~~~~~~~~
Can you help to find what is wrong?
Thx,
Haochen
> + size_t len = strlen (name);
> + char *new_name = bfd_alloc (abfd, len);
> + if (new_name == NULL)
> + return NULL;
> + new_name[0] = '.';
> + memcpy (new_name + 1, name + 2, len - 1);
> + return new_name;
> +}
> +
prev parent reply other threads:[~2022-12-05 2:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-04 21:51 Alan Modra
2022-12-05 1:56 ` Simon Marchi
2022-12-05 4:47 ` Alan Modra
2022-12-05 2:36 ` Jiang, Haochen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=SA1PR11MB5946ADE768E2742396DE471BEC189@SA1PR11MB5946.namprd11.prod.outlook.com \
--to=haochen.jiang@intel.com \
--cc=amodra@gmail.com \
--cc=binutils@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).