summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoakim Tjernlund <joakim.tjernlund@transmode.se>2005-03-17 22:54:48 +0000
committerJoakim Tjernlund <joakim.tjernlund@transmode.se>2005-03-17 22:54:48 +0000
commit462d544629128dec0094ffea1275d62e9581934d (patch)
treefbcb496d986fd28c587712c56069d8ebdcd61726
parent3e8b9f4203c2f15c9fbfdb6e6305fae428edb73d (diff)
Fix ldso for MIPS.
-rw-r--r--ldso/ldso/Makefile2
-rw-r--r--ldso/ldso/mips/dl-startup.h70
2 files changed, 1 insertions, 71 deletions
diff --git a/ldso/ldso/Makefile b/ldso/ldso/Makefile
index 1ba79329d..0e4709aa9 100644
--- a/ldso/ldso/Makefile
+++ b/ldso/ldso/Makefile
@@ -43,7 +43,7 @@ XXFLAGS+= $(XARCH_CFLAGS) $(CPU_CFLAGS) $(PICFLAG) \
# BEWARE!!! At least mips* will die if -O0 is used!!!
XXFLAGS:=$(XXFLAGS:-O0=-O1)
XXFLAGS+=-isystem $(shell $(CC) -print-file-name=include)
-LDFLAGS=$(CPU_LDFLAGS-y) -z now -Bsymbolic -shared --warn-common --export-dynamic --sort-common \
+LDFLAGS=$(CPU_LDFLAGS-y) -e _start -z now -Bsymbolic -shared --warn-common --export-dynamic --sort-common \
-z combreloc --discard-locals --discard-all --no-undefined
ifeq ($(UCLIBC_BUILD_RELRO),y)
LDFLAGS+=-z relro
diff --git a/ldso/ldso/mips/dl-startup.h b/ldso/ldso/mips/dl-startup.h
index b6cfaee1c..0e9cb1856 100644
--- a/ldso/ldso/mips/dl-startup.h
+++ b/ldso/ldso/mips/dl-startup.h
@@ -4,7 +4,6 @@
* Copyright (C) 2005 by Joakim Tjernlund
*/
-#if 0
asm(""
" .text\n"
" .globl _start\n"
@@ -27,75 +26,6 @@ asm(""
" la $25, _dl_start\n"
" addu $25, $8\n"
" jalr $25\n"
- " lw $4, 0($29)\n"
- " la $5, 4($29)\n"
- " sll $6, $4, 2\n"
- " addu $6, $6, $5\n"
- " addu $6, $6, 4\n"
- " la $7, _dl_elf_main\n"
- " lw $25, 0($7)\n"
- " jr $25\n"
- " .size _start,.-_start\n"
- " .previous\n"
-);
-#endif
-#if 0
-asm(""
- " .text\n"
- " .globl _start\n"
- " .type _start,@function\n"
- "_start:\n"
- " .set noreorder\n"
- " bltzal $0, 0f\n"
- " nop\n"
- "0: .cpload $31\n"
- " .set reorder\n"
- " la $4, _DYNAMIC\n"
- " sw $4, -0x7ff0($28)\n"
- " move $4, $29\n"
- " la $8, coff\n"
- " .set noreorder\n"
- " bltzal $0, coff\n"
- " nop\n"
- "coff: subu $8, $31, $8\n"
- " .set reorder\n"
- " la $25, _dl_start\n"
- " addu $25, $8\n"
- " jalr $25\n"
- " move $17, $2\n"
- " lw $4, 0($29)\n"
- " la $5, 4($29)\n"
- " sll $6, $4, 2\n"
- " addu $6, $6, $5\n"
- " addu $6, $6, 4\n"
- " move $25, $17\n"
- " jr $25\n"
- " .size _start,.-_start\n"
- " .previous\n"
-);
-#endif
-asm(""
- " .text\n"
- " .globl _start\n"
- " .type _start,@function\n"
- "_start:\n"
- " .set noreorder\n"
- " bltzal $0, 0f\n"
- " nop\n"
- "0: .cpload $31\n"
- " .set reorder\n"
- " la $4, _DYNAMIC\n"
- " sw $4, -0x7ff0($28)\n"
- " move $4, $29\n"
- " subu $29, 16\n"
- " la $8, coff\n"
- " .set noreorder\n"
- " bltzal $8, coff\n"
- "coff: subu $8, $31, $8\n"
- " .set reorder\n"
- " la $25, _dl_start\n"
- " addu $25, $8\n"
- " jalr $25\n"
" move $17, $2\n"
" lw $4, 0($29)\n"
" la $5, 4($29)\n"