[PATCH v5] objcopy: add option to specify custom prefix for symbol of binary input

Alon Bar-Lev alon.barlev@gmail.com
Wed Oct 29 10:52:40 GMT 2025


On Wed, 29 Oct 2025 at 12:28, Jan Beulich <jbeulich@suse.com> wrote:

> On 29.10.2025 03:07, Alan Modra wrote:
> > On Mon, Oct 27, 2025 at 03:53:48PM +0200, Alon Bar-Lev wrote:
> >> --- a/bfd/bfd.c
> >> +++ b/bfd/bfd.c
> >> @@ -105,6 +105,9 @@ CODE_FRAGMENT
> >>  .  {* The filename the application opened the BFD with.  *}
> >>  .  const char *filename;
> >>  .
> >> +.  {* The symbol name for the file or NULL.  *}
> >> +.  const char *binary_symbol_prefix;
> >> +.
> >
> > Move this to binary.c line 44, without the special markup, and better
> > call the variable _bfd_binary_symbol_prefix.  We're just giving a side
> > channel from binutils/objcopy.c to bfd/binary.c.
>
> I'm curious, especially in the context of a series I submitted earlier this
> week: Aren't symbols prefixed _bfd_ supposed to be library-internal?
> Whereas
> exported symbols would be prefixed bfd_? Said series is trying to tidy
> things
> at least some in this regard ...
>
> Jan
>

Thanks for noticing, I completely overseen the _bfd_ prefix.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://sourceware.org/pipermail/binutils/attachments/20251029/1369a63b/attachment.htm>


More information about the Binutils mailing list