Merge "Fix x86 build, remove void* arithmetic."

This commit is contained in:
Elliott Hughes 2013-02-07 20:27:40 +00:00 committed by Gerrit Code Review
commit f6afd3b670
3 changed files with 5 additions and 2 deletions

View File

@ -28,6 +28,7 @@
#include "../../bionic/libc_init_common.h"
#include <stddef.h>
#include <stdint.h>
__attribute__ ((section (".preinit_array")))
void (*__PREINIT_ARRAY__)(void) = (void (*)(void)) -1;
@ -44,7 +45,7 @@ __LIBC_HIDDEN__ void _start() {
array.init_array = &__INIT_ARRAY__;
array.fini_array = &__FINI_ARRAY__;
void* raw_args = __builtin_frame_address(0) + sizeof(void*);
void* raw_args = (void*) ((uintptr_t) __builtin_frame_address(0) + sizeof(void*));
__libc_init(raw_args, NULL, &main, &array);
}

View File

@ -28,6 +28,7 @@
#include "../../bionic/libc_init_common.h"
#include <stddef.h>
#include <stdint.h>
__attribute__ ((section (".preinit_array")))
void (*__PREINIT_ARRAY__)(void) = (void (*)(void)) -1;
@ -46,7 +47,7 @@ void _start() {
array.init_array = &__INIT_ARRAY__;
array.fini_array = &__FINI_ARRAY__;
void* raw_args = __builtin_frame_address(0) + sizeof(void*);
void* raw_args = (void*) ((uintptr_t) __builtin_frame_address(0) + sizeof(void*));
__libc_init(raw_args, NULL, &main, &array);
}

View File

@ -26,6 +26,7 @@
* SUCH DAMAGE.
*/
#include <stdint.h>
#include <sys/cdefs.h>
extern unsigned __linker_init(void* raw_args);