Commit 4af990cd by Bernd Schmidt Committed by Bernd Schmidt

bfin.h (TARGET_CPU_CPP_BUILTINS): If TARGET_ID_SHARED_LIBRARY, define __ID_SHARED_LIB__.

	* config/bfin/bfin.h (TARGET_CPU_CPP_BUILTINS): If
	TARGET_ID_SHARED_LIBRARY, define __ID_SHARED_LIB__.
	* config/bfin/crti.S: Use it instead of __PIC__.
	* config/bfin/crtn.S: Likewise.

From-SVN: r112006
parent a94aa272
...@@ -2,6 +2,10 @@ ...@@ -2,6 +2,10 @@
* config/bfin/lib1funcs.asm (___umodsi3): Use stack to save contents * config/bfin/lib1funcs.asm (___umodsi3): Use stack to save contents
of RETS. of RETS.
* config/bfin/bfin.h (TARGET_CPU_CPP_BUILTINS): If
TARGET_ID_SHARED_LIBRARY, define __ID_SHARED_LIB__.
* config/bfin/crti.S: Use it instead of __PIC__.
* config/bfin/crtn.S: Likewise.
2006-03-13 Eric Botcazou <ebotcazou@adacore.com> 2006-03-13 Eric Botcazou <ebotcazou@adacore.com>
......
...@@ -41,6 +41,8 @@ extern int target_flags; ...@@ -41,6 +41,8 @@ extern int target_flags;
{ \ { \
builtin_define ("bfin"); \ builtin_define ("bfin"); \
builtin_define ("BFIN"); \ builtin_define ("BFIN"); \
if (TARGET_ID_SHARED_LIBRARY) \
builtin_define ("__ID_SHARED_LIB__"); \
} \ } \
while (0) while (0)
#endif #endif
......
...@@ -38,21 +38,21 @@ Boston, MA 02110-1301, USA. */ ...@@ -38,21 +38,21 @@ Boston, MA 02110-1301, USA. */
.globl __init .globl __init
.type __init,@function .type __init,@function
__init: __init:
#if defined __PIC__ #if defined __ID_SHARED_LIB__
[--SP] = P5; [--SP] = P5;
#endif #endif
LINK 12; LINK 12;
#if defined __PIC__ #if defined __ID_SHARED_LIB__
P5 = [P5 + _current_shared_library_p5_offset_] P5 = [P5 + _current_shared_library_p5_offset_]
#endif #endif
.section .fini .section .fini
.globl __fini .globl __fini
.type __fini,@function .type __fini,@function
__fini: __fini:
#if defined __PIC__ #if defined __ID_SHARED_LIB__
[--SP] = P5; [--SP] = P5;
#endif #endif
LINK 12; LINK 12;
#if defined __PIC__ #if defined __ID_SHARED_LIB__
P5 = [P5 + _current_shared_library_p5_offset_] P5 = [P5 + _current_shared_library_p5_offset_]
#endif #endif
...@@ -36,14 +36,14 @@ Boston, MA 02110-1301, USA. */ ...@@ -36,14 +36,14 @@ Boston, MA 02110-1301, USA. */
.section .init .section .init
unlink; unlink;
#if defined __PIC__ #if defined __ID_SHARED_LIB__
P5 = [SP++]; P5 = [SP++];
#endif #endif
rts; rts;
.section .fini .section .fini
unlink; unlink;
#if defined __PIC__ #if defined __ID_SHARED_LIB__
P5 = [SP++]; P5 = [SP++];
#endif #endif
rts; rts;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment