This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How do you debug X86_64 relocation errors


Mike Frysinger wrote:
On Saturday 20 August 2005 02:50 pm, sean wrote:

Mike Frysinger wrote:

On Friday 19 August 2005 10:58 pm, sean wrote:
........


you showed x264.o was built as PIC but was dct-a.o ?
-mike


Excellent. It was built with yasm - nasm extended for X86_64:


yasm -f elf -m amd64 -o common/amd64/dct-a.o common/amd64/dct-a.asm

Sadly it won't build with as.

FYI i sent to the yasm-devel list:

I'm trying to link x264 with ffmpeg on an amd64. x264 uses yasm for
some of its core routines. I've built x264 with -fPIC for gcc-4.0.1
and -m amd64 for yasm.


For example:

yasm -f elf -m amd64 -m amd64 -o common/amd64/dct-a.o common/amd64/dct-a.asm

Yet when ffmpeg tries to link with x264 I get:

/usr/bin/ld: /usr/lib/gcc/x86_64-redhat-linux/4.0.1/../../../../lib64/libx264.a(dct-a.o):
relocation R_X86_64_32 against `a local symbol' can not be used when
making a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-redhat-linux/4.0.1/../../../../lib64/libx264.a:
could not read symbols: Bad value


Is there some other command line switch needed for yasm?

FWIW,
 rpm -q binutils
binutils-2.16.91.0.2-4

sean


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]