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] sh64: Fix gas testsuite expected output


On Wed, Oct 16, 2002 at 09:48:15AM -0700, Matt Thomas wrote:
> IMO, even though Linux and NetBSD use the same calling conventions,
> they are different ABIs since syscalls are handled differently and
> libc has different conventions.  You can't use a Linux shared lib
> natively on NetBSD nor can you use a NetBSD shared lib natively on
> Linux.  Without a kernel compatibility layer, a small staticly
> linked "Hello World" program linked on one O/S won't run on the
> other.

This argument is irrelevant to correct usage of EI_OSABI.  For
example, it's quite easy to create an app on a recent version of Linux
that won't run on an older Linux.  Does that mean OSABI or ABIVERSION
needs to change?  Not at all.

I believe the real test for a change in OSABI or ABIVERSION is:
Will a consumer of ELF files, such as a linker, that properly handles
ELF files conforming to the gABI and relevant psABI, be able to
properly handle your particular ELF files?  ie.  OSABI and ABIVERSION
are used in cases where there are variations and/or additions to
fields specified by the ELF spec, and has nothing to do with say, the
contents of the .text section.  Typically, you'll need to change OSABI
if you use any of the various *_LOOS to *_HIOS definitions, or use new
or incompatible relocation types.  Search the binutils list for lots
of discussion on this.  ;-)  One particularly relevant post is
http://sources.redhat.com/ml/binutils/2000-11/msg00383.html

That said, I'm not religiously opposed to the BSD's making
non-standard use of OSABI.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


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