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

Michael Niedermayer michaelni
Tue Apr 3 23:51:20 CEST 2007


Hi

On Tue, Apr 03, 2007 at 08:25:28PM +0200, Diego 'Flameeyes' Petten? wrote:
> On Tue, 3 Apr 2007 19:49:03 +0200
> Michael Niedermayer <michaelni at gmx.at> wrote:
> 
> > libavutil/internal.h
> > add a MANGLE2 without rip and use that where addressing over rip is
> > inpossible
> 
> I just did it as soon as I've read your mail, and I'm attaching the
> patch for what it can be useful for. But with this change, it will just
> fail to link the shared objects before of non-PIC relocations.

maybe you should provide the error messages?
maybe you should check what syntax gcc uses when rip relative addressing is
inpossible

also PIC is IMHO very low priority so dont expect me to do ANY work to 
make AMD64+ASM+PIC work


[...]
> Index: libavutil/internal.h
> ===================================================================
> --- libavutil/internal.h	(revision 8615)
> +++ libavutil/internal.h	(working copy)
> @@ -128,16 +128,21 @@
>      defined(__OS2__) || (defined (__OpenBSD__) && !defined(__ELF__))
>  #    if defined(ARCH_X86_64) && defined(PIC)
>  #        define MANGLE(a) "_" #a"(%%rip)"
> +#        define MANGLE2(a) "_" #a
>  #    else
>  #        define MANGLE(a) "_" #a
> +#        define MANGLE2(a) "_" #a
>  #    endif
>  #else
>  #    if defined(ARCH_X86_64) && defined(PIC)
>  #        define MANGLE(a) #a"(%%rip)"
> +#        define MANGLE2(a) #a
>  #    elif defined(CONFIG_DARWIN)
>  #        define MANGLE(a) "_" #a
> +#        define MANGLE2(a) "_" #a
>  #    else
>  #        define MANGLE(a) #a
> +#        define MANGLE2(a) #a
>  #    endif
>  #endif

this can be done simpler

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Democracy is the form of government in which you can choose your dictator
-------------- 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/20070403/cfaf1059/attachment.pgp>



More information about the ffmpeg-devel mailing list