RFC: Remove sec->name and bfd_section_name

Ian Lance Taylor ian@wasabisystems.com
Wed May 26 03:18:00 GMT 2004


"H. J. Lu" <hjl@lucon.org> writes:

> > > Their usages are very inconsistent. I am planning to rename
> > > 
> > > #define bfd_section_name(bfd, ptr) ((ptr)->name)
> > > 
> > > to
> > > 
> > > #define bfd_section_ident(bfd, ptr) ((ptr)->name)
> > 
> > I don't think that is a good idea.  If we want to fix the issue of
> > diagnostics, let's fix it.  Let's not put in a confusing temporary
> > patch.
> 
> bfd_section_ident is intended for diagnostics.

I can't tell whether you read what I wrote.  Let me quote myself from
six lines up: "If we want to fix the issue of diagnostics, let's fix
it.  Let's not put in a confusing temporary patch."

> > > and add
> > > 
> > > #define bfd_set_section_name(bfd, ptr, name) ((ptr)->name = (name), TRUE)
> > 
> > That seems reasonable.
> 
> How about changing sec->name to bfd_get_section_name (bfd, sec)?

I think that would be a good idea.

Ian



More information about the Binutils mailing list