Pack Elf_External_Note

Ian Lance Taylor ian@wasabisystems.com
Thu Jan 29 20:42:00 GMT 2004


Daniel Jacobowitz <drow@mvista.com> writes:

> On Thu, Jan 29, 2004 at 02:02:08PM -0500, Ian Lance Taylor wrote:
> > Daniel Jacobowitz <drow@mvista.com> writes:
> > 
> > > Something I mentioned four months ago.  Alan fixed the only place in BFD
> > > that I know of which assumed the size of this structure, but the extra
> > > packed attribute is a guard against future problems.
> > 
> > I don't really like this.  A feature we try to preserve in the
> > binutils is for them to serve to bootstrap the GNU tools on a new
> > system.  Adding a gcc specific feature like that to elf/external.h can
> > potentially hide a problem which would arise when bootstrapping with a
> > non-gcc compiler.  I would prefer to leave the problem exposed, so
> > that it is more likely to be fixed before it becomes a problem.
> 
> If you look at the prior art (Versym, some lines away in the same
> file), and the previous discussion, a number of people seem to
> disagree.

Hmmm.  Well, I won't stand in the way of the patch if other people
want it.

> I don't care either way.  The bug I found is fixed.  Further bugs of
> this nature will show up on arm-linux native and basically nowhere
> else, so they will probably never be fixed.

Clearly we need a -fweird-abi option for gcc, and we need to run
periodic tests using it.

Or maybe we need __attribute__((externally_defined)) which then issues
a warning whenever the structure is used in a way which might break
the external definition, such as sizeof or expecting a particular
alignment.

Ian



More information about the Binutils mailing list