This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.
See the CrossGCC FAQ for lots more information.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Have a nice weekend, Martin Egholm
*************** *** 143,192 **** its return value is the user program's entry point. */ #define RTLD_START asm ("\ - .text - .globl _start - .type _start,@function - _start: - move.l %sp, -(%sp) - jbsr _dl_start - addq.l #4, %sp - /* FALLTHRU */ - - .globl _dl_start_user - .type _dl_start_user,@function - _dl_start_user: - | Save the user entry point address in %a4. - move.l %d0, %a4 - | Point %a5 at the GOT. - lea _GLOBAL_OFFSET_TABLE_@GOTPC(%pc), %a5 - | Remember the highest stack address. - move.l %sp, ([__libc_stack_end@GOT.w, %a5]) - | See if we were run as a command with the executable file - | name as an extra leading argument. - move.l ([_dl_skip_args@GOT.w, %a5]), %d0 - | Pop the original argument count - move.l (%sp)+, %d1 - | Subtract _dl_skip_args from it. - sub.l %d0, %d1 - | Adjust the stack pointer to skip _dl_skip_args words. - lea (%sp, %d0*4), %sp - | Push back the modified argument count. - move.l %d1, -(%sp) - # Call _dl_init (struct link_map *main_map, int argc, char **argv, char **env) - pea 8(%sp, %d1*4) - pea 8(%sp) - move.l %d1, -(%sp) - move.l ([_rtld_global@GOT.w, %a5]), -(%sp) - jbsr _dl_init@PLTPC - addq.l #8, %sp - addq.l #8, %sp - | Pass our finalizer function to the user in %a1. - move.l _dl_fini@GOT.w(%a5), %a1 - | Initialize %fp with the stack pointer. - move.l %sp, %fp - | Jump to the user's entry point. - jmp (%a4) - .size _dl_start_user, . - _dl_start_user .previous"); /* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so --- 143,192 ---- its return value is the user program's entry point. */ #define RTLD_START asm ("\ + .text\n\ + .globl _start\n\ + .type _start,@function\n\ + _start:\n\ + move.l %sp, -(%sp)\n\ + jbsr _dl_start\n\ + addq.l #4, %sp\n\ + /* FALLTHRU */\n\ + \n\ + .globl _dl_start_user\n\ + .type _dl_start_user,@function\n\ + _dl_start_user:\n\ + | Save the user entry point address in %a4.\n\ + move.l %d0, %a4\n\ + | Point %a5 at the GOT.\n\ + lea _GLOBAL_OFFSET_TABLE_@GOTPC(%pc), %a5\n\ + | Remember the highest stack address.\n\ + move.l %sp, ([__libc_stack_end@GOT.w, %a5])\n\ + | See if we were run as a command with the executable file\n\ + | name as an extra leading argument.\n\ + move.l ([_dl_skip_args@GOT.w, %a5]), %d0\n\ + | Pop the original argument count\n\ + move.l (%sp)+, %d1\n\ + | Subtract _dl_skip_args from it.\n\ + sub.l %d0, %d1\n\ + | Adjust the stack pointer to skip _dl_skip_args words.\n\ + lea (%sp, %d0*4), %sp\n\ + | Push back the modified argument count.\n\ + move.l %d1, -(%sp)\n\ + # Call _dl_init (struct link_map *main_map, int argc, char **argv, char **env)\n\ + pea 8(%sp, %d1*4)\n\ + pea 8(%sp)\n\ + move.l %d1, -(%sp)\n\ + move.l ([_rtld_global@GOT.w, %a5]), -(%sp)\n\ + jbsr _dl_init@PLTPC\n\ + addq.l #8, %sp\n\ + addq.l #8, %sp\n\ + | Pass our finalizer function to the user in %a1.\n\ + move.l _dl_fini@GOT.w(%a5), %a1\n\ + | Initialize %fp with the stack pointer.\n\ + move.l %sp, %fp\n\ + | Jump to the user's entry point.\n\ + jmp (%a4)\n\ + .size _dl_start_user, . - _dl_start_user\n\ .previous"); /* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so
------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |