Bläddra i källkod

Updated for the CRIS port.

Tobias Anderberg 22 år sedan
förälder
incheckning
37184f99f8
2 ändrade filer med 6 tillägg och 0 borttagningar
  1. 4 0
      ldso/ldso/Makefile
  2. 2 0
      ldso/ldso/ldso.c

+ 4 - 0
ldso/ldso/Makefile

@@ -73,6 +73,10 @@ ASRC=$(shell ls $(TARGET_ARCH)/*.S)
 AOBJS=$(patsubst %.S,%.o, $(ASRC))
 OBJS=$(AOBJS) $(COBJS)
 
+ifeq ($(strip $(TARGET_ARCH)),cris)
+LDFLAGS+=-mcrislinux
+endif
+
 ifneq ($(strip $(DODEBUG)),true)
 LDFLAGS+=-s
 endif

+ 2 - 0
ldso/ldso/ldso.c

@@ -310,6 +310,8 @@ LD_BOOT(unsigned long args)
 "	   .balign  4"
 "1:	   .long    _GLOBAL_OFFSET_TABLE_"
 "2:" : "=r" (got) : : "r0");
+#elif defined(__cris__)
+  __asm__("\tmove.d $pc,%0\n\tsub.d .:GOTOFF,%0\n\t":"=r"(got));
 #else
 	/* Do things the slow way in C */
 	{