[Bug middle-end/92183] New: gcc tries to create a relocation in a mergeable section
rafael at espindo dot la
gcc-bugzilla@gcc.gnu.org
Wed Oct 23 02:27:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92183
Bug ID: 92183
Summary: gcc tries to create a relocation in a mergeable
section
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
Assignee: unassigned at gcc dot gnu.org
Reporter: rafael at espindo dot la
Target Milestone: ---
Given
struct foo {
const char *bar;
const char *zed;
};
void g(struct foo *r);
void f() {
struct foo t = {"bar", "zed"};
g(&t);
}
gcc -O3 produces
.section .rodata.str1.1,"aMS",@progbits,1
.LC0:
.string "bar"
.LC1:
.string "zed"
....
.section .rodata.cst8,"aM",@progbits,8
.align 8
.LC2:
.quad .LC1
While it is not illegal to have a relocation in a mergeable section, I don't
know of any linker that supports that, so gcc is being over aggressive.
More information about the Gcc-bugs
mailing list