Fix bitcode support for kernel
This commit is contained in:
		
							parent
							
								
									5f8eb6fb0c
								
							
						
					
					
						commit
						5f5dcc545f
					
				| @ -24,9 +24,9 @@ SECTIONS | ||||
| 	. += _kern_offset; | ||||
| 
 | ||||
| 	. = ALIGN(4096); usermapped_start = .; | ||||
| 	.usermapped_glo : AT(ADDR(.usermapped_glo) - _kern_offset) { usermapped_glo*.o(*) } | ||||
| 	.usermapped_glo : AT(ADDR(.usermapped_glo) - _kern_offset) { *(.usermapped_glo) } | ||||
| 	. = ALIGN(4096); usermapped_nonglo_start = .; | ||||
| 	.usermapped : AT(ADDR(.usermapped) - _kern_offset) { usermapped_*.o(*) } | ||||
| 	.usermapped : AT(ADDR(.usermapped) - _kern_offset) { *(.usermapped) } | ||||
| 	. = ALIGN(4096); usermapped_end = .; | ||||
| 	.text             : AT(ADDR(.text) - _kern_offset) { *(.text*) } | ||||
| 	_etext = .; | ||||
| @ -47,5 +47,4 @@ SECTIONS | ||||
|        { | ||||
|                *(.ARM.exidx*) | ||||
|        } | ||||
| 
 | ||||
| } | ||||
|  | ||||
| @ -16,15 +16,15 @@ SECTIONS | ||||
| 
 | ||||
| 	.unpaged_text : { unpaged_*.o(.text) } | ||||
| 	.unpaged_data ALIGN(4096) : { unpaged_*.o(.data .rodata*) } | ||||
| 	.unpaged_bss  ALIGN(4096) : { unpaged_*.o(.bss COMMON) }  | ||||
| 	.unpaged_bss  ALIGN(4096) : { unpaged_*.o(.bss COMMON) } | ||||
| 	__k_unpaged__kern_unpaged_end = .; | ||||
| 
 | ||||
| 	. += _kern_offset; | ||||
| 
 | ||||
| 	. = ALIGN(4096); usermapped_start = .; | ||||
| 	.usermapped_glo : AT(ADDR(.usermapped_glo) - _kern_offset) { usermapped_glo*.o(*) } | ||||
| 	.usermapped_glo : AT(ADDR(.usermapped_glo) - _kern_offset) { *(.usermapped_glo) } | ||||
| 	. = ALIGN(4096); usermapped_nonglo_start = .; | ||||
| 	.usermapped : AT(ADDR(.usermapped) - _kern_offset) { usermapped_*.o(*) } | ||||
| 	.usermapped : AT(ADDR(.usermapped) - _kern_offset) { *(.usermapped) } | ||||
| 	. = ALIGN(4096); usermapped_end = .; | ||||
| 	.text             : AT(ADDR(.text) - _kern_offset) { *(.text*) } | ||||
| 	.data ALIGN(4096) : AT(ADDR(.data) - _kern_offset) { *(.data .rodata* ) } | ||||
|  | ||||
| @ -1,7 +1,7 @@ | ||||
| #include "kernel/kernel.h" | ||||
| #include "arch_proto.h" | ||||
| 
 | ||||
| struct minix_ipcvecs minix_ipcvecs_softint = { | ||||
| struct minix_ipcvecs minix_ipcvecs_softint __section(".usermapped") = { | ||||
| 	.send		= usermapped_send_softint, | ||||
| 	.receive	= usermapped_receive_softint, | ||||
| 	.sendrec	= usermapped_sendrec_softint, | ||||
| @ -11,7 +11,7 @@ struct minix_ipcvecs minix_ipcvecs_softint = { | ||||
| 	.senda		= usermapped_senda_softint | ||||
| }; | ||||
| 
 | ||||
| struct minix_ipcvecs minix_ipcvecs_sysenter = { | ||||
| struct minix_ipcvecs minix_ipcvecs_sysenter __section(".usermapped") = { | ||||
| 	.send		= usermapped_send_sysenter, | ||||
| 	.receive	= usermapped_receive_sysenter, | ||||
| 	.sendrec	= usermapped_sendrec_sysenter, | ||||
| @ -21,7 +21,7 @@ struct minix_ipcvecs minix_ipcvecs_sysenter = { | ||||
| 	.senda		= usermapped_senda_sysenter | ||||
| }; | ||||
| 
 | ||||
| struct minix_ipcvecs minix_ipcvecs_syscall = { | ||||
| struct minix_ipcvecs minix_ipcvecs_syscall __section(".usermapped") = { | ||||
| 	.send		= usermapped_send_syscall, | ||||
| 	.receive	= usermapped_receive_syscall, | ||||
| 	.sendrec	= usermapped_sendrec_syscall, | ||||
|  | ||||
| @ -1,6 +1,14 @@ | ||||
| #include <minix/ipcconst.h> | ||||
| #include <machine/asm.h> | ||||
| 
 | ||||
| /* Redefine _ENTRY to put the following function in the section | ||||
|  * ".usermapped_glo". */ | ||||
| #undef _ENTRY | ||||
| #define _ENTRY(x) \ | ||||
| 	_ALIGN_TEXT; .globl x; .type x,@function; x:
 | ||||
| 
 | ||||
| .section .usermapped_glo, "wax", @progbits
 | ||||
| 
 | ||||
| /**========================================================================* */ | ||||
| /*                           IPC assembly routines			  * */ | ||||
| /**========================================================================* */ | ||||
|  | ||||
| @ -1,11 +1,11 @@ | ||||
| #include "kernel/kernel.h" | ||||
| 
 | ||||
| /* This is the user-visible struct that has pointers to other bits of data. */ | ||||
| struct minix_kerninfo minix_kerninfo; | ||||
| struct minix_kerninfo minix_kerninfo __section(".usermapped"); | ||||
| 
 | ||||
| /* Kernel information structures. */ | ||||
| struct kinfo kinfo;               /* kernel information for users */ | ||||
| struct machine machine;           /* machine information for users */ | ||||
| struct kmessages kmessages;       /* diagnostic messages in kernel */ | ||||
| struct loadinfo loadinfo;        /* status of load average */ | ||||
| struct kinfo kinfo __section(".usermapped");		/* kernel information for users */ | ||||
| struct machine machine __section(".usermapped");	/* machine information for users */ | ||||
| struct kmessages kmessages __section(".usermapped");	/* diagnostic messages in kernel */ | ||||
| struct loadinfo loadinfo __section(".usermapped");	/* status of load average */ | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Lionel Sambuc
						Lionel Sambuc