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


Peter Barada <pbarada@mail.wm.sps.mot.com> writes:

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

This is bogus, it must be something like this:

00001d14 <_dl_start_user>:
    1d14:       2840            moveal %d0,%a4
    1d16:       4bfb 0170 0001  lea %pc@(12d34 <_GLOBAL_OFFSET_TABLE_>),%a5
    1d1c:       101c 

This is required to be pc-relative addressing, ie. position independent.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


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