https://sourceware.org/bugzilla/show_bug.cgi?id=21493
Bug ID: 21493
Summary: gold -r corrupts comdats
Product: binutils
Version: unspecified
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: gold
Assignee: ccoutant at gmail dot com
Reporter: rafael.espindola at gmail dot com
CC: ian at airs dot com
Target Milestone: ---
Given just
------------------------------------------
.globl _start
_start:
callq foo
.section .text.bar,"axG",@progbits,abc,comdat
.section .text.foo,"axG",@progbits,xyz,comdat
.global foo
foo:
mov $60, %rax
mov $0, %rdi
syscall
------------------------------------------
the produced .o file has
[ 1] .group GROUP 0000000000000000 000040 000008
04 10 6 4
[ 2] .group GROUP 0000000000000000 000048 000008
04 10 7 4
6: 0000000000000000 0 NOTYPE LOCAL DEFAULT 1 abc
7: 0000000000000000 0 NOTYPE LOCAL DEFAULT 2 xyz
I.E, the sh_info points to the symbols where the group names are to be found.
If we pass it to "gold -r", the output has
[ 1] abc GROUP 0000000000000000 000040 000008
04 9 1 4
[ 2] xyz GROUP 0000000000000000 000048 000008
04 9 2 4
1: 0000000000000000 0 SECTION LOCAL DEFAULT 1
2: 0000000000000000 0 SECTION LOCAL DEFAULT 2
I.E., the sh_points to the section symbols.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
bug-binutils mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-binutils