tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: missing ELF-related constants



i'm updating Android's C library to the current NetBSD exec_elf.h and
notice that although the current version of exec_elf.h ($NetBSD:
exec_elf.h,v 1.129 2013/09/10 16:24:02 matt Exp) includes DT_FLAGS,
it's missing the DF_* constants described here for use with DT_FLAGS:

http://www.sco.com/developers/gabi/latest/ch5.dynamic.html#dynamic_section

(specifically, the Android linker refers to DF_SYMBOLIC and DF_TEXTREL.)

On Tue, Jan 29, 2013 at 4:17 PM, enh <enh%google.com@localhost> 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
>
> #define DT_MIPS_PLTGOT         0x70000032
> #define DT_MIPS_RWPLT          0x70000034
>
> #define DT_PREINIT_ARRAY   32
> #define DT_PREINIT_ARRAYSZ 33
>
> thanks!
>
>   --elliott
>



-- 
Elliott Hughes - http://who/enh - http://jessies.org/~enh/
Java i18n/JNI/NIO, or bionic questions? Mail me/drop by/add me as a reviewer.


Home | Main Index | Thread Index | Old Index