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: PATCH: Remove bfd_comdat_info and move section_already_linked


On Tue, Jul 20, 2004 at 06:24:17PM +0100, Nick Clifton wrote:
> Hi H.J.
> 
> > > I like it, except that it seems to me that you could leave
> > > section_already_linked where it is, and just provide a bfd xvec
> > > predicate.  That would save some code duplication, which helps
> > > in maintaining the linker.
> > > 
> > 
> > The problem is that piece of code can be very much format specific. I
> > have a follow-on patch to fix
> > 
> > http://sources.redhat.com/bugzilla/show_bug.cgi?id=246
> > 
> > My patch needs to access ELF backend. To do it in the linker, I will
> > need to add another field to bfd xvec and we have to do more checking
> > on input to see if it is ELF. I think the code duplication is very
> > minimum here.
> 
> Well you still have the ...section_already_linked() code duplicated
> three times.  That could be reduced.  Plus there is a problem in that
> some of the COFF based ports do not currently include cofflink.lo when
> building libbfd.a, so that there is an unresolved reference to
> _bfd_coff_section_already_linked().

I updated my patch to fold _bfd_coff_section_already_linked into
_bfd_generic_section_already_linked.

> 
> How about this variation on your patch which adds in the necessary
> fixes to bfd/configure.in and also creates a generic
> section_already_linked() function which takes file format specific
> helper functions as arguments ?
> 

The problem is _bfd_elf_section_already_linked will be changed into
somthing which helper functions won't work to support

http://gcc.gnu.org/ml/gcc-patches/2004-07/msg01047.html


H.J.

Attachment: binutils-comdat-6.patch
Description: Text document


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