Position independent m68k code

Joel Sherrill joel.sherrill at OARcorp.com
Fri May 14 13:13:17 UTC 2004


geneSmith wrote:

> This does not apply directly to rtems but I am using the m68k-rtems-* 
> toolchain but for running under an non-rtems system.
> 
> The non-rtems embedded system allows you to create a C program which it 
> can run. It requires that the C program be written in PC relative (i.e., 
> position independent) m68k code. m68k-rtems-gcc supports this, as best I 
> can tell, using the -fpic option.
> 
> When I use the -fpic option and link with m68k-rtems-ld I get section 
> .got and .got.plt.  Does anyone on the rtems list know anything about 
> how I should use or possibly initialize these? (Most of what I can find 
> on Global Offset Table and Procedure Linkage Table applies to runtime 
> dynamic linking which the non-rtems system definitely does not do.)

I always come away from a discussion of sections a bit fuzzy headed.
The definitive answer is always going to come from binutils.

This post may clarify it some.

http://sources.redhat.com/ml/binutils/2004-03/msg00350.html

In general, I follow the pattern in the generic linker scripts
in $prefix/lib/ldscripts when dealing with sections.

> Thanks,
> -gene
> 





More information about the users mailing list