This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: Remove sec->name and bfd_section_name


On Tue, May 25, 2004 at 12:04:43PM -0400, Ian Lance Taylor wrote:
> "H. J. Lu" <hjl@lucon.org> writes:
> 
> > I am working on a patch to get rid of sec->name. Please use
> > bfd_get_section_name for section name.
> > 
> > BTW, we have both
> > 
> > #define bfd_get_section_name(bfd, ptr) ((ptr)->name + 0)
> > #define bfd_section_name(bfd, ptr) ((ptr)->name)
> > 
> > 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.

> 
> > 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)?


H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]