ARM/runtime_loader: add stub to make it compile

This commit is contained in:
Ithamar R. Adema 2012-11-22 15:44:20 +01:00
parent b190a54c40
commit 2beda3bb5b
3 changed files with 116 additions and 0 deletions

View File

@ -0,0 +1,68 @@
OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
OUTPUT_ARCH(arm)
ENTRY(runtime_loader)
SEARCH_DIR("libgcc");
SECTIONS
{
. = 0x00100000 + SIZEOF_HEADERS;
.interp : { *(.interp) }
.hash : { *(.hash) }
.dynsym : { *(.dynsym) }
.dynstr : { *(.dynstr) }
.rel.text : { *(.rel.text) *(.rel.gnu.linkonce.t*) }
.rela.text : { *(.rela.text) *(.rela.gnu.linkonce.t*) }
.rel.data : { *(.rel.data) *(.rel.gnu.linkonce.d*) }
.rela.data : { *(.rela.data) *(.rela.gnu.linkonce.d*) }
.rel.rodata : { *(.rel.rodata) *(.rel.gnu.linkonce.r*) }
.rela.rodata : { *(.rela.rodata) *(.rela.gnu.linkonce.r*) }
.rel.got : { *(.rel.got) }
.rela.got : { *(.rela.got) }
.rel.ctors : { *(.rel.ctors) }
.rela.ctors : { *(.rela.ctors) }
.rel.dtors : { *(.rel.dtors) }
.rela.dtors : { *(.rela.dtors) }
.rel.init : { *(.rel.init) }
.rela.init : { *(.rela.init) }
.rel.fini : { *(.rel.fini) }
.rela.fini : { *(.rela.fini) }
.rel.bss : { *(.rel.bss) }
.rela.bss : { *(.rela.bss) }
.rel.plt : { *(.rel.plt) }
.rela.plt : { *(.rela.plt) }
.init : { *(.init) } =0x9090
.plt : { *(.plt) }
/* text/read-only data */
.text : { *(.text .gnu.linkonce.t.*) }
.rodata : { *(.rodata) }
/* exception unwinding - should really not be needed! XXX: find the correct place. */
__exidx_start = .;
.ARM.exidx : { *(.ARM.exidx* .gnu.linkonce.armexidx.*) }
__exidx_end = .;
/* writable data */
. = ALIGN(0x1000) + (. & (0x1000 - 1));
__data_start = .;
PROVIDE(_data_start = .);
.data : { *(.data .gnu.linkonce.d.*) }
__ctor_list = .;
PROVIDE (_ctor_list = .);
.ctors : { *(.ctors) }
PROVIDE (__ctor_end = .);
/* uninitialized data (in same segment as writable data) */
PROVIDE (__bss_start = .);
.bss : { *(.bss) }
. = ALIGN(0x1000);
PROVIDE (_end = .);
/* Strip unnecessary stuff */
/DISCARD/ : { *(.comment .note .eh_frame .dtors) }
}

View File

@ -0,0 +1,16 @@
SubDir HAIKU_TOP src system runtime_loader arch arm ;
UsePrivateHeaders runtime_loader ;
UsePrivateSystemHeaders ;
SubDirHdrs [ FDirName $(SUBDIR) $(DOTDOT) $(DOTDOT) ] ;
StaticLibrary libruntime_loader_$(TARGET_ARCH).a :
arch_relocate.cpp
:
<src!system!libroot!os!arch!$(TARGET_ARCH)>atomic.o
<src!system!libroot!os!arch!$(TARGET_ARCH)>thread.o
<src!system!libroot!posix!string!arch!$(TARGET_ARCH)>arch_string.o
<src!system!libroot!posix!string!arch!$(TARGET_ARCH)>memset.o
;

View File

@ -0,0 +1,32 @@
/*
* Copyright 2012, Haiku, Inc.
* Distributed under the terms of the MIT License.
*
* Authors:
* Ithamar R. Adema <ithamar@upgrade-android.com>
*/
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include "runtime_loader_private.h"
#include <runtime_loader.h>
//#define TRACE_RLD
#ifdef TRACE_RLD
# define TRACE(x) dprintf x
#else
# define TRACE(x) ;
#endif
void *__dso_handle;
status_t
arch_relocate_image(image_t *rootImage, image_t *image,
SymbolLookupCache* cache)
{
debugger("arch_relocate_image: Not Yet Implemented!");
return B_OK;
}