Go to file
Nick Kralevich 9d40326830 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
2012-06-01 14:41:27 -07:00
libc arm: rewrite crtbegin* as C files. 2012-06-01 14:41:27 -07:00
libdl Remove the last references to SuperH. 2012-05-15 17:08:41 -07:00
libm Remove the last references to SuperH. 2012-05-15 17:08:41 -07:00
libstdc++ resolved conflicts for merge of 35d592cc to master 2012-04-16 14:40:26 -07:00
libthread_db MIPS support to libm, libdl and libthread_db 2012-05-04 11:34:40 -07:00
linker Use mmap to read an initial ELF header of library 2012-05-26 06:15:50 +09:00
.gitignore Merge memory checking functionality from sandbox 2010-02-16 11:43:18 -08:00
Android.mk Remove the simulator target from all makefiles. 2011-07-11 22:11:41 -07:00
CleanSpec.mk Add an empty CleanSpec.mk 2010-03-08 18:04:02 -08:00
ThirdPartyProject.prop add meta-files about 3rd party projects 2010-07-16 11:41:33 -07:00