RE: [PATCH]mips: ldso: dlopen with flag RTLD_NOW should look up the symbols

2015-03-21 Thread Andrew Bennett
struct symbol_ref sym_ref; + ElfW(Sym) *psym = NULL; /* Now parse the relocation information */ rel_size = rel_size / sizeof(ElfW(Rel)); rpnt = (ELF_RELOC *) rel_addr; @@ -170,6 +171,33 @@ int _dl_parse_relocation_information(struct dyn_elf *xpnt, strtab = (char *)

RE: [PATCH]mips: ldso: dlopen with flag RTLD_NOW should look up the symbols

2015-03-20 Thread Andrew Bennett
; uclibc Subject: Re: [PATCH]mips: ldso: dlopen with flag RTLD_NOW should look up the symbols After reading eglibc code, I find it's much similar to uclibc ldso/ldso/mips/elfinterp.c:_dl_perform_mips_global_got_relocations. See http://www.eglibc.org/svn/branches/eglibc-2_18/libc/ports/sysdeps/mips/dl

Re: [PATCH]mips: ldso: dlopen with flag RTLD_NOW should look up the symbols

2015-03-16 Thread Jean Lee
After reading eglibc code, I find it's much similar to uclibc ldso/ldso/mips/elfinterp.c:_dl_perform_mips_global_got_relocations. See http://www.eglibc.org/svn/branches/eglibc-2_18/libc/ports/sysdeps/mips/dl-machine.h; elf_machine_got_rel function for more inspect. I slightly modify my last patch

Re: [PATCH]mips: ldso: dlopen with flag RTLD_NOW should look up the symbols

2015-03-15 Thread Jean Lee
(1)mipsel-linux-gnu 4.8.4(compiled by Broadcom) mipsel-linux-gnu-gcc 4.8.4 binutils 2.24 (GNU ld (GNU Binutils) 2.24.0.20140801 Linaro 2014.08) libc 2.18-2013.10 It's not uclibc. I do further test in this platform. (1) If dlopen with flag RTLD_NOW, the result is: open ./libtest_mips.so fail.

Re: [PATCH]mips: ldso: dlopen with flag RTLD_NOW should look up the symbols

2015-03-15 Thread Jean Lee
2015-03-15 20:16 GMT+08:00 Jean Lee xiaoyur...@gmail.com: (1)mipsel-linux-gnu 4.8.4(compiled by Broadcom) mipsel-linux-gnu-gcc 4.8.4 binutils 2.24 (GNU ld (GNU Binutils) 2.24.0.20140801 Linaro 2014.08) libc 2.18-2013.10 It's not uclibc. I do further test in this platform. (1) If

RE: [PATCH]mips: ldso: dlopen with flag RTLD_NOW should look up the symbols

2015-03-14 Thread Bernhard Reutner-Fischer
On February 25, 2015 10:13:02 PM GMT+01:00, Andrew Bennett andrew.benn...@imgtec.com wrote: Andrew, so what do you think about Jean Lee's patch? TIA, ___ uClibc mailing list uClibc@uclibc.org http://lists.busybox.net/mailman/listinfo/uclibc

RE: [PATCH]mips: ldso: dlopen with flag RTLD_NOW should look up the symbols

2015-02-25 Thread Andrew Bennett
Anyone remember what happened to https://gcc.gnu.org/ml/gcc/2008- 06/msg00670.html or http://marc.info/?l=linux-mipsm=121494382925231w=2 Andrew? I think this support was added (I know that there is PLT support for MIPS in the binutils linker). I have cc'd Richard Sandiford to confirm.

Re: [PATCH]mips: ldso: dlopen with flag RTLD_NOW should look up the symbols

2015-02-25 Thread Bernhard Reutner-Fischer
On February 25, 2015 5:53:58 AM GMT+01:00, Jean Lee xiaoyur...@gmail.com wrote: Conclusion: All MIPS platforms never generate .rel.plt section for dynamic libraries, even for GCC 4.9 binutils 2.24 any libc(uclibc, libc, bionic) Anyone remember what happened to

Re: [PATCH]mips: ldso: dlopen with flag RTLD_NOW should look up the symbols

2015-02-24 Thread Bernhard Reutner-Fischer
Please do not top-post. On February 24, 2015 2:06:28 AM GMT+01:00, Jean Lee xiaoyur...@gmail.com wrote: I tested the following environment with MIPS32, with CPU BCM7429(MIPS r3000), (1) mipsel-linux-uclibc-gcc 4.5.3-2.4 (compiled by Broadcom) binutils 2.19(GNU ld (GNU Binutils) 2.19.92.20091006)

Re: [PATCH]mips: ldso: dlopen with flag RTLD_NOW should look up the symbols

2015-02-24 Thread Jean Lee
2015年2月24日 下午4:57于 Bernhard Reutner-Fischer rep.dot@gmail.com写道: Please do not top-post. On February 24, 2015 2:06:28 AM GMT+01:00, Jean Lee xiaoyur...@gmail.com wrote: I tested the following environment with MIPS32, with CPU BCM7429(MIPS r3000), (1) mipsel-linux-uclibc-gcc 4.5.3-2.4

Re: [PATCH]mips: ldso: dlopen with flag RTLD_NOW should look up the symbols

2015-02-24 Thread Florian Fainelli
2015-02-23 17:06 GMT-08:00 Jean Lee xiaoyur...@gmail.com: I tested the following environment with MIPS32, with CPU BCM7429(MIPS r3000), This is a BMIPS5000 CPU, fully compatible with the mips32r1 ISA, not a R3000-class MIPS processor per-se. (1) mipsel-linux-uclibc-gcc 4.5.3-2.4 (compiled by

Re: [PATCH]mips: ldso: dlopen with flag RTLD_NOW should look up the symbols

2015-02-24 Thread Jean Lee
2015-02-25 1:36 GMT+08:00 Florian Fainelli f.faine...@gmail.com: 2015-02-23 17:06 GMT-08:00 Jean Lee xiaoyur...@gmail.com: I tested the following environment with MIPS32, with CPU BCM7429(MIPS r3000), This is a BMIPS5000 CPU, fully compatible with the mips32r1 ISA, not a R3000-class MIPS

RE: [PATCH]mips: ldso: dlopen with flag RTLD_NOW should look up the symbols

2015-02-23 Thread Andrew Bennett
Andrew, thanks for your reply. You are a mips engineer~ I have a following example for dlopen problem, which I tested a few days ago, but I have no mips environment these days. Would you mind to test it for me. Many thanks. Many thanks for the testcase I will give it a try. Regards,

RE: [PATCH]mips: ldso: dlopen with flag RTLD_NOW should look up the symbols

2015-02-23 Thread Bernhard Reutner-Fischer
On February 23, 2015 10:23:21 PM GMT+01:00, Andrew Bennett andrew.benn...@imgtec.com wrote: Andrew, thanks for your reply. You are a mips engineer~ I have a following example for dlopen problem, which I tested a few days ago, but I have no mips environment these days. Would you mind to test

Re: [PATCH]mips: ldso: dlopen with flag RTLD_NOW should look up the symbols

2015-02-23 Thread Jean Lee
I tested the following environment with MIPS32, with CPU BCM7429(MIPS r3000), (1) mipsel-linux-uclibc-gcc 4.5.3-2.4 (compiled by Broadcom) binutils 2.19(GNU ld (GNU Binutils) 2.19.92.20091006) uclibc 0.9.32-1 Segment fault. (2) mipsel-linux-uclibc-gcc 4.5.3-2.4 (compiled by Broadcom) binutils

Re: [PATCH]mips: ldso: dlopen with flag RTLD_NOW should look up the symbols

2015-02-21 Thread Jean Lee
Andrew, thanks for your reply. You are a mips engineer~ I have a following example for dlopen problem, which I tested a few days ago, but I have no mips environment these days. Would you mind to test it for me. Many thanks. Example: File main.cpp #include stdio.h #include dlfcn.h typedef void

RE: [PATCH]mips: ldso: dlopen with flag RTLD_NOW should look up the symbols

2015-02-20 Thread Andrew Bennett
Reason: MIPS ELF strategy is so different from other architectures like x86 and arm. When fPIC enabled in x86 and arm, .rel.plt section is generated after .rel.dyn section, and the dependency of the library (like the function and object) . But MIPS only generates .rel.dyn section for the