]> rtime.felk.cvut.cz Git - jailhouse.git/commitdiff
inmates: Define entry point in linker script
authorJan Kiszka <jan.kiszka@siemens.com>
Sat, 9 May 2015 14:51:34 +0000 (16:51 +0200)
committerJan Kiszka <jan.kiszka@siemens.com>
Fri, 15 May 2015 07:14:00 +0000 (09:14 +0200)
Export the reset address as symbols and define them as entry point of
our inmates in the linker scripts. We will bundle the headers together
with the other library objects in archives, and defining entry points
will ensure that the related sections will be included in the final
binary. This will simplify the inmate rules significantly.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
inmates/lib/arm/header.S
inmates/lib/arm/inmate.lds
inmates/lib/x86/header-32.S
inmates/lib/x86/header.S
inmates/lib/x86/inmate.lds

index 9a6c5db2b9b109fdb6d45c6ef5225db28813dca7..b8501e4421165a2516e5e69be101822d856db6c1 100644 (file)
@@ -14,7 +14,7 @@
        .section ".boot", "ax"
        .align 5
 vectors:
-       b       vector_reset
+       b       __reset_entry
        b       vector_undef
        b       vector_svc
        b       vector_pabt
@@ -36,7 +36,8 @@ vectors:
        vector irq
        vector fiq
 
-vector_reset:
+       .globl __reset_entry
+__reset_entry:
        ldr     r0, =vectors
        mcr     p15, 0, r0, c12, c0, 0  @ VBAR
 
index 31f6b13713ab68a26574b3473c612bd18195da68..c5d82c21a0eafb16ce0e7bf201887d4d5445935d 100644 (file)
@@ -36,3 +36,5 @@ SECTIONS {
                *(.data)
        }
 }
+
+ENTRY(__reset_entry)
index 952619e85a00a8d1ea844e67e04995a0e745ea2e..6f704f9d32aaf0769249515b007a051a504d3b38 100644 (file)
@@ -24,6 +24,8 @@
        .code16
        .section ".boot", "ax"
 
+       .globl __reset_entry
+__reset_entry:
        ljmp $0xf000,$start16
 
 
index 6eb8e497030d215867d7fafd8bad131a505eef5a..b178dc1a07fb7e64276f42f497b77a6a9bb6467d 100644 (file)
@@ -27,6 +27,8 @@
        .code16
        .section ".boot", "ax"
 
+       .globl __reset_entry
+__reset_entry:
        ljmp $0xf000,$start16
 
 
index afd93758a69f723522b8fbb12308229c333b6075..4e4a506c08148b5dd6f2e77e7b9b3ae0537aedf9 100644 (file)
@@ -61,3 +61,5 @@ SECTIONS
                *(.eh_frame*)
        }
 }
+
+ENTRY(__reset_entry)