History log of /bionic/libc/arch-arm/bionic/crtbegin.c
Revision Date Author Comments
646e058136d59671d5d32d93bedbb71004a9ce73 07-Feb-2013 Elliott Hughes <enh@google.com> Fix x86 build, remove void* arithmetic.

Change-Id: Idc7f14af2e094ac33de315e808176237af063bb8
42b2c6a5eed5e4ef35315b8cd32d1355f12a69b6 07-Feb-2013 Elliott Hughes <enh@google.com> Clean up the argc/argv/envp/auxv handling.

There's now only one place where we deal with this stuff, it only needs to
be parsed once by the dynamic linker (rather than by each recipient), and it's
now easier for us to get hold of auxv data early on.

Change-Id: I6314224257c736547aac2e2a650e66f2ea53bef5
0a150ead18019c0e4e59417ae3c5e8e0d7d2e4f4 21-Aug-2012 Ard Biesheuvel <ard.biesheuvel@gmail.com> libc: remove ctors/dtors sections

None of the supported ARCHs actually populate these sections,
so there is no point in keeping them in the binaries.

Change-Id: I21a364f510118ac1114e1b49c53ec8c895c6bc6b
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@gmail.com>
9d40326830c2bd407427889c554adeb915ee6b4a 31-May-2012 Nick Kralevich <nnk@google.com> arm: rewrite crtbegin* as C files.

Rewrite
crtbegin.S -> crtbegin.c
crtbegin_so.S -> crtbegin_so.c

This change allows us to generate PIC code without relying
on text relocations.

As a consequence of this rewrite, also rewrite
__dso_handle.S -> __dso_handle.c
__dso_handle_so.S -> __dso_handle_so.c
atexit.S -> atexit.c

In crtbegin.c _start, place the __PREINIT_ARRAY__, __INIT_ARRAY__,
__FINI_ARRAY__, and __CTOR_LIST__ variables onto the stack, instead of
passing a pointer to the text section of the binary.

This change appears sorta wonky, as I attempted to preserve,
as much as possible, the structure of the original assembly.
As a result, you have C files including other C files, and other
programming uglyness.

Result: This change reduces the number of files with text-relocations
from 315 to 19 on my Android build.

Before:
$ scanelf -aR $OUT/system | grep TEXTREL | wc -l
315

After:
$ scanelf -aR $OUT/system | grep TEXTREL | wc -l
19

Change-Id: Ib9f98107c0eeabcb606e1ddc7ed7fc4eba01c9c4