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.从库文件出发, ...
随机推荐
- 一个zip压缩类,欢迎吐槽
package com.utils; import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import j ...
- PHP的线程安全与非线程安全版本的区别
Windows版的PHP从版本5.2.1开始有Thread Safe(线程安全)和None Thread Safe(NTS,非线程安全)之分,这两者不同在于何处?到底应该用哪种?这里做一个简单的介绍. ...
- 将Ftp添加到资源管理器中直接使用
在资源管理器中,右键,添加网络位置. 然后输入ftp的url ftp://server2008 使用匿名方式登录
- Provider Pattern提供者模式和策略模式
http://www.codeproject.com/Articles/18222/Provider-Pattern Introduction Provider pattern is one of t ...
- 一台电脑同时运行多个tomcat配置方法
当第一个tomcat启动后,后面tomcat的server.xml中的端口不管怎么改,仍然会报端口冲突.后来在dos下运行才发现所有的tomcat都会去找CATALINA_HOME和CATALINA_ ...
- FileZilla无法确定拖放操作的目标,由于shell未正确安装
天有不测风云,突然间,用filezilla下载ftp上的文件到桌面的时候,提示"无法确定拖放操作目标.由于shell未正确安装" 解决办法很简单,执行如下几步就OK了 1.在CMD ...
- Asp.Net操作FTP方法
将用户上传的附件(文件.图片等)通过FTP方式传送到另外一台服务器上,从而缓解服务器压力 1.相关的文章如下: Discuz!NT中远程附件的功能实现[FTP协议] http://www.cnblog ...
- UVALive 4043 Ants(二分图完美匹配)
题意:每个蚁群有自己的食物源(苹果树),已知蚂蚁靠气味辨别行进方向,所以蚁群之间的行动轨迹不能重叠.现在给出坐标系中n个蚁群和n棵果树的坐标,两两配对,实现以上要求.输出的第 i 行表示第 i 个蚁群 ...
- CentOS 5.6 netInstall可以的在线安装方式。
之前百度google了一把, 发现原来的地址都失效了. 只找到一个能用的. 下载9M多的CentOS Net Install ISO文件, 选择安装方式时选HTTP. 然后在后面的 服务器位置处输入 ...
- 流媒體】jrtplib—VS2010下RTP开源协议库JRTPLIB3.9.1编译
一.JRTPLIB简介 老外用C++编写的开源RTP协议库,用来进行实时数据传输,可以运行在 Windows.Linux. FreeBSD.Solaris.Unix和VxWorks 等多种操作系统上, ...