diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2017-03-25 18:12:28 +0100 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2017-04-01 21:00:37 +0200 |
commit | b30bd74dbcc48aca94b10531bb3056c5ef401752 (patch) | |
tree | 8555efc83fedd29e25f8352e855837917f9c8981 /ldso/ldso/dl-startup.c | |
parent | 9881defed03814471179e4395e0e79ddfcce6661 (diff) |
nios2: allow to hack on experimenting ld.so support
Diffstat (limited to 'ldso/ldso/dl-startup.c')
-rw-r--r-- | ldso/ldso/dl-startup.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/ldso/ldso/dl-startup.c b/ldso/ldso/dl-startup.c index 87f564f48..218b20f53 100644 --- a/ldso/ldso/dl-startup.c +++ b/ldso/ldso/dl-startup.c @@ -99,6 +99,10 @@ extern ElfW(Addr) _begin[] attribute_hidden; #endif +#ifdef LDSO_NEED_DPNT +ElfW(Dyn) *_dl_saved_dpnt = 0; +#endif + /* Static declarations */ static int (*_dl_elf_main) (int, char **, char **); @@ -341,6 +345,14 @@ DL_START(unsigned long args) fixed up by now. Still no function calls outside of this library, since the dynamic resolver is not yet ready. */ +#ifdef LDSO_NEED_DPNT +/*XXX TODO this crashes on nios2: it translates to + * [r5] := (value of the local variable dpnt) + * but r5 is a NULL pointer at this place, which was + * retrieved from the GOT a few instructions further above. + */ + _dl_saved_dpnt = dpnt; +#endif __rtld_stack_end = (void *)(argv - 1); _dl_elf_main = (int (*)(int, char **, char **)) |