source: trunk/System/Sources/libc/patches/patch-linux_amd64_pic.diff @ 442

Last change on this file since 442 was 442, checked in by khorben, 11 years ago

Added two patches for Linux/amd64 support (still missing setjmp/longjmp)

File size: 512 bytes
  • libc/src/kernel/linux/amd64/start.S

    diff -p -u -r1.1 start.S
    _start: 
    2323        shl     $3, %rdx
    2424        add     $8, %rdx
    2525        add     %rsi, %rdx
     26#ifdef PIC
     27        mov     environ@GOTPCREL(%rip), %rcx
     28        mov     %rdx, (%rcx)
     29#else
    2630        mov     %rdx, environ
     31#endif
    2732        xor     %rbp, %rbp      /* stack        */
     33#ifdef PIC
     34        call    main@PLT
     35#else
    2836        call    main
     37#endif
    2938        mov     %rax, %rdi      /* exit         */
     39#ifdef PIC
     40        call    exit@PLT
     41#else
    3042        call    exit
     43#endif
    3144        hlt
Note: See TracBrowser for help on using the repository browser.