This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Patches to change ELFOSABI_MONTEREY to ELFOSABI_AIX.
- To: Kevin Buettner <kevinb at cygnus dot com>
- Subject: Re: Patches to change ELFOSABI_MONTEREY to ELFOSABI_AIX.
- From: "H . J . Lu" <hjl at valinux dot com>
- Date: Mon, 20 Nov 2000 16:39:40 -0800
- Cc: binutils at sourceware dot cygnus dot com, GDB <gdb at sourceware dot cygnus dot com>
- References: <20001120155917.A15923@valinux.com> <hjl@valinux.com> <1001121002613.ZM18358@ocotillo.lan>
On Mon, Nov 20, 2000 at 05:26:13PM -0700, Kevin Buettner wrote:
> On Nov 20, 3:59pm, H . J . Lu wrote:
>
> > BTW, the EI_OSABI byte is used to tell how to interpret those fields
> > and values which are not defined by gABI nor psABI. It is not to tell
> > on which platform the binary is targeted. [...]
>
> What is the proper method for determining the target platform?
>
> (I know how to do it if it's linked against glibc, but not
> otherwise...)
>
There is no easy way to tell, at least not from the EI_OSABI byte.
That is one reason why glibc did what it did. I was told people thought
about changing EI_OSABI to something else because of the confusion it
might lead to. But they decided against it.
BTW, in the modern world, there should be no static binaries. You can
tell which target a dynamic binary is for by checking PT_INTERP.
--
H.J. Lu (hjl@valinux.com)