This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: Back-end specific per-bfd data
- To: mark@codesourcery.com
- Subject: Re: Back-end specific per-bfd data
- From: Ian Lance Taylor <ian@airs.com>
- Date: 4 Jun 1999 14:07:17 -0400
- CC: binutils@sourceware.cygnus.com
- References: <19990604081031H.mitchell@codesourcery.com>
From: mark@codesourcery.com
Date: Fri, 04 Jun 1999 08:10:31 -0700
There seems to be no place to put back-end specific per-bfd data.
That means that some of the backends have resulted to static data,
which is surely not the right thing given the otherwise nicely
object-oriented and reentrant nature of bfd.
There is bfd->usrdata, but that is for *application* data, not
back-end specific data.
Am I missing the right hook for this? Or, does anyone object to the
creation of bfd->used_by_bfd analagous to the field of the same name
in asection?
It shouldn't be necessary. What sort of data are you talking about?
As Nick says, you can use the linker hash table to hold information
during a link.
At other times, you can use the tdata field. In ELF, this is an
instance of elf_obj_tdata, which has all sorts of junk in it (too
much, probably).
I agree that BFD code should not be using static data.
Ian