unsupported dynamic reloc R_ARM_REL32 AND hidden symbol '__dso_handle' is not defined
项目里编译codec
src\makefiles\android\codec\Makefile
line 25 原本用 4.6 不会报错
-L/data/android/android-ndk/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi-v7a \
改成
-L/data/android/android-ndk/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi-v7a \
编译报错 (下面只有四行)
make[]: Entering directory `~/video/makefiles/android/codec'
/data/android/android-ndk/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ -Wl,--as-needed -lc -Wl,--no-undefined -nostdlib -Wl,-soname,libcodec.so -Wl,-shared,-Bsymbolic ../../../src/codec/H264Encoder_noarch_noplat.o ../../../src/codec/ANDROIDAACEncoder_noarch_noplat.o ../../../src/codec/FH264Decoder_noarch_noplat.o ../../../src/codec/AACDecoder_noarch_noplat.o -L. -L../../../output -L../../../input/prebuilt/android -L../../../testbed/recordtest/libs/armeabi -L/data/android/src/4.4/out/target/product/generic/system/lib -L/data/android/android-ndk/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi-v7a -lmlbase -laacdec -larcsoft_h264_enc_arm11_vt -larcsoft_mp4audiocommon_he -laacencoder -lavcodec -lavutil -lz -lm -lc -llog -lstagefright -lmedia -lutils -lbinder -lgnustl_static /data/android/android-ndk/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.8/armv7-a/libgcc.a -shared -fPIC -o ../../../testbed/recordtest/libs/armeabi/libcodec.so -Xlinker -cref -Xlinker -Map -Xlinker ../../../testbed/recordtest/libs/armeabi/libcodec.map
/data1/android/android-ndk-r9d/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld: error: /data/android/android-ndk/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi-v7a/libgnustl_static.a(eh_globals.o): requires unsupported dynamic reloc R_ARM_REL32; recompile with -fPIC
/data1/android/android-ndk-r9d/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld: error: hidden symbol '__dso_handle' is not defined locally
collect2: error: ld returned exit status
相关的库文件是armeabi-v7a文件夹下 libgnustl_static.a
Google上有人解释说所引用crtbegin_so.o非PIC
https://code.google.com/p/android/issues/detail?id=23203
The problem is that there is a text relocation for __dso_handle. In other words, the code in crtbegin_so.o is not position independent.This is what gcc generates for the same code transposed in C, for arm (thumb would be different):
如果一定用4.8的话,按照
http://www.cnblogs.com/yuanxiaoping_21cn_com/p/3971162.html
可以行得通。
unsupported dynamic reloc R_ARM_REL32 AND hidden symbol '__dso_handle' is not defined的更多相关文章
- error: qrc_qml.obj: requires unsupported dynamic reloc R_ARM_REL32; recompile with -fPIC解决办法
使用qtcreator加androidndk编译项目时报错: error: qrc_qml.obj: requires unsupported dynamic reloc R_ARM_REL32; r ...
- hidden symbol `pthread_atfork'
gcc交叉编译时发生这种错误 /.. .../voice_demo: hidden symbol `pthread_atfork' in /opt/gcc-linaro-aarch64-linux-g ...
- hidden symbol ... is referenced by DSO
在Linux上编译Qt的时候configure出来的Makefile传递给g++的参数visiblility=hidden,然后就会调用Qt库所使用的第三方库libpng库源代码函数声明添加上__at ...
- [原]android 链接错误
由于没有使用NDK的makefile, 而是把NDK的toolchain集成到现有的build system, 所以出现了诡异的错误: unsupported dynamic reloc R_ARM_ ...
- Static, Shared Dynamic and Loadable Linux Libraries
转载:http://www.yolinux.com/TUTORIALS/LibraryArchives-StaticAndDynamic.html Why libraries are used: Th ...
- Native层和so接口和Java层
一.Java层加载so文件 Android在Java层加载so的接口是System.loadLibrary()逐级调用的过程: System.loadLibrary()系统源码: 987 pub ...
- elf.h
1 /* This file defines standard ELF types, structures, and macros. 2 Copyright (C) 1995-2019 Free So ...
- Android so库文件的区节section修复代码分析
本文博客地址:http://blog.csdn.net/qq1084283172/article/details/78818917 一.Android so库文件的节表secion修复方案整理 1.简 ...
- -/bin/sh: ./led: not found的解决办法
环境介绍: 开发板:qq2440 交叉编译器:arm-linux-gcc 3.4.1 内核版本:2.6.13 一.针对该类问题从两个方面入手: 1.从权限出发,权限不够会出现此问题 2.从库文件出发, ...
随机推荐
- latex 三线表
LaTeX 处理三线表相当简单方便.用到的宏包主要是 booktabs .代码如下: 需要添加包:\usepackage{booktabs}. \documentclass{article} \use ...
- <<c 和指针 >> 部分笔记。
最近竟然对指针有些迷惑了,分不清指针的指向.废话少说,复习.(下面内容来自<<c和指针>>) =指针 ==内存和地址 尽管一个字包含了4个字节,它仍然只有一个地址.至于是最左边 ...
- 【转载】R6034错误,C Runtime Error
能查到的解决方法都在里面有提及: 我是使用 stdafx.h加入这句 code #pragma comment(linker, "\"/manifestdependency:typ ...
- Java视频教程
http://outofmemory.cn/java/video/ http://outofmemory.cn/tutorial/
- git版本库底层命令
当我们在使用git的时候,有时候需要知道当前文件夹相对于工作目录根目录的相对路径等等,那么我们可以使用 git rev-parse 添加一个参数就可以实现,如: 显示当前仓库版本库 .git 目录所在 ...
- input默认提示取消
input 输入框有提示功能,当你之前输入过一些内容,你下次打入相关字符的时候,默认会有之前输入的一些相关的字符的提示,这个提示一般来说还是很好的,但是,有时候,我们想自己输入,不想要提示. 如果不需 ...
- UVa 10817 (状压DP + 记忆化搜索) Headmaster's Headache
题意: 一共有s(s ≤ 8)门课程,有m个在职教师,n个求职教师. 每个教师有各自的工资要求,还有他能教授的课程,可以是一门或者多门. 要求在职教师不能辞退,问如何录用应聘者,才能使得每门课只少有两 ...
- Samba 4.x.x全版本存在命令执行漏洞
Samba 4.0.0到4.1.10版本的nmbd(the NetBIOS name services daemon)被发现存在远程命令执行漏洞.CVE编号为CVE-2014-3560.目前官方已经发 ...
- ios8.3 编译 arm64版 openssl-1.0.2a
xcode是6.3版的,ios sdk 是8.3的, 到http://www.openssl.org/source/下载最新版本openssl-1.0.2a 解压后用文本编辑器打开configure文 ...
- HDU 3844 Mining Your Own Business(割点,经典)
题意: 给出一个连通图,要求将某些点涂黑,使得无论哪个点(包括相关的边)撤掉后能够成功使得剩下的所有点能够到达任意一个涂黑的点,颜料不多,涂黑的点越少越好,并输出要涂几个点和有多少种涂法. 思路: 要 ...