[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/10911] New: ld -s -static breaks IRELATIVE relocations
From: |
jakub at redhat dot com |
Subject: |
[Bug ld/10911] New: ld -s -static breaks IRELATIVE relocations |
Date: |
6 Nov 2009 09:38:50 -0000 |
.text
.type foo, @gnu_indirect_function
.globl foo
foo:
leaq __foo(%rip), %rax
retq
.type __foo, @function
__foo:
retq
.type _start, @function
.globl _start
_start:
call foo
1: jmp 1b
$ as -o t.o t.s
$ ld -static -o t t.o
$ readelf -Wr t
Relocation section '.rela.plt' at offset 0xb0 contains 1 entries:
Offset Info Type Symbol's Value
Symbol's Name + Addend
00000000006000e8 0000000000000025 R_X86_64_IRELATIVE
00000000004000d8
$ strip t
$ readelf -Wr t
Relocation section '.rela.plt' at offset 0xb0 contains 1 entries:
Offset Info Type Symbol's Value
Symbol's Name + Addend
00000000006000e8 0000000000000025 R_X86_64_IRELATIVE
00000000004000d8
$ ld -static -s -o t t.o
Relocation section '.rela.plt' at offset 0xb0 contains 1 entries:
Offset Info Type Symbol's Value
Symbol's Name + Addend
0000000000000000 0000000000000000 R_X86_64_NONE
0000000000000000
While this minimal testcase won't work in any case, when actually linking a real
program (say replace _start with main and link with -lc), the program will die
because of unexpected reloc type in statically linked binary.
--
Summary: ld -s -static breaks IRELATIVE relocations
Product: binutils
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: ld
AssignedTo: unassigned at sources dot redhat dot com
ReportedBy: jakub at redhat dot com
CC: bug-binutils at gnu dot org
GCC target triplet: x86_64-linux
http://sourceware.org/bugzilla/show_bug.cgi?id=10911
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
- [Bug ld/10911] New: ld -s -static breaks IRELATIVE relocations,
jakub at redhat dot com <=
- [Bug ld/10911] ld -s -static breaks IRELATIVE relocations, jakub at redhat dot com, 2009/11/08
- [Bug ld/10911] ld -s -static breaks IRELATIVE relocations, hjl dot tools at gmail dot com, 2009/11/08
- [Bug ld/10911] ld -s -static breaks IRELATIVE relocations, hjl dot tools at gmail dot com, 2009/11/08
- [Bug ld/10911] ld -s -static breaks IRELATIVE relocations, cvs-commit at gcc dot gnu dot org, 2009/11/09
- [Bug ld/10911] ld -s -static breaks IRELATIVE relocations, hjl dot tools at gmail dot com, 2009/11/09