- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我使用的是 Ubuntu 12.04.1 LTS 系统,内核版本为 3.14。而GCC版本是gcc-4.6
# uname -a
Linux SC-TXT-node1 3.14.18-custom #1 SMP Fri Sep 12 14:03:23 PDT 2014 x86_64 x86_64 x86_64 GNU/Linux
# gcc --version
gcc-4.6.real (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
在编译任何 C 文件时,我遇到段错误。
# gcc test.c
collect2: ld terminated with signal 11 [Segmentation fault]
我发现运行命令 - “ld”也会引发段错误。
“dmesg”给出以下错误,但我无法理解它的含义
#dmesg
[83719.292987] ld.bfd.real[60413]: segfault at 1 ip 0000000000000001 sp 00007fff7bede118 error 14 in ld.bfd.real[7f6f156c2000+3000]
[83719.293192] Core dump to |/usr/share/apport/apport 60413 11 0 pipe failed
Strace for ld 给出以下输出
# strace ld -v
....
readlink("/usr/bin/ld.bfd", "hardened-ld", 4095) = 11
stat("/usr/bin/ld.bfd.real", {st_mode=S_IFREG|0755, st_size=30038, ...}) = 0
rt_sigaction(SIGFPE, {SIG_DFL, [], SA_RESTORER, 0x7f7ae6c06150}, {SIG_IGN, [FPE], SA_RESTORER|SA_RESTART, 0x7f7ae6c06150}, 8) = 0
execve("/usr/bin/ld.bfd.real", ["/usr/bin/ld.bfd.real", "-v"], [/* 20 vars */]) = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
从外部看来,ld 引用了一些错误的地址,但我不知道是什么导致了这个问题。
关于这个问题有什么建议吗?
最佳答案
GCC 文件似乎已损坏。重新安装 GCC 有助于纠正此问题。
关于linux - gcc 命令在链接 (ld) 操作时崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31756395/
我正在尝试创建尽可能小的 ELF。我创建了一个这样的测试文件(NASM 语法): SECTION .text dd 0xdeadbeef 使用此链接描述文件: SECTIONS { .text
GNU LD 链接器命令语言是否有条件语句? 背景:我正在为 arm cortex m0+ 开发固件,该固件由引导加载程序和应用程序组成。两者都在单独的项目中进行编译和刷新,但我使用了一个框架,其中包
我很确定 ld 有一个手册页链接器脚本语法,但我找不到它。 最佳答案 如果您更喜欢比 info 更方便的东西, 这是一个可浏览的 HTML 版本:ld.info: Scripts .但它可能不是完全最
谁能解决这个练习,这样我就能明白我错在哪里,因为有太多的 LOL 变量。 生成一个 C 代码,将其放在以下表达式之前 printf ("% ld% ld% ld \ n", lol, & lol, *
在他关于理解 Linux Kernel Initcall Mechanism 的文章中, Trevor 创建了一个用户空间程序来模拟调用 linux 驱动程序的 init_module() 的机制。
/usr/bin/ld: cannot find -ldlib /usr/bin/ld: cannot find -lcblas /usr/bin/ld: cannot find -llapack 在
我想以 json-ld 格式创建一组人,但我需要保留一些键而不是使用数组,所以我首先尝试了这个: { "@context" : { "@base" : "http://www.exampl
所以我试图围绕 JSON-LD 进行思考,我看到的所有示例主要包括嵌入“链接数据”。但我想提供对链接数据的引用(主要是因为嵌入所有数据可能会产生 10MB 的有效负载)。所以我想知道我这样做是否正确。
我在这里复制了 json-ld standard 中的示例的一部分: { "@context": { "foaf": "http://xmlns.com/foaf/0.1/", "
考虑这样一个程序: #include void foo() __attribute__((__weak__)); int main() { printf("%p\n", (void *)fo
我正在尝试使用一个名为 GLV 的小部件库对于我正在开发的应用程序。我正在运行 Linux Mint 17。我安装了所有库并成功构建了 GLV 库,但是当我尝试运行已构建的示例之一时,出现了此共享库错
在将未编辑的 JSON 数据转换为 JSON-LD 时,使用前缀和数据值为对象构造 IRI 时遇到问题。我运行的示例代码是: { "@context" : { "prefix" : "
假设我有一个 JSON 对象,它在嵌套对象中包含一些属性。 { "title": "My Blog Post", "meta": { "publishedAt": "2
我是 JSON-LD 和 LOD 的新手,所以请原谅我使用的术语。我正致力于在 JSON-LD 中创建数据模型,以描述基于欧洲数据模型 (http://pro.europeana.eu/edm-doc
我有一个玩具 x86 汇编程序,我正在用 as 编写和编译它和 ld : .text .global _start _start: movq $1, %rax movq
我正在尝试创建 Google 的结构化数据,但不知道我在做什么。我将其设置为一个组织,然后将 SD 标记工具用于我的所有产品。我将每个 JSON-LD 产品直接从标记工具而不是嵌套放入它自己的脚本标签
我正在尝试创建 Google 的结构化数据,但不知道我在做什么。我将其设置为一个组织,然后将 SD 标记工具用于我的所有产品。我将每个 JSON-LD 产品直接从标记工具而不是嵌套放入它自己的脚本标签
我正在尝试使用 vcpkg 和 ndk r20 为 android arm 构建 tesseract我必须编辑 CMakeLists.txt 并添加 glob.c 和 glob.h,因为它们不在 nd
长话短说: 有没有办法让我(没有 root 访问权限)使链接器(由 gcc 调用)不知道 /etc/ld.so.conf 中包含的目录的内容 在通过 ldconfig 缓存之后? 详细说明: 我正在尝
我想将/opt/vertica/lib64 添加到系统库路径中,所以我执行以下步骤: (1) 将/opt/vertica/lib64加入/etc/ld.so.conf,运行ldconfig, (2)
我是一名优秀的程序员,十分优秀!