questions regarding m68k/ColdFire dynamic/shared code

Peter Barada pbarada@mail.wm.sps.mot.com
Wed Jan 15 20:35:00 GMT 2003


>|> is turned into:
>|> 
>|>     lea _GLOBAL_OFFSET_TABLE_@GOTPC, %a5
>
>You can't use @GOTPC without a pc-relative addressing mode.  You would
>need @GOTOFF, but that does not exist for m68k.

The two instructions:

    lea _GLOBAL_OFFSET_TABLE_@GOTPC, %a5
    lea -6(%pc,%a5), %a5

is equivalent to:

    lea _GLOBAL_OFFSET_TABLE_OFFSET_@GOTPC(%pc),%a5

since the -6 offset adjusts for the 3 half words between the lea
constants and the extension word of the second instruction where %pc
is added to it.... 

But again, back to my question, is ld.so supposed to modify its own
.text segment? 

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



More information about the Libc-alpha mailing list