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: Very interesting IA64 gas bug


Jim Wilson <wilson@tuliptree.org> writes:

> On Sat, 2003-06-07 at 08:15, H. J. Lu wrote:
> > The one on my list is to fix elf_fake_sections so that type section
> > type doesn't depend on section name. We have 20 bits to use in
> > struct sec. Should I give it a shot?
> 
> I suppose if you really want to try, it wouldn't hurt.  I am not really
> a bfd expert, but I suspect it will be hard to get bfd to stop using
> section names.  They are used in too many places in bfd.  This is one of
> the reasons why Ulrich Drepper came up with libelf.  libelf doesn't use
> section names for classifying sections.

It's not especially hard to fix BFD ELF.  The easy way is to add
fields to bfd_elf_section_data for the type and entry size and
whatever else you happen to need.  Add ELF specific functions which
the assembler calls to set this information--along the lines of
bfd_elf_set_dt_needed_name() (well, that's called by the linker, but
the idea is the same).  Have the assembler set these fields, and have
the linker and objcopy preserve them.

Make sure that every ELF flag is analagous to a BFD section flag, and
use those.

In general, mind you, I think it's time to toss BFD and write an ELF
specific assembler and linker.  That would be faster and easier to
maintain.

Ian


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