https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61577
--- Comment #43 from The Written Word <bugzilla-gcc at thewrittenword dot com> --- (In reply to dave.anglin from comment #42) > On 2019-07-05 12:57 a.m., bugzilla-gcc at thewrittenword dot com wrote: > > I can now duplicate what you're seeing: > > $ diff -u gcc-4.9.4/hello.s gcc-8.3.0/hello.s > > --- gcc-4.9.3/hello.s 2019-07-05 04:55:49 +0000 > > +++ gcc-8.3.0/hello.s 2019-07-05 04:55:44 +0000 > > @@ -1,5 +1,6 @@ > > .file "hello.c" > > .pred.safe_across_calls p1-p5,p16-p63 > > + .section .text, "ax", "progbits" > > .section .rodata, "a", "progbits" > With 8.3.0 assembly output, what happens if you change ".rodata" to ".data"? > It may > be that hpux can't handle gprel in .rodata. > > The other possibility is gp is wrong. > > .align 8 > > .LC0: > > @@ -19,9 +20,9 @@ > > mov r32 = b0 > > mov r35 = r1 > > .body > > - addl r36 = @ltoffx(.LC0), r1 > > + movl r36 = @gprel(.LC0) > > ;; > > - ld8.mov r36 = [r36], .LC0 > > + add r36 = r1, r36 > > br.call.sptk.many b0 = puts# > > mov r1 = r35 > > mov r14 = r0 $ /opt/build/china/gcc-8.3.0/.obj-/./gcc/xgcc -B/opt/build/china/gcc-8.3.0/.obj-/./gcc/ -B/opt/build/gcc8/ia64-hp-hpux11.31/bin/ -B/opt/build/gcc8/ia64-hp-hpux11.31 /lib/ -isystem /opt/build/gcc8/ia64-hp-hpux11.31/include -isystem /opt/build/gcc8/ia64-hp-hpux11.31/sys-include hello.s hello.s: Assembler messages: hello.s:4: Warning: ignoring changed section attributes for .data $ ./a.out `