Changeset 8b655705 in mainline for uspace/lib/c/arch
- Timestamp:
- 2011-04-15T19:38:07Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 9dd730d1
- Parents:
- 6b9e85b (diff), b2fb47f (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - Location:
- uspace/lib/c/arch
- Files:
-
- 19 edited
-
abs32le/_link.ld.in (modified) (2 diffs)
-
abs32le/src/entry.c (modified) (1 diff)
-
abs32le/src/thread_entry.c (modified) (1 diff)
-
amd64/_link.ld.in (modified) (3 diffs)
-
amd64/src/entry.s (modified) (1 diff)
-
arm32/_link.ld.in (modified) (3 diffs)
-
arm32/src/entry.s (modified) (3 diffs)
-
ia32/_link.ld.in (modified) (3 diffs)
-
ia32/src/entry.s (modified) (2 diffs)
-
ia64/_link.ld.in (modified) (4 diffs)
-
ia64/src/entry.s (modified) (1 diff)
-
ia64/src/thread_entry.s (modified) (1 diff)
-
mips32/_link.ld.in (modified) (1 diff)
-
mips32/include/atomic.h (modified) (1 diff)
-
mips32/src/entry.s (modified) (2 diffs)
-
ppc32/_link.ld.in (modified) (3 diffs)
-
ppc32/src/entry.s (modified) (1 diff)
-
sparc64/_link.ld.in (modified) (3 diffs)
-
sparc64/src/entry.s (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/arch/abs32le/_link.ld.in
r6b9e85b r8b655705 11 11 12 12 .text : { 13 *(.text );14 *(.rodata *);13 *(.text .text.*); 14 *(.rodata .rodata.*); 15 15 } :text 16 16 … … 44 44 } :data 45 45 46 . = ALIGN(0x1000);47 48 _heap = .;49 50 46 /DISCARD/ : { 51 47 *(*); -
uspace/lib/c/arch/abs32le/src/entry.c
r6b9e85b r8b655705 30 30 */ 31 31 32 #include <libc.h>33 32 #include <unistd.h> 34 33 #include <libarch/entry.h> 34 #include "../../../generic/private/libc.h" 35 35 36 36 void __entry(void) 37 37 { 38 38 __main(NULL); 39 __exit();40 39 } 41 40 -
uspace/lib/c/arch/abs32le/src/thread_entry.c
r6b9e85b r8b655705 31 31 32 32 #include <unistd.h> 33 #include <thread.h>33 #include "../../../generic/private/thread.h" 34 34 35 35 void __thread_entry(void) -
uspace/lib/c/arch/amd64/_link.ld.in
r6b9e85b r8b655705 5 5 text PT_LOAD FLAGS(5); 6 6 data PT_LOAD FLAGS(6); 7 debug PT_NOTE; 7 8 } 8 9 … … 13 14 *(.init); 14 15 } :text 16 15 17 .text : { 16 *(.text );17 *(.rodata *);18 *(.text .text.*); 19 *(.rodata .rodata.*); 18 20 } :text 19 21 20 22 . = . + 0x1000; 21 23 22 24 .data : { 23 25 *(.data); 24 26 } :data 27 25 28 .tdata : { 26 29 _tdata_start = .; … … 31 34 _tbss_end = .; 32 35 } :data 36 33 37 _tls_alignment = ALIGNOF(.tdata); 38 34 39 .bss : { 35 40 *(COMMON); 36 41 *(.bss); 37 42 } :data 38 39 . = ALIGN(0x1000); 40 _heap = .; 43 44 #ifdef CONFIG_LINE_DEBUG 45 .comment 0 : { *(.comment); } :debug 46 .debug_abbrev 0 : { *(.debug_abbrev); } :debug 47 .debug_aranges 0 : { *(.debug_aranges); } :debug 48 .debug_info 0 : { *(.debug_info); } :debug 49 .debug_line 0 : { *(.debug_line); } :debug 50 .debug_loc 0 : { *(.debug_loc); } :debug 51 .debug_pubnames 0 : { *(.debug_pubnames); } :debug 52 .debug_pubtypes 0 : { *(.debug_pubtypes); } :debug 53 .debug_ranges 0 : { *(.debug_ranges); } :debug 54 .debug_str 0 : { *(.debug_str); } :debug 55 #endif 41 56 42 57 /DISCARD/ : { 43 58 *(*); 44 59 } 45 46 60 } -
uspace/lib/c/arch/amd64/src/entry.s
r6b9e85b r8b655705 47 47 # Pass PCB pointer to __main (no operation) 48 48 call __main 49 50 call __exit -
uspace/lib/c/arch/arm32/_link.ld.in
r6b9e85b r8b655705 9 9 SECTIONS { 10 10 . = 0x1000 + SIZEOF_HEADERS; 11 11 12 12 .init : { 13 13 *(.init); 14 } : text 14 } :text 15 15 16 .text : { 16 *(.text );17 *(.rodata*);17 *(.text .text.*); 18 *(.rodata .rodata.*); 18 19 } :text 19 20 20 21 . = . + 0x1000; 21 22 22 23 .data : { 23 24 *(.opd); … … 25 26 *(.sdata); 26 27 } :data 28 27 29 .tdata : { 28 30 _tdata_start = .; … … 33 35 _tbss_end = .; 34 36 } :data 37 35 38 _tls_alignment = ALIGNOF(.tdata); 39 36 40 .bss : { 37 41 *(.sbss); 38 42 *(.scommon); 39 *(COMMON);40 *(.bss);43 *(COMMON); 44 *(.bss); 41 45 } :data 42 43 . = ALIGN(0x1000);44 _heap = .;45 46 46 47 /DISCARD/ : { 47 48 *(*); 48 49 } 49 50 50 } -
uspace/lib/c/arch/arm32/src/entry.s
r6b9e85b r8b655705 42 42 ldr r0, =ras_page 43 43 str r2, [r0] 44 44 45 45 # 46 46 # Create the first stack frame. … … 50 50 push {fp, ip, lr, pc} 51 51 sub fp, ip, #4 52 52 53 53 # Pass pcb_ptr to __main as the first argument (in r0) 54 54 mov r0, r1 55 55 bl __main 56 57 bl __exit58 56 59 57 .data … … 62 60 ras_page: 63 61 .long 0 64 -
uspace/lib/c/arch/ia32/_link.ld.in
r6b9e85b r8b655705 5 5 text PT_LOAD FLAGS(5); 6 6 data PT_LOAD FLAGS(6); 7 debug PT_NOTE; 7 8 } 8 9 … … 15 16 16 17 .text : { 17 *(.text );18 *(.rodata *);18 *(.text .text.*); 19 *(.rodata .rodata.*); 19 20 } :text 20 21 … … 42 43 } :data 43 44 44 . = ALIGN(0x1000); 45 46 _heap = .; 45 #ifdef CONFIG_LINE_DEBUG 46 .comment 0 : { *(.comment); } :debug 47 .debug_abbrev 0 : { *(.debug_abbrev); } :debug 48 .debug_aranges 0 : { *(.debug_aranges); } :debug 49 .debug_info 0 : { *(.debug_info); } :debug 50 .debug_line 0 : { *(.debug_line); } :debug 51 .debug_loc 0 : { *(.debug_loc); } :debug 52 .debug_pubnames 0 : { *(.debug_pubnames); } :debug 53 .debug_pubtypes 0 : { *(.debug_pubtypes); } :debug 54 .debug_ranges 0 : { *(.debug_ranges); } :debug 55 .debug_str 0 : { *(.debug_str); } :debug 56 #endif 47 57 48 58 /DISCARD/ : { -
uspace/lib/c/arch/ia32/src/entry.s
r6b9e85b r8b655705 46 46 mov %ax, %fs 47 47 # Do not set %gs, it contains descriptor that can see TLS 48 48 49 49 # Detect the mechanism used for making syscalls 50 50 movl $(INTEL_CPUID_STANDARD), %eax … … 58 58 # Create the first stack frame. 59 59 # 60 pushl $0 60 pushl $0 61 61 movl %esp, %ebp 62 62 63 63 # Pass the PCB pointer to __main as the first argument 64 64 pushl %edi 65 65 call __main 66 67 call __exit -
uspace/lib/c/arch/ia64/_link.ld.in
r6b9e85b r8b655705 9 9 SECTIONS { 10 10 . = 0x4000 + SIZEOF_HEADERS; 11 11 12 12 .init : { 13 13 *(.init); 14 } : text 14 } :text 15 15 16 .text : { 16 *(.text );17 *(.rodata *);17 *(.text .text.*); 18 *(.rodata .rodata.*); 18 19 } :text 19 20 20 21 . = . + 0x4000; 21 22 22 23 .got : { 23 _gp = .; 24 *(.got*); 25 } :data 24 /* Tell the linker where we expect GP to point. */ 25 __gp = .; 26 *(.got .got.*); 27 } :data 28 26 29 .data : { 27 30 *(.opd); … … 29 32 *(.sdata); 30 33 } :data 34 31 35 .tdata : { 32 36 _tdata_start = .; … … 37 41 _tbss_end = .; 38 42 } :data 43 39 44 _tls_alignment = ALIGNOF(.tdata); 45 40 46 .bss : { 41 47 *(.sbss); … … 44 50 *(.bss); 45 51 } :data 46 47 . = ALIGN(0x4000); 48 _heap = .; 49 52 50 53 /DISCARD/ : { 51 54 *(*); 52 }55 } 53 56 } -
uspace/lib/c/arch/ia64/src/entry.s
r6b9e85b r8b655705 39 39 __entry: 40 40 alloc loc0 = ar.pfs, 0, 1, 2, 0 41 movl gp = _ gp42 41 movl gp = __gp 42 43 43 # Pass PCB pointer as the first argument to __main 44 44 mov out0 = r2 45 45 br.call.sptk.many b0 = __main 46 0:47 br.call.sptk.many b0 = __exit -
uspace/lib/c/arch/ia64/src/thread_entry.s
r6b9e85b r8b655705 37 37 alloc loc0 = ar.pfs, 0, 1, 1, 0 38 38 39 movl gp = _ gp39 movl gp = __gp 40 40 41 41 # -
uspace/lib/c/arch/mips32/_link.ld.in
r6b9e85b r8b655705 13 13 *(.init); 14 14 } :text 15 15 16 .text : { 16 *(.text);17 *(.rodata *);17 *(.text .text.*); 18 *(.rodata .rodata.*); 18 19 } :text 19 20 20 21 . = . + 0x4000; 21 22 22 23 .data : { 23 24 *(.data); 24 25 *(.data.rel*); 25 26 } :data 26 27 27 28 .got : { 28 29 _gp = .; 29 30 *(.got); 30 31 } :data 31 32 32 33 .tdata : { 33 34 _tdata_start = .; 34 35 *(.tdata); 35 36 _tdata_end = .; 37 } :data 38 39 .tbss : { 36 40 _tbss_start = .; 37 41 *(.tbss); 38 42 _tbss_end = .; 39 43 } :data 40 _tls_alignment = ALIGNOF(.tdata); 41 44 45 _tls_alignment = MAX(ALIGNOF(.tdata), ALIGNOF(.tbss)); 46 42 47 .sbss : { 43 48 *(.scommon); 44 49 *(.sbss); 45 } 50 } 51 46 52 .bss : { 47 53 *(.bss); 48 54 *(COMMON); 49 55 } :data 50 51 . = ALIGN(0x4000); 52 _heap = .; 53 56 54 57 /DISCARD/ : { 55 58 *(*); -
uspace/lib/c/arch/mips32/include/atomic.h
r6b9e85b r8b655705 70 70 " sc %0, %1\n" 71 71 " beq %0, %4, 1b\n" /* if the atomic operation failed, try again */ 72 /* nop */ /* nop is inserted automatically by compiler */73 72 " nop\n" 74 73 : "=&r" (tmp), -
uspace/lib/c/arch/mips32/src/entry.s
r6b9e85b r8b655705 29 29 .text 30 30 .section .init, "ax" 31 31 32 .global __entry 32 .global __entry_driver 33 33 34 .set noreorder 34 35 .option pic2 … … 56 57 jal __main 57 58 nop 58 59 jal __exit60 nop61 59 .end 62 63 # Alignment of output section data to 0x400064 .section .data65 .align 14 -
uspace/lib/c/arch/ppc32/_link.ld.in
r6b9e85b r8b655705 9 9 SECTIONS { 10 10 . = 0x1000 + SIZEOF_HEADERS; 11 11 12 12 .init : { 13 13 *(.init); 14 14 } :text 15 15 16 .text : { 16 *(.text );17 *(.rodata *);17 *(.text .text.*); 18 *(.rodata .rodata.*); 18 19 } :text 19 20 20 21 . = . + 0x1000; 21 22 22 23 .data : { 23 24 *(.data); 24 25 *(.sdata); 25 26 } :data 27 26 28 .tdata : { 27 29 _tdata_start = .; … … 32 34 _tbss_end = .; 33 35 } :data 36 34 37 _tls_alignment = ALIGNOF(.tdata); 38 35 39 .bss : { 36 40 *(.sbss); … … 38 42 *(.bss); 39 43 } :data 40 41 . = ALIGN(0x1000);42 _heap = .;43 44 44 45 /DISCARD/ : { 45 46 *(*); 46 47 } 47 48 48 } -
uspace/lib/c/arch/ppc32/src/entry.s
r6b9e85b r8b655705 44 44 stw %r3, 0(%r1) 45 45 stwu %r1, -16(%r1) 46 46 47 47 # Pass the PCB pointer to __main() as the first argument. 48 48 # The first argument is passed in r3. 49 49 mr %r3, %r6 50 50 bl __main 51 52 bl __exit -
uspace/lib/c/arch/sparc64/_link.ld.in
r6b9e85b r8b655705 9 9 SECTIONS { 10 10 . = 0x4000 + SIZEOF_HEADERS; 11 11 12 12 .init : { 13 13 *(.init); 14 14 } :text 15 15 16 .text : { 16 *(.text );17 *(.rodata *);17 *(.text .text.*); 18 *(.rodata .rodata.*); 18 19 } :text 19 20 20 21 . = . + 0x4000; 21 22 22 23 .got : { 23 24 _gp = .; 24 25 *(.got*); 25 26 } :data 27 26 28 .data : { 27 29 *(.data); 28 30 *(.sdata); 29 31 } :data 32 30 33 .tdata : { 31 34 _tdata_start = .; … … 36 39 _tbss_end = .; 37 40 } :data 41 38 42 _tls_alignment = ALIGNOF(.tdata); 43 39 44 .bss : { 40 45 *(.sbss); … … 42 47 *(.bss); 43 48 } :data 44 45 . = ALIGN(0x4000);46 _heap = .;47 49 48 50 /DISCARD/ : { 49 51 *(*); 50 52 } 51 52 53 } -
uspace/lib/c/arch/sparc64/src/entry.s
r6b9e85b r8b655705 45 45 flushw 46 46 add %g0, -0x7ff, %fp 47 47 48 48 # Pass pcb_ptr as the first argument to __main() 49 49 mov %i1, %o0 … … 51 51 call __main 52 52 or %l7, %lo(_gp), %l7 53 54 call __exit55 nop
Note:
See TracChangeset
for help on using the changeset viewer.
