Changeset 8b655705 in mainline for uspace/lib/c/arch


Ignore:
Timestamp:
2011-04-15T19:38:07Z (15 years ago)
Author:
Jakub Jermar <jakub@…>
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.
Message:

Merge mainline changes.

Location:
uspace/lib/c/arch
Files:
19 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/arch/abs32le/_link.ld.in

    r6b9e85b r8b655705  
    1111       
    1212        .text : {
    13                 *(.text);
    14                 *(.rodata*);
     13                *(.text .text.*);
     14                *(.rodata .rodata.*);
    1515        } :text
    1616       
     
    4444        } :data
    4545       
    46         . = ALIGN(0x1000);
    47        
    48         _heap = .;
    49        
    5046        /DISCARD/ : {
    5147                *(*);
  • uspace/lib/c/arch/abs32le/src/entry.c

    r6b9e85b r8b655705  
    3030 */
    3131
    32 #include <libc.h>
    3332#include <unistd.h>
    3433#include <libarch/entry.h>
     34#include "../../../generic/private/libc.h"
    3535
    3636void __entry(void)
    3737{
    3838        __main(NULL);
    39         __exit();
    4039}
    4140
  • uspace/lib/c/arch/abs32le/src/thread_entry.c

    r6b9e85b r8b655705  
    3131
    3232#include <unistd.h>
    33 #include <thread.h>
     33#include "../../../generic/private/thread.h"
    3434
    3535void __thread_entry(void)
  • uspace/lib/c/arch/amd64/_link.ld.in

    r6b9e85b r8b655705  
    55        text PT_LOAD FLAGS(5);
    66        data PT_LOAD FLAGS(6);
     7        debug PT_NOTE;
    78}
    89
     
    1314                *(.init);
    1415        } :text
     16       
    1517        .text : {
    16                 *(.text);
    17                 *(.rodata*);
     18                *(.text .text.*);
     19                *(.rodata .rodata.*);
    1820        } :text
    19 
     21       
    2022        . = . + 0x1000;
    21 
     23       
    2224        .data : {
    2325                *(.data);
    2426        } :data
     27       
    2528        .tdata : {
    2629                _tdata_start = .;
     
    3134                _tbss_end = .;
    3235        } :data
     36       
    3337        _tls_alignment = ALIGNOF(.tdata);
     38       
    3439        .bss : {
    3540                *(COMMON);
    3641                *(.bss);
    3742        } :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
    4156       
    4257        /DISCARD/ : {
    4358                *(*);
    4459        }
    45 
    4660}
  • uspace/lib/c/arch/amd64/src/entry.s

    r6b9e85b r8b655705  
    4747        # Pass PCB pointer to __main (no operation)
    4848        call __main
    49 
    50         call __exit
  • uspace/lib/c/arch/arm32/_link.ld.in

    r6b9e85b r8b655705  
    99SECTIONS {
    1010        . = 0x1000 + SIZEOF_HEADERS;
    11 
     11       
    1212        .init : {
    1313                *(.init);
    14         } : text
     14        } :text
     15       
    1516        .text : {
    16                 *(.text);
    17         *(.rodata*);
     17                *(.text .text.*);
     18                *(.rodata .rodata.*);
    1819        } :text
    19 
     20       
    2021        . = . + 0x1000;
    21 
     22       
    2223        .data : {
    2324                *(.opd);
     
    2526                *(.sdata);
    2627        } :data
     28       
    2729        .tdata : {
    2830                _tdata_start = .;
     
    3335                _tbss_end = .;
    3436        } :data
     37       
    3538        _tls_alignment = ALIGNOF(.tdata);
     39       
    3640        .bss : {
    3741                *(.sbss);
    3842                *(.scommon);
    39         *(COMMON);
    40         *(.bss);
     43                *(COMMON);
     44                *(.bss);
    4145        } :data
    42        
    43         . = ALIGN(0x1000);
    44         _heap = .;
    4546       
    4647        /DISCARD/ : {
    4748                *(*);
    4849        }
    49 
    5050}
  • uspace/lib/c/arch/arm32/src/entry.s

    r6b9e85b r8b655705  
    4242        ldr r0, =ras_page
    4343        str r2, [r0]
    44 
     44       
    4545        #
    4646        # Create the first stack frame.
     
    5050        push {fp, ip, lr, pc}
    5151        sub fp, ip, #4
    52 
     52       
    5353        # Pass pcb_ptr to __main as the first argument (in r0)
    5454        mov r0, r1
    5555        bl __main
    56 
    57         bl __exit
    5856
    5957.data
     
    6260ras_page:
    6361        .long 0
    64 
  • uspace/lib/c/arch/ia32/_link.ld.in

    r6b9e85b r8b655705  
    55        text PT_LOAD FLAGS(5);
    66        data PT_LOAD FLAGS(6);
     7        debug PT_NOTE;
    78}
    89
     
    1516       
    1617        .text : {
    17                 *(.text);
    18                 *(.rodata*);
     18                *(.text .text.*);
     19                *(.rodata .rodata.*);
    1920        } :text
    2021       
     
    4243        } :data
    4344       
    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
    4757       
    4858        /DISCARD/ : {
  • uspace/lib/c/arch/ia32/src/entry.s

    r6b9e85b r8b655705  
    4646        mov %ax, %fs
    4747        # Do not set %gs, it contains descriptor that can see TLS
    48 
     48       
    4949        # Detect the mechanism used for making syscalls
    5050        movl $(INTEL_CPUID_STANDARD), %eax
     
    5858        # Create the first stack frame.
    5959        #
    60         pushl $0 
     60        pushl $0
    6161        movl %esp, %ebp
    62 
     62       
    6363        # Pass the PCB pointer to __main as the first argument
    6464        pushl %edi
    6565        call __main
    66 
    67         call __exit
  • uspace/lib/c/arch/ia64/_link.ld.in

    r6b9e85b r8b655705  
    99SECTIONS {
    1010        . = 0x4000 + SIZEOF_HEADERS;
    11 
     11       
    1212        .init : {
    1313                *(.init);
    14         } : text
     14        } :text
     15       
    1516        .text : {
    16                 *(.text);
    17                 *(.rodata*);
     17                *(.text .text.*);
     18                *(.rodata .rodata.*);
    1819        } :text
    19 
     20       
    2021        . = . + 0x4000;
    21 
     22       
    2223        .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       
    2629        .data : {
    2730                *(.opd);
     
    2932                *(.sdata);
    3033        } :data
     34       
    3135        .tdata : {
    3236                _tdata_start = .;
     
    3741                _tbss_end = .;
    3842        } :data
     43       
    3944        _tls_alignment = ALIGNOF(.tdata);
     45       
    4046        .bss : {
    4147                *(.sbss);
     
    4450                *(.bss);
    4551        } :data
    46 
    47         . = ALIGN(0x4000);
    48         _heap = .;
    49  
     52       
    5053        /DISCARD/ : {
    5154                *(*);
    52         }
     55        }
    5356}
  • uspace/lib/c/arch/ia64/src/entry.s

    r6b9e85b r8b655705  
    3939__entry:
    4040        alloc loc0 = ar.pfs, 0, 1, 2, 0
    41         movl gp = _gp
    42 
     41        movl gp = __gp
     42       
    4343        # Pass PCB pointer as the first argument to __main
    4444        mov out0 = r2
    4545        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  
    3737        alloc loc0 = ar.pfs, 0, 1, 1, 0
    3838
    39         movl gp = _gp
     39        movl gp = __gp
    4040       
    4141        #
  • uspace/lib/c/arch/mips32/_link.ld.in

    r6b9e85b r8b655705  
    1313                *(.init);
    1414        } :text
     15       
    1516        .text : {
    16                 *(.text);
    17                 *(.rodata*);
     17                *(.text .text.*);
     18                *(.rodata .rodata.*);
    1819        } :text
    19 
     20       
    2021        . = . + 0x4000;
    21 
     22       
    2223        .data : {
    2324                *(.data);
    2425                *(.data.rel*);
    2526        } :data
    26 
     27       
    2728        .got : {
    2829                _gp = .;
    2930                *(.got);
    3031        } :data
    31 
     32       
    3233        .tdata : {
    3334                _tdata_start = .;
    3435                *(.tdata);
    3536                _tdata_end = .;
     37        } :data
     38       
     39        .tbss : {
    3640                _tbss_start = .;
    3741                *(.tbss);
    3842                _tbss_end = .;
    3943        } :data
    40         _tls_alignment = ALIGNOF(.tdata);
    41 
     44       
     45        _tls_alignment = MAX(ALIGNOF(.tdata), ALIGNOF(.tbss));
     46       
    4247        .sbss : {
    4348                *(.scommon);
    4449                *(.sbss);
    45         }       
     50        }
     51       
    4652        .bss : {
    4753                *(.bss);
    4854                *(COMMON);
    4955        } :data
    50 
    51         . = ALIGN(0x4000);
    52         _heap = .;
    53 
     56       
    5457        /DISCARD/ : {
    5558                *(*);
  • uspace/lib/c/arch/mips32/include/atomic.h

    r6b9e85b r8b655705  
    7070                "       sc %0, %1\n"
    7171                "       beq %0, %4, 1b\n"       /* if the atomic operation failed, try again */
    72                 /*      nop     */              /* nop is inserted automatically by compiler */
    7372                "       nop\n"
    7473                : "=&r" (tmp),
  • uspace/lib/c/arch/mips32/src/entry.s

    r6b9e85b r8b655705  
    2929.text
    3030.section .init, "ax"
     31
    3132.global __entry
    32 .global __entry_driver
     33
    3334.set noreorder
    3435.option pic2
     
    5657        jal __main
    5758        nop
    58        
    59         jal __exit
    60         nop
    6159.end
    62 
    63 # Alignment of output section data to 0x4000
    64 .section .data
    65 .align 14
  • uspace/lib/c/arch/ppc32/_link.ld.in

    r6b9e85b r8b655705  
    99SECTIONS {
    1010        . = 0x1000 + SIZEOF_HEADERS;
    11 
     11       
    1212        .init : {
    1313                *(.init);
    1414        } :text
     15       
    1516        .text : {
    16                 *(.text);
    17                 *(.rodata*);
     17                *(.text .text.*);
     18                *(.rodata .rodata.*);
    1819        } :text
    19 
     20       
    2021        . = . + 0x1000;
    21 
     22       
    2223        .data : {
    2324                *(.data);
    2425                *(.sdata);
    2526        } :data
     27       
    2628        .tdata : {
    2729                _tdata_start = .;
     
    3234                _tbss_end = .;
    3335        } :data
     36       
    3437        _tls_alignment = ALIGNOF(.tdata);
     38       
    3539        .bss : {
    3640                *(.sbss);
     
    3842                *(.bss);
    3943        } :data
    40 
    41         . = ALIGN(0x1000);
    42         _heap = .;
    4344       
    4445        /DISCARD/ : {
    4546                *(*);
    4647        }
    47 
    4848}
  • uspace/lib/c/arch/ppc32/src/entry.s

    r6b9e85b r8b655705  
    4444        stw %r3, 0(%r1)
    4545        stwu %r1, -16(%r1)
    46 
     46       
    4747        # Pass the PCB pointer to __main() as the first argument.
    4848        # The first argument is passed in r3.
    4949        mr %r3, %r6
    5050        bl __main
    51 
    52         bl __exit
  • uspace/lib/c/arch/sparc64/_link.ld.in

    r6b9e85b r8b655705  
    99SECTIONS {
    1010        . = 0x4000 + SIZEOF_HEADERS;
    11 
     11       
    1212        .init : {
    1313                *(.init);
    1414        } :text
     15       
    1516        .text : {
    16                 *(.text);
    17                 *(.rodata*);
     17                *(.text .text.*);
     18                *(.rodata .rodata.*);
    1819        } :text
    19 
     20       
    2021        . = . + 0x4000;
    21 
     22       
    2223        .got : {
    2324                 _gp = .;
    2425                 *(.got*);
    2526        } :data
     27       
    2628        .data : {
    2729                *(.data);
    2830                *(.sdata);
    2931        } :data
     32       
    3033        .tdata : {
    3134                _tdata_start = .;
     
    3639                _tbss_end = .;
    3740        } :data
     41       
    3842        _tls_alignment = ALIGNOF(.tdata);
     43       
    3944        .bss : {
    4045                *(.sbss);
     
    4247                *(.bss);
    4348        } :data
    44 
    45         . = ALIGN(0x4000);
    46         _heap = .;
    4749       
    4850        /DISCARD/ : {
    4951                *(*);
    5052        }
    51 
    5253}
  • uspace/lib/c/arch/sparc64/src/entry.s

    r6b9e85b r8b655705  
    4545        flushw
    4646        add %g0, -0x7ff, %fp
    47 
     47       
    4848        # Pass pcb_ptr as the first argument to __main()
    4949        mov %i1, %o0
     
    5151        call __main
    5252        or %l7, %lo(_gp), %l7
    53 
    54         call __exit
    55         nop
Note: See TracChangeset for help on using the changeset viewer.