Question

Question: What is the meaning of this warning? If there are no real-life consequences, I can live with it for a while... But I am concerned with what will happen if our program gets loaded on one of the faulty chips.

Background: 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.

libx264.a itself was cross-compiled on the same machine with the same 4.6 toolchain taken from NDK.

Here are the instructions to easily reproduce the problem (Ubuntu or MacOS):

  1. Download x264-snapshot-20121203-2245 from ftp://ftp.videolan.org/pub/x264/snapshots/last_x264.tar.bz2

  2. Run ./configure --enable-pic --enable-strip --enable-static --cross-prefix=~/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi- --sysroot=~/android-ndk-r8c/platforms/android-14/arch-arm --host=arm-linux

  3. Run ~/android-ndk-r8c/prebuilt/linux-x86/bin/make

It will build the static library, and after that display the Cortex-A8 warning while linking the x265 executable. I am not worried about the compiler warnings, because building libx264.a is done offline, it is not part of our official daily build.

I have reported this as http://code.google.com/p/android/issues/detail?id=40794.

I tried to add the mapping symbols manually to dct-a.S following the ARM.com instructions, but this had no effect.

Was it helpful?

Solution

I got THE answer from Andrew: http://code.google.com/p/android/issues/detail?id=40794#c4

tl;nr: h264 makefile forcefully strips the mapping symbols. I have double checked: it is not my --enable-strip for ./configure that makes this happen.

The quickest workaround is to run

make STRIP=
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top