From: kaz K. <kk...@rr...> - 2000-05-01 23:24:07
|
Hi > ld.so starts, and eventually the function elf_machine_rela() (in > sysdeps/sh/sh3/dl-machine.h) is called during the initial relocation > from _dl_start() and the segfault occurs when the code tries (I think) > to poke a fixed-up address in the code section (which is read-only) > instead of the GOT (which is read-write). > > I believe it's a linker problem, but I'm no expert with ld.so nor ld so > I'm having hard times figuring out what's wrong. Anybody out there has > a clue what the problem might be ? I have traces of ld.so's startup and > other informations relevant to the problem if you think it'd be helpful. Can you please give us the result of readelf -r ld.so? It shows relocations of ld.so. I imagine that your ld.so has .rela.text and the relocation R_SH_DIR32 or so. It needs the modification of .text segment of ld.so and becomes the cause of fail as you describe. Ordinary this type of relocation isn't problem at all since ld.so will modify the .text segment of the ELF object using mprotect. But in the bootstrap of ld.so, there is not working ld.so yet :-) I want to know also which version of toolchain and their patch do you use. Niibe-san's visibility patchs for gcc/binutils may solve your problem. Please check ftp://ftp.m17n.org/pub/linux-sh/binutils-000218-000219.diff.gz and ftp://ftp.m17n.org/pub/linux-sh/gcc-symbol-vis-000219.diff.gz kaz |