https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61577
--- Comment #53 from The Written Word <bugzilla-gcc at thewrittenword dot com> --- (In reply to EML from comment #52) > Note, regardless of reverting the gprel patch, GCC 8 puts the data in > .rodata. > > However, doesn't gcc 4.9.x do the same thing, it just moves it to GOT with > ltoffx? > > .file "foo.c" > .pred.safe_across_calls p1-p5,p16-p63 > .section .text, "ax", "progbits" > .Ltext0: > .section .rodata, "a", "progbits" > .align 8 > .LC0: > stringz "Hellos World" > .section .text, "ax", "progbits" > > > Isn't LC0 here also in .rodata? > > objdump -h -s fooContents of section .rodata: > 40007f8 48656c6c 6f732057 6f726c64 00 Hellos World. > > > So gcc 4.9.x also puts the string into rodata? > > (Not sure I'm reading all the files correctly, so perhaps I'm just reading > it all wrong) gcc-4.4.6 does: .file "hello.c" .pred.safe_across_calls p1-p5,p16-p63 .section .rodata, "a", "progbits" .align 8 .LC0: stringz "Hellos World" .section .text, "ax", "progbits" .align 16 gcc-4.6.4 does: .file "hello.c" .pred.safe_across_calls p1-p5,p16-p63 .section .rodata, "a", "progbits" .align 8 .LC0: stringz "Hellos World" .section .text, "ax", "progbits" .align 16 gcc-4.7.4 does: .pred.safe_across_calls p1-p5,p16-p63 .section .rodata, "a", "progbits" .align 8 .LC0: stringz "Hellos World" .section .text, "ax", "progbits" .align 16 gcc-4.8.5 does: .pred.safe_across_calls p1-p5,p16-p63 .section .rodata, "a", "progbits" .align 8 .LC0: stringz "Hellos World" .section .text, "ax", "progbits" .align 16 gcc-4.9.4 (with gprel patch reverted) does: .file "hello.c" .pred.safe_across_calls p1-p5,p16-p63 .section .rodata, "a", "progbits" .align 8 .LC0: stringz "Hellos World" .section .text, "ax", "progbits" .align 16 gcc-8.3.0 (first stage) does: .section .text, "ax", "progbits" .section .rodata, "a", "progbits" .align 8 .LC0: stringz "Hellos World" .section .text, "ax", "progbits" .align 16