OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [uClibc/] [ldso/] [ldso/] [sh64/] [boot1_arch.h] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1325 phoenix
/* Any assmbly language/system dependent hacks needed to setup boot1.c so it
2
 * will work as expected and cope with whatever platform specific wierdness is
3
 * needed for this architecture.
4
 */
5
 
6
asm("" \
7
"       .section .text..SHmedia32,\"ax\"\n"                             \
8
"       .globl _dl_boot\n"                                              \
9
"       .type _dl_boot, @function\n"                                    \
10
"       .align 5\n"                                                     \
11
"_dl_boot:\n"                                                           \
12
"       ! Set r12 to point to GOT\n"                                    \
13
"       movi    (((datalabel _GLOBAL_OFFSET_TABLE_-(.LZZZ3-.)) >> 16) & 65535), r12\n"  \
14
"       shori   ((datalabel _GLOBAL_OFFSET_TABLE_-(.LZZZ3-.)) & 65535), r12\n"          \
15
".LZZZ3:\n"                                                             \
16
"       ptrel/u r12, tr0\n"                                             \
17
"       gettr   tr0, r12        ! GOT address\n"                        \
18
"       add     r18, r63, r11   ! save return address - needed?\n"      \
19
"       add     r15, r63, r2    ! arg = stack pointer\n"                \
20
"       pt      _dl_boot2, tr0  ! should work even if PIC\n"            \
21
"       blink   tr0, r18        ! call _dl_boot2 - user EP is in r2\n"  \
22
);
23
 
24
#define _dl_boot _dl_boot2
25
#define LD_BOOT(X)   static void * __attribute__ ((unused)) _dl_boot (X)

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.