[PATCH] D100615: [RISCV][Driver] Make the ordering of CmdArgs consistent between RISCV::Linker and baremetal::Linker

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 15 21:03:12 PDT 2021


MaskRay accepted this revision.
MaskRay added a comment.
This revision is now accepted and ready to land.

LG.

A better test should have a few more stuff, see Xlinker-args.c
Instead of saying --defsym takes precedence over T_Group options, you can say that -T is the last.

> Few more word for this issue, the option order is matter for linker both for GNU ld and lld, in the test @arcbbb provided, ABC will treat as undefined in a.lds if the order is wrong.

While GNU people may not like it, I think relying on the order between --defsym and -T is highly problematic: https://sourceware.org/pipermail/libc-alpha/2020-March/111920.html


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D100615/new/

https://reviews.llvm.org/D100615



More information about the cfe-commits mailing list