ld --embedded-relocs for m68k
Ian Lance Taylor
Thu Jun 8 13:31:00 GMT 2000
Date: Thu, 8 Jun 00 13:49:11 CDT
From: msokolov@ivan.Harhan.ORG (Michael Sokolov)
Was the MIPS --embedded-relocs support intended to be general, or was it a
solution for some specific oddball embedded system?
It was a solution for a specific oddball embedded system: the General
Magic MagicLink system. General Magic started on the m68k, writing
relocateable code which could run on a Mac. They switched over to
MIPS, and wanted relocateable code there as well.
The problem with using a section index is that it implies that you
need a section table. Think about converting a program to S-records.
Whatever table you use must be recorded in the program image somehow.
For MIPS --embedded-relocs I split up text and data, and required the
linker script and the startup code to work in tandem to record that
information for proper relocation at run time. See
If you need to support multiple sections, you need a more complex
solution. If you need to support arbitrary numbers of sections, you
need to write a section table somewhere, perhaps at the start of the
relocation information. But I don't know how you pass in the runtime
addresses of the various sections. That is bound to be system
More information about the Binutils