__PIC__ is defined.
* config/bfin/crtn.s: Change epilogues to match.
* config/bfin/t-bfin-elf (EXTRA_MULTILIB_PARTS): Define.
* config/bfin/bfin.h (TARGET_CPU_CPP_BUILTINS): If flag_pic, define
__PIC__ and __pic__.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@107083
138bc75d-0d04-0410-961f-
82ee72b054a4
+2005-11-16 Bernd Schmidt <bernd.schmidt@analog.com>
+
+ * config/bfin/crti.s (__init, __fini): Use appropriate prologue if
+ __PIC__ is defined.
+ * config/bfin/crtn.s: Change epilogues to match.
+ * config/bfin/t-bfin-elf (EXTRA_MULTILIB_PARTS): Define.
+ * config/bfin/bfin.h (TARGET_CPU_CPP_BUILTINS): If flag_pic, define
+ __PIC__ and __pic__.
+
2005-11-16 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
PR 24357
{ \
builtin_define ("bfin"); \
builtin_define ("BFIN"); \
+ if (flag_pic) \
+ { \
+ builtin_define ("__PIC__"); \
+ builtin_define ("__pic__"); \
+ } \
} \
while (0)
#endif
.globl __init
.type __init,@function
__init:
- LINK 0;
-
+#if defined __PIC__
+ [--SP] = P5;
+#endif
+ LINK 12;
+#if defined __PIC__
+ P5 = [P5 + _current_shared_library_p5_offset_]
+#endif
.section .fini
.globl __fini
.type __fini,@function
__fini:
- LINK 0;
+#if defined __PIC__
+ [--SP] = P5;
+#endif
+ LINK 12;
+#if defined __PIC__
+ P5 = [P5 + _current_shared_library_p5_offset_]
+#endif
.section .init
unlink;
+#if defined __PIC__
+ P5 = [SP++];
+#endif
rts;
.section .fini
unlink;
+#if defined __PIC__
+ P5 = [SP++];
+#endif
rts;
$(T)crtn.o: $(srcdir)/config/bfin/crtn.s $(GCC_PASSES)
$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \
-c -o $(T)crtn.o -x assembler-with-cpp $(srcdir)/config/bfin/crtn.s
+
+EXTRA_MULTILIB_PARTS= crtbegin.o crtend.o crti.o crtn.o