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


>Ok, I've rebuilt my elf directory with the -m5200 switch while adding
>the following to force elf_get_dynamic_info to be inlined in _dl_start:

After tinkering with my compiler to handle static values as non-GOT
entries, the ld.so (loaded at 0x40000000) seems to go much farther, up
to the point that its attempts to update the value that is loaded
into %a5 at the start of _dl_start_user(which looks like the first
@GOT entrty in the code segment for ld.so):

Breakpoint 1, 0x40004af6 in ?? ()
(gdb)

The code here is:
    4af6:	2081           	movel %d1,%a0@

(gdb) p/x $a0
$1 = 0x400048d4
(gdb) p/x $d1
$2 = 0x4001670c

>From the ld.so.dump, this write corresponds to:

000048ce <_dl_start_user>:
    48ce:	2200           	movel %d0,%d1
    48d0:	2840           	moveal %d0,%a4
    48d2:	2a7c 0001 670c 	moveal #91916,%a5
    48d8:	287c 0000 0028 	moveal #40,%a4

which looks to me like it is trying to change the value of %a5 in the
instruction at 0x400048d2 from 0x1c70c to 0x40001670c.  Unfortunatley
I don't have a clue if its is *supposed* to.

My question is whether or not ld.so actually modifies its own code in
_dl_start() to update the code segment where the instructions have
_GLOBAL_OFFSET_TABLE_@GOT constants in them....

Any information is appreciated.

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