Prohibit relaxing the initial gp generation
authorPalmer Dabbelt <palmer@dabbelt.com>
Fri, 17 Mar 2017 22:39:02 +0000 (15:39 -0700)
committerAndrew Waterman <andrew@sifive.com>
Thu, 30 Mar 2017 02:47:17 +0000 (19:47 -0700)
commitd5f7bd296f72c1a75a910aff6dd9c43f4365a188
treeb9def235c120b51596f921ef7b91a1b5b8a13db6
parent610e0cb499a807287320fb13701cdee373a0a091
Prohibit relaxing the initial gp generation

I've added an additional linker relaxation that relaxes two instruction
pc-relative sequences to one instruction gp relative sequences when
possible.  This sequence now optimizes the initial gp generation to

  mv gp, gp

which is obviously bogus.  The fix is to disable relaxations when
setting up gp, preventing the linker from relaxing away this setup code.
benchmarks/common/crt.S
debug/programs/entry.S