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/ColdFire dynamic/shared code


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


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