stekern | I've got relocation of ld.so working, and some of the loading of the application working | 08:14 |
---|---|---|
stekern | the program header read in from the elf looks wrong though | 08:15 |
stekern | "everything" else looks pretty good | 08:15 |
stekern | I was about to ask our linux gurus where that is entered onto the stack in linux, but I think I've found it | 08:35 |
stekern | in create_elf_tables, right? | 08:35 |
juliusb | stekern: nice progress with the dynamic linking stuff by the looks of it | 08:43 |
juliusb | I've done a few updates of the mor1kx | 08:44 |
stekern | I'm craving to see the "hello world" I have hidden away in my shared lib I'm trying to load and run ;) | 08:45 |
stekern | but, yes it's slowly evolving | 08:45 |
stekern | (mor1kx) nice, what kind of? | 08:46 |
juliusb | I see you have too | 08:46 |
juliusb | umm, added serial multiply, improved multiplier implementation (for 3-stage full parallel multiplier) | 08:46 |
juliusb | a bug fix in the espresso fetch stage | 08:46 |
juliusb | i'm wondering what the best way to merge in all the updates is | 08:47 |
juliusb | I want your work on my master | 08:47 |
juliusb | my local master | 08:47 |
juliusb | and my github.com/juliusbaxter/mor1kx repo | 08:47 |
juliusb | I've just done a remote update and got your work and then done (on my master) merge with it | 08:48 |
juliusb | but if i then push to the openrisc/mor1kx repo, will it get all confused or can it figure out what came from where? | 08:49 |
juliusb | so now on my repo I have your fixes, which is good | 08:50 |
juliusb | but if I want to push my work back onto the openrisc organisation mor1kx repo, will it be OK if I push my master? | 08:50 |
stekern | ah, but checkout openrisc/master and do a git pull from juliusbaxter/master and then push | 08:51 |
stekern | (or merge juliusbaxter/master) | 08:52 |
stekern | but I think you can push your straight to openrisc/master | 08:53 |
stekern | the only thing that will look a bit odd is that you'll have the merge from openrisc/master visible there, instead of the merge from juliusb/master | 08:54 |
juliusb | hmm ya | 08:54 |
stekern | but since you've already pushed the merge to juliusb/master, it will show up anyways | 08:54 |
stekern | (I think) | 08:54 |
stekern | you can test pushing your repo, it will wine if it can't push it without -f | 08:56 |
juliusb | hmm ok | 08:56 |
juliusb | so im going to push my master (juliusbaxter/mor1kx master) to openrisc/mor1kx | 08:57 |
stekern | do that | 08:58 |
juliusb | hmm, appeared to work | 08:58 |
juliusb | yeah, has shown the merge from openrisc/mor1kx to my repo, oh well | 08:58 |
juliusb | i'll do it neater next time :) | 08:58 |
juliusb | but now I know | 08:58 |
stekern | yeah, it doesn't really matter much | 08:59 |
stekern | the key point is that you aren't changing any of the commits that already are in openrisc/master, that's when you know it's kosher | 09:00 |
juliusb | sweet | 09:01 |
juliusb | Yeah i'm going to keep hacking on stuff and pushing documentation and features and stuff | 09:01 |
juliusb | shouldn't be anything which steps on your toes :) | 09:01 |
stekern | I'm wearing steel-toe boots, so no need to worry ;) | 09:04 |
juliusb | good to know :) | 09:10 |
stekern | I think I need to orient myself some more in how ELF files work | 10:25 |
stekern | problem at hand: http://pastebin.com/JurT5kKx | 10:27 |
stekern | the address for AT_PHDR (that's what linux put on the stack before calling _start in ld.so) is calculated by: "LOAD virtual address" - "LOAD offset" + "PHDR offset" | 10:30 |
stekern | i.e.: 0x0 - 0x2000 + 0x34 = 0xffffe034 | 10:32 |
stekern | then ld.so tries to read from this address, which of course ends in a segfault | 10:33 |
jeremybennett | simoncook: You've been looking at the low level stuff recently. Can you help out stekern? | 10:38 |
stekern | any pointers would be appreciated ;) | 10:38 |
stekern | as a comparison, this is how the readelf -l looks like when compiled/linked for x64: http://pastebin.com/icskbyei | 10:40 |
stekern | here the "LOAD offset" = 0 and the "LOAD virtual address" = 0x400000 | 10:41 |
stekern | i.e. "the other way around" | 10:42 |
jemarch | hi | 11:35 |
-!- Netsplit *.net <-> *.split quits: Fallenou | 12:16 | |
stekern | I think the problem is that the PHDR is "not included" in the memory map of the program | 12:52 |
stekern | yay, I figured it out, if EMBEDDED=yes is set in the .sh script in ld/emulparams/, then + SIZEOF_HEADERS isn't added in the default link-script | 18:00 |
stekern | one small step forward! | 18:09 |
stekern | http://pastebin.com/Spk0ypaG | 18:10 |
stekern | no more segfault :) | 18:12 |
stekern | ...until I proceed with the next step: http://pastebin.com/rKEmTFwd | 20:19 |
stekern | =) | 20:19 |
stekern | it's close now though | 20:20 |
Generated by irclog2html.py 2.15.2 by Marius Gedminas - find it at mg.pov.lt!