Questions regarding m68k dynamic/shared code

Ian Lance Taylor
Wed Jan 8 18:22:00 GMT 2003

Peter Barada <> writes:

> I'm trying to build a Linux system to run on a ColdFire v4e system,
> and I'm a bit confused about the PLT secion that is generated by the
> compiler/assembler/linker.  From what I can gather, the code in the
> .plt section uses addressing modes that are not supporte by ColdFire,
> and before I hack it up, I thought I'd better understand what this
> code does...
> 1) Where can I find the m68k supplement to the SYSV ABI
>    specification(and the SYSV ABI spec itself)? Google is not helping me...

I think it's been out of print for several years now.  I don't think
it's on the web anywhere.  Sorry.

> 2) Who generates the code in the .plt section?  I see the generation
>    code in bfd/elf32-m68k.c, but I'm confused who actually calls this
>    code(as? ld?)

The linker, ld.

> 3) What *does* the code in the .plt seciton actually do?

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 ( 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

The details of how this is done vary from one processor to another.

The m68k PLT code in the linker already supports generic m68k code and
CPU32 code.  Perhaps you just need to add a ColdFire variant.  You
will probably need to change the dynamic linker as well.


More information about the Binutils mailing list