From 70709408336e483de74947eb53e9ba01ef4ab140 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Tue, 10 Feb 2004 09:26:57 +0000 Subject: Rework file naming, aiming for at least a vague level of consistancy --- ldso/ldso/cris/boot1_arch.h | 16 ------- ldso/ldso/cris/dl-sysdep.h | 2 +- ldso/ldso/cris/ld_syscalls.h | 7 --- ldso/ldso/cris/ld_sysdep.h | 112 ------------------------------------------- 4 files changed, 1 insertion(+), 136 deletions(-) delete mode 100644 ldso/ldso/cris/boot1_arch.h delete mode 100644 ldso/ldso/cris/ld_syscalls.h delete mode 100644 ldso/ldso/cris/ld_sysdep.h (limited to 'ldso/ldso/cris') diff --git a/ldso/ldso/cris/boot1_arch.h b/ldso/ldso/cris/boot1_arch.h deleted file mode 100644 index bf7714539..000000000 --- a/ldso/ldso/cris/boot1_arch.h +++ /dev/null @@ -1,16 +0,0 @@ -/* - * This code fix the stack pointer so that the dynamic linker - * can find argc, argv and auxvt (Auxillary Vector Table). - */ -asm("" \ -" .text\n" \ -" .globl _dl_boot\n" \ -" .type _dl_boot,@function\n" \ -"_dl_boot:\n" \ -" move.d $sp,$r10\n" \ -" move.d $pc,$r9\n" \ -" add.d _dl_boot2 - ., $r9\n" \ -" jsr $r9\n" \ -); - -#define DL_BOOT(X) static void __attribute__ ((unused)) _dl_boot2 (X) diff --git a/ldso/ldso/cris/dl-sysdep.h b/ldso/ldso/cris/dl-sysdep.h index c127076ff..7066863f6 100644 --- a/ldso/ldso/cris/dl-sysdep.h +++ b/ldso/ldso/cris/dl-sysdep.h @@ -66,7 +66,7 @@ struct elf_resolve; extern unsigned long _dl_linux_resolver(struct elf_resolve *tpnt, int reloc_entry); -/* Cheap modulo implementation, taken from arm/ld_sysdep.h. */ +/* Cheap modulo implementation, taken from arm/dl-sysdep.h. */ static inline unsigned long cris_mod(unsigned long m, unsigned long p) { diff --git a/ldso/ldso/cris/ld_syscalls.h b/ldso/ldso/cris/ld_syscalls.h deleted file mode 100644 index 651280c18..000000000 --- a/ldso/ldso/cris/ld_syscalls.h +++ /dev/null @@ -1,7 +0,0 @@ -/* - * Define the __set_errno macro as nothing so that INLINE_SYSCALL - * won't set errno, which is important since we make system calls - * before the errno symbol is dynamicly linked. - */ -#define __set_errno(X) {(void)(X);} -#include "sys/syscall.h" diff --git a/ldso/ldso/cris/ld_sysdep.h b/ldso/ldso/cris/ld_sysdep.h deleted file mode 100644 index c127076ff..000000000 --- a/ldso/ldso/cris/ld_sysdep.h +++ /dev/null @@ -1,112 +0,0 @@ -/* CRIS can never use Elf32_Rel relocations. */ -#define ELF_USES_RELOCA - -/* - * Get a pointer to the argv array. On many platforms this can be just - * the address if the first argument, on other platforms we need to - * do something a little more subtle here. - */ -#define GET_ARGV(ARGVP, ARGS) ARGVP = ((unsigned long *) ARGS) - -/* - * Initialization sequence for a GOT. - */ -#define INIT_GOT(GOT_BASE,MODULE) \ -{ \ - GOT_BASE[1] = (unsigned long) MODULE; \ - GOT_BASE[2] = (unsigned long) _dl_linux_resolve; \ -} - -/* - * Here is a macro to perform a relocation. This is only used when - * bootstrapping the dynamic loader. RELP is the relocation that we - * are performing, REL is the pointer to the address we are relocating. - * SYMBOL is the symbol involved in the relocation, and LOAD is the - * load address. - */ -#define PERFORM_BOOTSTRAP_RELOC(RELP, REL, SYMBOL, LOAD, SYMTAB) \ - switch (ELF32_R_TYPE((RELP)->r_info)) { \ - case R_CRIS_GLOB_DAT: \ - case R_CRIS_JUMP_SLOT: \ - case R_CRIS_32: \ - *REL = SYMBOL; \ - break; \ - case R_CRIS_16_PCREL: \ - *(short *) *REL = SYMBOL + (RELP)->r_addend - *REL - 2; \ - break; \ - case R_CRIS_32_PCREL: \ - *REL = SYMBOL + (RELP)->r_addend - *REL - 4; \ - break; \ - case R_CRIS_NONE: \ - break; \ - case R_CRIS_RELATIVE: \ - *REL = (unsigned long) LOAD + (RELP)->r_addend; \ - break; \ - default: \ - _dl_exit(1); \ - break; \ - } - -/* - * Transfer control to the user's application once the dynamic loader - * is done. This routine has to exit the current function, then call - * _dl_elf_main. - */ -#define START() __asm__ volatile ("moveq 0,$r8\n\t" \ - "move $r8,$srp\n\t" \ - "move.d %1,$sp\n\t" \ - "jump %0\n\t" \ - : : "r" (_dl_elf_main), "r" (args)) - -/* Defined some magic numbers that this ld.so should accept. */ -#define MAGIC1 EM_CRIS -#undef MAGIC2 -#define ELF_TARGET "CRIS" - -struct elf_resolve; -extern unsigned long _dl_linux_resolver(struct elf_resolve *tpnt, int reloc_entry); - -/* Cheap modulo implementation, taken from arm/ld_sysdep.h. */ -static inline unsigned long -cris_mod(unsigned long m, unsigned long p) -{ - unsigned long i, t, inc; - - i = p; - t = 0; - - while (!(i & (1 << 31))) { - i <<= 1; - t++; - } - - t--; - - for (inc = t; inc > 2; inc--) { - i = p << inc; - - if (i & (1 << 31)) - break; - - while (m >= i) { - m -= i; - i <<= 1; - if (i & (1 << 31)) - break; - if (i < p) - break; - } - } - - while (m >= p) - m -= p; - - return m; -} - -#define do_rem(result, n, base) result = cris_mod(n, base); - -/* 8192 bytes alignment */ -#define PAGE_ALIGN 0xffffe000 -#define ADDR_ALIGN 0x1fff -#define OFFS_ALIGN 0xffffe000 -- cgit v1.2.3