_franck_ | jeremybennett: I managed to link or1k gdb with or1ksim, now I'm here: http://pastebin.com/RgGfwipB | 01:50 |
---|---|---|
_franck_ | or1ksim: invalid option "--sysroot=/opt/or1k-toolchain/or1k-elf/sys-root" | 01:50 |
andresjk | hi | 03:40 |
--- Log closed Fri Jan 25 04:36:42 2013 | ||
--- Log opened Fri Jan 25 04:45:06 2013 | ||
-!- Irssi: #openrisc: Total of 24 nicks [0 ops, 0 halfops, 0 voices, 24 normal] | 04:45 | |
-!- Irssi: Join to #openrisc was synced in 2 secs | 04:45 | |
jeremybennett | _franck_: interesting - looks like the sim interface expects to be able to pass across a --sysroot option (which Or1ksim does not recognize). | 10:41 |
jeremybennett | I guess your wrapper for Or1ksim will have to just throw away that otion. | 10:41 |
_franck_ | yes, that's I saw. I was thinking add this as a dummy param in or1ksim but you're right, throwing it away in the wrapper sounds better | 10:43 |
stekern | blueCmd: I took a look at elf32-or1k.c in the morning, but I don't really get what you want to know ;) | 14:15 |
blueCmd | stekern: well, how does .got allocation work? how does it know how much got space to allocate? how do you compute the offset for each symbol? | 14:20 |
blueCmd | when I begun reading the code to answer those questions, I encountered that if statement I pasted yesterday | 14:20 |
blueCmd | and I couldn't for my life understand what sh_info and everything represented | 14:21 |
blueCmd | I need to run, back later. | 14:21 |
stekern | blueCmd: for the meaning of sh_info, look here: http://www.skyfree.org/linux/references/ELF_Format.pdf | 15:32 |
stekern | at page 1-13 | 15:33 |
stekern | the got space is handled here: https://github.com/openrisc/or1k-src/blob/or1k/bfd/elf32-or1k.c#L1910 | 15:52 |
stekern | it get the got section out of the hash table, adds the new entry to the end and increases the got section by 4 | 15:53 |
stekern | by "adding the new entry to the end" I really meant: it sets the current hashtable entry (h) got offset to the end of the got section | 15:55 |
_franck_ | jeremybennett: do you want saving me some time ? :) | 17:23 |
_franck_ | Executing on host: or32-elf-gcc ../../.././gdb-7.2/gdb/testsuite/gdb.base/advance.c -mnewlib -mboard=or1ksim -g -lm -o /home/franck/ope.... | 17:23 |
_franck_ | when testsuite compiling test program, where do -mnewlib and -mbord=or1ksim are coming ? | 17:24 |
_franck_ | running the or32 testsuite, I have those flags, running or1k testsuite, I don't | 17:25 |
_franck_ | and I still have a lot of errors runing the or1k testsuite with or1ksim | 17:25 |
jeremybennett | _franck_: there are options in the or32-linux-sim.exp file for specifying c flags and link flags. Add them there. | 17:26 |
blueCmd | stekern: ah, cool. thanks - I will read through it | 17:26 |
_franck_ | ok thanks, jeremybennett | 17:27 |
blueCmd | stekern: you don't have an easy answer to when to use h->got.refcount and when to use the hash table? | 17:28 |
stekern | the got.refcount is used to mark the number of relocations that is using a symbol | 17:33 |
stekern | 1 symbol will only have one got entry | 17:34 |
stekern | s/1/each | 17:34 |
stekern | (at least in our case) | 17:34 |
stekern | h->got is always referring to the got entry | 17:35 |
_franck_ | me == stupid ! :) I had #define OR32_SIM_DEBUG.... so when dejagnu was comparing output, all was wrong | 18:19 |
jeremybennett | juliusb: Are you around? | 19:22 |
blueCmd | stekern: right, so why is h null sometimes? | 20:36 |
blueCmd | for symbols over sh_info (iirc) | 20:36 |
stekern | blueCmd: all symbols doesn't have hashtable entries, for example local symbols, they might need to be in got anyway | 21:08 |
stekern | that's how I remember it at least, you better check up on it and correct me if I'm wrong ;) | 21:09 |
blueCmd | stekern: ah makes sense | 21:09 |
blueCmd | stekern: do you know how static linking effects got? | 21:10 |
blueCmd | I'm trying to understand how the got references are initialized when linking staticly. I mean, if code has been generated to use GOT, and I choose to use static linking, the got is not needed but since the code is generated I figure the linker can't really change that fact | 21:13 |
blueCmd | the same for PLTs i suppose - but the final executable doesn't contain any relocations (which a non-static program would, which would be resolved on loading by libc) | 21:13 |
blueCmd | so if the code is generated to use got, links staticly without any relocation records - how does libc fill in the got entries? | 21:15 |
blueCmd | (hm, actually - on x64 gcc produces relocations on the static program as well, maybe it's not supported by or1k?) | 21:18 |
* blueCmd will read through ELF_Format.pdf - it might answer all this | 21:25 | |
blueCmd | aha, gotoff doesn't really need to be in the got - just relative to it. that's almost painfully obvious | 21:59 |
blueCmd | so storing TLS stuff in .rodata for example would be possible if it's known link time | 22:00 |
blueCmd | but then again, it seems like my assumption that .got is mangled is pretty wrong - just storing the precomputed value in the got (effectivly resolving the otherwise pending relocations) will work as far as I can see | 22:41 |
Generated by irclog2html.py 2.15.2 by Marius Gedminas - find it at mg.pov.lt!