[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Fwd: missing ELF-related constants
---------- Forwarded message ----------
From: enh <enh%google.com@localhost>
Date: Thu, Jan 31, 2013 at 1:19 PM
Subject: Re: missing ELF-related constants
To: Matt Thomas <matt%3am-software.com@localhost>
On Tue, Jan 29, 2013 at 5:01 PM, Matt Thomas <matt%3am-software.com@localhost>
> On Jan 29, 2013, at 4:17 PM, enh wrote:
> > i just switched bionic (the Android C library) over to the NetBSD
> > <sys/exec_elf.h> from the existing mishmash of OpenBSD files and Linux
> > kernel header files.
> > the NetBSD headers appear to be a superset, but they're still missing
> > some constants that are in the specification...
> > a couple of architecture-independent constants are missing from
> > exec_elf.h: DT_PREINIT_ARRAY, DT_PREINIT_ARRAYSZ (see figure 5-10 of
> > http://www.sco.com/developers/gabi/latest/ch5.dynamic.html#dynamic_section)
> > three MIPS-specific constants are missing from elf_machdep.h:
> > R_MIPS_JUMP_SLOT, DT_MIPS_PLTGOT, DT_MIPS_RWPLT (see
> > http://sourceware.org/ml/binutils/2008-07/msg00008.html).
> > these constants can all be found in the (BSD licensed)
> > bionic/linker/linker.h file:
> > #define R_MIPS_JUMP_SLOT 127
> Hmmm. Linux switched away from ABICALLS?
no. but Linux on MIPS supports an alternative. (not used on Android.)
> > #define DT_MIPS_PLTGOT 0x70000032
> That looks reasonable.
> > #define DT_MIPS_RWPLT 0x70000034
> Why would you ever want a writable PLT? I moved ppc from their PLT in bss
> to the readonly secure-plt. A writeable PLT is just a bad idea which is why
> powerpc moved away from it.
this is how MIPS implements non-PIC code.
if we were to remove everything tasteless from all header files, we'd have
much smaller header files. but they'd be a much less complete description of
the world as it actually is :-)
> > #define DT_PREINIT_ARRAY 32
> > #define DT_PREINIT_ARRAYSZ 33
> Those are OK too.
these two are the only two i absolutely need.
Main Index |
Thread Index |