svn commit: trunk/uClibc/libc/sysdeps/linux/bfin
bernds at uclibc.org
bernds at uclibc.org
Fri Nov 23 10:05:55 PST 2007
Author: bernds
Date: 2007-11-23 10:05:55 -0800 (Fri, 23 Nov 2007)
New Revision: 20512
Log:
Blackfin crt1.S fixes for building with -msep-data.
Modified:
trunk/uClibc/libc/sysdeps/linux/bfin/crt1.S
Changeset:
Modified: trunk/uClibc/libc/sysdeps/linux/bfin/crt1.S
===================================================================
--- trunk/uClibc/libc/sysdeps/linux/bfin/crt1.S 2007-11-23 18:03:47 UTC (rev 20511)
+++ trunk/uClibc/libc/sysdeps/linux/bfin/crt1.S 2007-11-23 18:05:55 UTC (rev 20512)
@@ -34,8 +34,13 @@
#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
.global __start;
@@ -53,7 +58,7 @@
__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 @@
#ifdef __BFIN_FDPIC__
R3 = [P3 + __init at FUNCDESC_GOT17M4];
-#elif defined __ID_SHARED_LIB__
+#elif defined USE_GOT
P5 = [P5 + _current_shared_library_p5_offset_];
R3 = [P5 + ___shared_flat_init at GOT];
#else
@@ -120,7 +125,7 @@
#ifdef __BFIN_FDPIC__
R3 = [P3 + __fini at FUNCDESC_GOT17M4];
-#elif defined __ID_SHARED_LIB__
+#elif defined USE_GOT
R3 = [P5 + ___shared_flat_fini at GOT];
#else
R3.H = __fini;
@@ -135,13 +140,13 @@
#ifdef __BFIN_FDPIC__
R0 = [P3 + _main at FUNCDESC_GOT17M4];
-#elif defined __ID_SHARED_LIB__
+#elif defined USE_GOT
R0 = [P5 + _main at GOT];
#else
R0.H = _main;
R0.L = _main;
#endif
-#ifdef __ID_SHARED_LIB__
+#ifdef USE_GOT
P0 = [P5 + ___uClibc_main at GOT];
jump (P0)
#else
More information about the uClibc-cvs
mailing list