[x264-devel] NDK r8c linker warnings for asm files from libx264
Loren Merritt
lorenm at u.washington.edu
Sat Dec 15 05:37:06 CET 2012
On Sun, 9 Dec 2012, Alex Cohn wrote:
> With NDK r8c, linking of X264 encoder issues warnings:
>
> > cannot scan executable section 1 of libx264.a(dct-a.o) for Cortex-A8 erratum because it has no mapping symbols
>
> ... same warning for all assembly files in libx264.
>
> It is very easy to reproduce. The following instructions are for
> MacOS, but exactly same scenario is reproduced on Linux.
>
> 1. Install Android NDK r8c from
> http://dl.google.com/android/ndk/android-ndk-r8c-darwin-x86.zip.
>
> 2. In x264 root directory, run ./configure --enable-pic
> --enable-static
> --cross-prefix=/Users/me/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi-
> --sysroot=/Users/me/android-ndk-r8c/platforms/android-14/arch-arm
> --host=arm-linux
>
> 3. Run ~/android-ndk-r8c/prebuilt/darwin-x86/bin/make
>
> It will build the static library, and after that display the Cortex-A8
> warning while linking the x265 executable.
>
> The answer has been published here:
> http://code.google.com/p/android/issues/detail?id=40794#c4.
>
> TL;NR: h264 makefile forcefully strips the mapping symbols.
>
> The easiest workaround is to run
> ~/android-ndk-r8c/prebuilt/linux-x86/bin/make STRIP=
>
> A better patch is to replace lines 182, 186 of the Makefile with
> -@ $(if $(STRIP), $(STRIP) -x -K \$$a -K \$$t -K \$$d $@) #delete
> local/anonymous symbols, so they don't show up in oprofile, except the
> mapping symbols
Strip was added to workaround a discrepancy on x86 between yasm and
gdb/perf/oprofile. Can you confirm that that problem exists at all on arm,
which doesn't use the same assembler? Because if not, then the right fix
is to remove the arm strip, and keep the x86 one unchanged.
--Loren Merritt
More information about the x264-devel
mailing list