[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Question about "shlib-with-non-pic-code", possibly caused by assembler code?

Roland McGrath wrote:
It does require some knowledge of the particular machine you're dealing
with.  You can look at the .o files that go into the .so with objdump -rd
and look for the non-PIC relocations they use.  If you don't know how to
identify those already, then you will probably have a hard time adjusting
the assembly code.

Well, here is some of the assembly:

        .globl addll
        .globl subll
        .globl addllx
        .globl subllx
        .globl shiftl
        .globl shiftlr
        .globl bfffo
        .globl mulll
        .globl addmul
        .globl divll
        .globl overflow
        .globl hiremainder
.comm overflow,4,4
.comm hiremainder,4,4


 .align 8
        xorl %edx,%edx
        movl 4(%esp),%eax
        addl 8(%esp),%eax
        adcl %edx,%edx
        movl %edx,overflow

It's generated using macros like:


        INSN2(xor,l     ,R(edx),R(edx))             /* clear %edx    */
        INSN2(mov,l     ,X4 MEM_DISP(esp,4),R(eax)) /* get x         */
        INSN2(add,l     ,X4 MEM_DISP(esp,8),R(eax)) /* add y         */
        INSN2(adc,l     ,R(edx),R(edx))             /* %edx := carry */
        INSN2(mov,l     ,R(edx),C(overflow))        /* set overflow  */
        ret                                         /* return %eax   */

If there is something easy that can be done, please let us know.

In the meantime, should this be a blocker against pari being accepted into extras?

Orion Poplawski
System Administrator                   303-415-9701 x222
Colorado Research Associates/NWRA      FAX: 303-415-9702
3380 Mitchell Lane, Boulder CO 80301   http://www.co-ra.com

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]