It looks like we don't pass it anyway when compiling test programs (which
makes sense). We only pass it when compiling library .c files.

We do seem to link libmpir twice for good measure. I'm amazed that works.

Bill.


On 1 April 2014 22:53, Jean-Pierre Flori <jpfl...@gmail.com> wrote:

> We shouldn't but on Windows it should make no difference to GCC, and
> as far as I saw, there is no specific PIC code in the assembly files
> chosen on my setup which could be triggered by the "-DPIC" define.
>
> 2014-04-01 22:52 GMT+02:00 Bill Hart <goodwillh...@googlemail.com>:
> > On the other hand, should we be passing -fPIC to gcc?
> >
> > Bill.
> >
> >
> > On 1 April 2014 22:47, Bill Hart <goodwillh...@googlemail.com> wrote:
> >>
> >> Surely a compiler error then.
> >>
> >> I can't seem to get libspeed or try to build on Cygwin64. It looses the
> >> include and lib directories in the gcc invocation.
> >>
> >> But I think you've found the problem, for sure.
> >>
> >> Bill.
> >>
> >>
> >> On 1 April 2014 22:40, Jean-Pierre Flori <jpfl...@gmail.com> wrote:
> >>>
> >>>
> >>>
> >>> On Tuesday, April 1, 2014 10:36:05 PM UTC+2, Jean-Pierre Flori wrote:
> >>>>
> >>>> What look strange to me is the way the function is called.
> >>>> All other function calls use rip or a different address range.
> >>>>
> >>>> E.g. for the call in t-neg:
> >>>> 39   gmp_randinit_default(rands);
> >>>>
> >>>> First it goes through the import lib:
> >>>>    0x00000001004010fa <+42>:    mov    0x818f(%rip),%rax        #
> >>>> 0x100409290 <__imp___gmp_randinit_default>
> >>>>    0x0000000100401101 <+49>:    callq  *%rax
> >>>>
> >>>> And %rax looks saner:
> >>>> (gdb) info reg
> >>>> rax            0x4ff1e1550      21460030800
> >>>>
> >>>> Just as in cygmpir-16.dll:
> >>>> 00000004ff1e1550 T __gmp_randinit_default
> >>>>
> >>>> In particularn in the mpn_store direct call, the leading 4 is
> missing...
> >>>
> >>>
> >>> And:
> >>>  (gdb) r
> >>> The program being debugged has been started already.
> >>> Start it from the beginning? (y or n) y
> >>>
> >>> Starting program: /home/jp/mpir-flori.git/tests/mpn/.libs/t-neg
> >>> [New Thread 3836.0x408]
> >>> [New Thread 3836.0x26c]
> >>>
> >>> Program received signal SIGSEGV, Segmentation fault.
> >>> 0x00000000ff2746c0 in ?? ()
> >>> (gdb) x/i $pc
> >>> => 0xff2746c0:  Cannot access memory at address 0xff2746c0
> >>> (gdb) x/i $pc + 0x400000000
> >>>    0x4ff2746c0 <__gmpn_store>:  lea    -0x20(%rcx),%rcx
> >>> (gdb)
> >>>
> >>
> >
>
>
>
> --
> Jean-Pierre Flori
>

-- 
You received this message because you are subscribed to the Google Groups 
"mpir-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mpir-devel+unsubscr...@googlegroups.com.
To post to this group, send email to mpir-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/mpir-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to