Hi Greg,
Greg Ungerer wrote,

> Hi Waldemar,
> 
> > I disabled CONFIG_BINFMT_SHARED_FLAT in the kernel.
> > And now I get:
> > ~ # /hello 
> > [   90.830000] BINFMT_FLAT: reloc[405] outside program 0xed870000 (0
> > - 0x123b0/0x8944), killing hello!
> > SEGV
> > 
> > Compiling with
> > ./output/host/usr/bin/arm-buildroot-uclinux-uclibcgnueabi-gcc
> > -Wl,-elf2flt=-v -o hello hello.c -lpthread :
> > ..
> > reloc[403] = 0xe140
> >   RELOC[404]: offset=0x5724 symbol=frame_dummy+0x0 section=.text
> > size=0 fixup=0xac (reloc=0xe144)
> > reloc[404] = 0xe144
> >   RELOC[405]: offset=0x5728 symbol=pthread_initialize+0x0
> > section=.text size=0 fixup=0x87ec (reloc=0xe148)
> > reloc[405] = 0xe148
> >   RELOC[406]: offset=0x572c symbol=__do_global_dtors_aux+0x0
> > section=.text size=0 fixup=0x80 (reloc=0xe14c)
> > reloc[406] = 0xe14c
> > ..
> > 
> > So pthread_initialize() is the problem?
> 
> Sure does look that way. I am not sure why looking at the above
> details though.
> 
> Can you run again with the "Kernel-Traced-Load" flag set on the
> hello program (so run the flthdr -k on it first). I want to see
> what the actual memory regions allocated where and how far out
> of those bounds the relocation ended up.

Here it is:
~ # /hello 
[   57.910000] BINFMT_FLAT: Loading file: /hello
[   57.910000] Mapping is 90580000, Entry point is 45, data_start is 8984
[   57.910000] Load /hello: TEXT=90580040-90588984 DATA=905889a0-9058e1b0 
BSS=9058e1b0-9059240c
[   57.910000] BINFMT_FLAT: reloc[405] outside program 0xed870000 (0 - 
0x123b0/0x8944), killing hello!
SEGV

The same hello world application works on Qemu m68k somehow. It starts and
get SIGILL, but at least not a relocation problem.

best regards
 Waldemar
_______________________________________________
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

Reply via email to