diff options
author | Bernd Schmidt <bernds_cb1@t-online.de> | 2007-11-23 18:05:55 +0000 |
---|---|---|
committer | Bernd Schmidt <bernds_cb1@t-online.de> | 2007-11-23 18:05:55 +0000 |
commit | 866a0745f5ababedee1e2964ca0acee2929d2925 (patch) | |
tree | f2a042e875422aeb7c79c14c5feaa13ea74d255b /libc/sysdeps/linux/bfin | |
parent | 993821a6b5991c8650ad8686f2c2dfe4af7b9f46 (diff) |
Blackfin crt1.S fixes for building with -msep-data.
Diffstat (limited to 'libc/sysdeps/linux/bfin')
-rw-r--r-- | libc/sysdeps/linux/bfin/crt1.S | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/libc/sysdeps/linux/bfin/crt1.S b/libc/sysdeps/linux/bfin/crt1.S index 156654437..38e68c9ac 100644 --- a/libc/sysdeps/linux/bfin/crt1.S +++ b/libc/sysdeps/linux/bfin/crt1.S @@ -34,7 +34,12 @@ Cambridge, MA 02139, USA. */ #include <features.h> -#ifndef L_Scrt1 +#undef USE_GOT +#if defined (__UCLIBC_FORMAT_SHARED_FLAT__) || defined (__UCLIBC_FORMAT_FLAT_SEP_DATA__) +#define USE_GOT +#endif + +#if !(defined L_Scrt1 && defined __UCLIBC_FORMAT_SHARED_FLAT__) .text .align 2 @@ -53,7 +58,7 @@ Cambridge, MA 02139, USA. */ __start: -#if defined(__BFIN_FDPIC__) && !defined(__pie__) +#if defined(__BFIN_FDPIC__) && !defined(L_Scrt1) /* P0 contains a pointer to the program's load map. */ call .Lcall; .Lcall: @@ -108,7 +113,7 @@ __start: #ifdef __BFIN_FDPIC__ R3 = [P3 + __init@FUNCDESC_GOT17M4]; -#elif defined __ID_SHARED_LIB__ +#elif defined USE_GOT P5 = [P5 + _current_shared_library_p5_offset_]; R3 = [P5 + ___shared_flat_init@GOT]; #else @@ -120,7 +125,7 @@ __start: #ifdef __BFIN_FDPIC__ R3 = [P3 + __fini@FUNCDESC_GOT17M4]; -#elif defined __ID_SHARED_LIB__ +#elif defined USE_GOT R3 = [P5 + ___shared_flat_fini@GOT]; #else R3.H = __fini; @@ -135,13 +140,13 @@ __start: #ifdef __BFIN_FDPIC__ R0 = [P3 + _main@FUNCDESC_GOT17M4]; -#elif defined __ID_SHARED_LIB__ +#elif defined USE_GOT R0 = [P5 + _main@GOT]; #else R0.H = _main; R0.L = _main; #endif -#ifdef __ID_SHARED_LIB__ +#ifdef USE_GOT P0 = [P5 + ___uClibc_main@GOT]; jump (P0) #else |