OSDN Git Service

[ELF] Ignore --no-relax for RISC-V
authorFangrui Song <maskray@google.com>
Tue, 7 Jul 2020 16:47:08 +0000 (09:47 -0700)
committerFangrui Song <maskray@google.com>
Tue, 7 Jul 2020 16:48:13 +0000 (09:48 -0700)
commit09b81a72ac67c035f74ff369e6862d75cc4c4090
tree12dfcd56529aae21b37f4fed61ff6ff2cb0a63a8
parentc64bb3f7367a924e9d17dfccccc1c92897e6cbe1
[ELF] Ignore --no-relax for RISC-V

In GNU ld, --no-relax can disable x86-64 GOTPCRELX relaxation.
It is not useful, so we don't implement it.

For RISC-V, --no-relax disables linker relaxations which have larger
impact.
Linux kernel specifies --no-relax when CONFIG_DYNAMIC_FTRACE is specified
(since http://git.kernel.org/linus/a1d2a6b4cee858a2f27eebce731fbf1dfd72cb4e ).
LLD has not implemented the relaxations, so this option is a no-op.

Reviewed By: grimar

Differential Revision: https://reviews.llvm.org/D81359
lld/ELF/Options.td
lld/docs/ld.lld.1
lld/test/ELF/silent-ignore.test