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

Orion Poplawski orion at cora.nwra.com
Wed May 24 20:44:56 UTC 2006


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:

.text
         .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



.text

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


It's generated using macros like:

         GLOBL(C(addll))
         GLOBL(C(subll))

         ALIGN
FUNBEGIN(addll)
         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   */
FUNEND()


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




More information about the fedora-extras-list mailing list