Page MenuHomePhabricator

[RISCV] Define FeatureRelax and shouldForceRelocation for RISCV linker relaxation

Authored by shiva0217 on May 9 2018, 11:41 PM.


  1. Deine FeatureRelax to enable/disable linker relaxation
  1. Define shouldForceRelocation to preserve relocation types when linker relaxation enabled. So then linker could fixup branches offsets while relaxation.

Diff Detail


Event Timeline

shiva0217 created this revision.May 9 2018, 11:41 PM
asb accepted this revision.May 14 2018, 1:51 PM

Thanks Shiva. I've suggested an alternate phrasing of the comment on shouldForceRelocation but this is looking good to me.

46–47 ↗(On Diff #146070)

I think this would be clearer rephrased with something like:

"If linker relaxation is enabled, always emit relocations even if the fixup can be resolved. This is necessary for correctness as offsets may change during relaxation."

This revision is now accepted and ready to land.May 14 2018, 1:51 PM
shiva0217 updated this revision to Diff 146730.May 14 2018, 6:29 PM

update comments for shouldForceRelocation.

This revision was automatically updated to reflect the committed changes.