This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB 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/rfc] Don't complain about unknown OSABI


On Mon, Aug 19, 2002 at 07:03:07PM -0400, Andrew Cagney wrote:

 > Something in binutils knows what the basic OS is.   The linker often 
 > knows to brand the executable a certain way (although increasingly it is 
 > the compiler that is telling the linker everything).  What executable, 
 > for instance, does:
 > 
 > 	as -o s.o /dev/null
 > 	ld s.o
 > 
 > create?

binutils doesn't really know this, per se.  Some BFD back-ends plop
an ELF OSABI value into that part of the ELF ID.  But e.g. alpha-netbsd
does not, because there is no OS-specific anything in the BFD back-end.
(I would say the majority of BFD back-ends fall into this category.)

In the above case, GDB would not know the OS ABI for a NetBSD binary,
because the NetBSD ABI tag, which is provided by crtbegin.o, is not
linked into the executable.

 > Is there an equivalent for the OS/ABI?  If we can pick that default up 
 > from binutils then we also get that for free.  On the other hand if we 
 > start wiring this stuff into configure.tgt (duplicating ld/gcc) we take 
 > on an additional maintenance task.

In BFD, it depends on the back-end.  e.g. if you want a back-end that
sets the ELF OS ABI field to "FreeBSD", the back-end has to be a -fbsd
back-end (are there any in the tree like this now?).

Anyway, I don't think we can rely on BFD to provide us with OS ABI
information (because BFD doesn't actually *know* about OS ABI things
in the same sense that GDB does).

-- 
        -- Jason R. Thorpe <thorpej@wasabisystems.com>


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