Changeset 7148abf in mainline


Ignore:
Timestamp:
2018-04-28T16:18:07Z (6 years ago)
Author:
Jiří Zárevúcky <jiri.zarevucky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e634684
Parents:
3fafe5e0
Message:

Rename main to libc_main, to avoid conflict with libgcc.

Location:
uspace/lib/c
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/arch/abs32le/src/entry.c

    r3fafe5e0 r7148abf  
    3939void __entry(void)
    4040{
    41         __main(NULL);
     41        __libc_main(NULL);
    4242}
    4343
  • uspace/lib/c/arch/amd64/src/entry.S

    r3fafe5e0 r7148abf  
    4646
    4747        # %rdi was deliberately chosen as the first argument is also in %rdi
    48         # Pass PCB pointer to __main (no operation)
    49         call __main
     48        # Pass PCB pointer to __libc_main (no operation)
     49        call __libc_main
  • uspace/lib/c/arch/arm32/src/entry.S

    r3fafe5e0 r7148abf  
    5151        sub fp, ip, #4
    5252
    53         # Pass pcb_ptr to __main as the first argument (in r0)
     53        # Pass pcb_ptr to __libc_main as the first argument (in r0)
    5454        mov r0, r1
    55         bl __main
     55        bl __libc_main
    5656
    5757.data
  • uspace/lib/c/arch/ia32/src/entry.S

    r3fafe5e0 r7148abf  
    6565        movl %esp, %ebp
    6666
    67         # Pass the PCB pointer to __main as the first argument
     67        # Pass the PCB pointer to __libc_main as the first argument
    6868        pushl %edi
    69         call __main
     69        call __libc_main
  • uspace/lib/c/arch/ia64/src/entry.S

    r3fafe5e0 r7148abf  
    4141        movl gp = __gp
    4242
    43         # Pass PCB pointer as the first argument to __main
     43        # Pass PCB pointer as the first argument to __libc_main
    4444        mov out0 = r2 ;;
    45         br.call.sptk.many b0 = __main
     45        br.call.sptk.many b0 = __libc_main
    4646
  • uspace/lib/c/arch/mips32/src/entry.S

    r3fafe5e0 r7148abf  
    5151        .cprestore 16
    5252
    53         # Pass pcb_ptr to __main() as the first argument. It is already
     53        # Pass pcb_ptr to __libc_main() as the first argument. It is already
    5454        # in $a0. As the first argument is passed in $a0, no operation
    5555        # is needed.
    5656
    57         jal __main
     57        jal __libc_main
    5858        nop
    5959
  • uspace/lib/c/arch/ppc32/src/entry.S

    r3fafe5e0 r7148abf  
    4545        stwu %r1, -16(%r1)
    4646
    47         # Pass the PCB pointer to __main() as the first argument.
     47        # Pass the PCB pointer to __libc_main() as the first argument.
    4848        # The first argument is passed in r3.
    4949        mr %r3, %r6
    50         bl __main
     50        bl __libc_main
  • uspace/lib/c/arch/riscv64/src/entry.c

    r3fafe5e0 r7148abf  
    3838void __entry(void)
    3939{
    40         __main((void *) 0);
     40        __libc_main((void *) 0);
    4141}
    4242
  • uspace/lib/c/arch/sparc64/src/entry.S

    r3fafe5e0 r7148abf  
    4646        add %g0, -0x7ff, %fp
    4747
    48         # Pass pcb_ptr as the first argument to __main()
    49         call __main
     48        # Pass pcb_ptr as the first argument to __libc_main()
     49        call __libc_main
    5050        mov %i1, %o0
  • uspace/lib/c/generic/libc.c

    r3fafe5e0 r7148abf  
    6767static bool env_setup = false;
    6868
    69 void __main(void *pcb_ptr)
     69void __libc_main(void *pcb_ptr)
    7070{
    7171        /* Initialize user task run-time environment */
  • uspace/lib/c/generic/private/libc.h

    r3fafe5e0 r7148abf  
    3737
    3838extern unsigned char _end[];
    39 extern void __main(void *) __attribute__((noreturn));
     39extern void __libc_main(void *) __attribute__((noreturn));
    4040extern int main(int, char *[]);
    4141
Note: See TracChangeset for help on using the changeset viewer.