This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Questions regarding m68k dynamic/shared code


>|> The Procedure Linkage Table is used to support shared libraries.  When
>|> code calls a function which is defined in a shared library, that call
>|> goes through the PLT.  The PLT encodes the information required to
>|> find the function in the shared library, and calls code in the dynamic
>|> linker (ld.so) to locate that function and call it.  Normally the
>|> actual lookup only happens the first time; after that, the PLT is
>|> changed to jump directly to the appropriate code for all subsequent
>|> calls.
>
>On m68k the PLT is doing an indirect jump through the corresponding GOT
>entry, and only the GOT entry is adjusted by the dynamic linker.  This
>avoids all the complications of self-modifying code.

What's the difference between the first entry and all the others? (why
in bfd/elf32-m68k.c is there a elf_m68k_plt_entry and elf_m68k_plt0_entry?)

If its just an indirect jump, then why is there more than one
instruction in each plt entry (if the code after the jmp is
unreachable, why are the folliing insns there)?

-- 
Peter Barada                                   Peter.Barada@motorola.com
Wizard                                         781-852-2768 (direct)
WaveMark Solutions(wholly owned by Motorola)   781-270-0193 (fax)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]