[Ffmpeg-devel] Re: Broken trunk on AMD64 with PIC enabled

Michael Niedermayer michaelni
Wed Apr 4 02:46:32 CEST 2007


On Wed, Apr 04, 2007 at 01:03:29AM +0200, Diego 'Flameeyes' Petten? wrote:
> On Wed, 04 Apr 2007 01:35:07 +0300
> Uoti Urpala <uoti.urpala at pp1.inet.fi> wrote:
> > Note that shared libraries are required to be PIC on AMD64, so no PIC
> > means no shared libraries either.
> Exactly. This is why I thought it was important to let you know it
> doesn't build.
> For what it's worth, while I'm still trying to understand how inline
> asm works (I said already, I have no clue about it and I don't pretend
> to pass like I have some), I'll be working locally on xine with the
> attached patch applied. As Trent Piepho said, there's no way the
> references in that code would be PIC-compatible, and at least this much
> I think I understand.

you understand but Trent Piepho seems to be wrong, the references are
PIC-compatible its a problem of relocations with the assembler/linker/loader
on x86-64

on x86-32 ive just tried

int table[4]={1,2,3,4};

void test(void){
    int range, ret;

for(ret=0; ret<16; ret++){
    asm volatile ("movzbl table(%1, %2, 2), %0"
        : "=r"(range)
        : "r"(ret), "r"(0));
printf("%d ", range);

and it worked fine with -DPIC -fPIC -shared -Wl,-shared 
i hope ive not forgotten any flags needed for pic shared lib building ...
i dont commonly build such stuff ...

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Many that live deserve death. And some that die deserve life. Can you give
it to them? Then do not be too eager to deal out death in judgement. For
even the very wise cannot see all ends. -- Gandalf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070404/0884120a/attachment.pgp>

More information about the ffmpeg-devel mailing list