diff options
author | Fangrui Song <i@maskray.me> | 2021-06-30 11:35:50 -0700 |
---|---|---|
committer | Fangrui Song <i@maskray.me> | 2021-06-30 11:35:50 -0700 |
commit | 03051f7ac8a3e2eda44b8280290c90863a064f0e (patch) | |
tree | f587e51c47845cdc938e0461310ec46b827b13ac /llvm/lib/CodeGen/MachineOperand.cpp | |
parent | 9b0ddc2662addaa563b632c577996e515e1a7802 (diff) | |
download | llvm-03051f7ac8a3e2eda44b8280290c90863a064f0e.zip llvm-03051f7ac8a3e2eda44b8280290c90863a064f0e.tar.gz llvm-03051f7ac8a3e2eda44b8280290c90863a064f0e.tar.bz2 |
[ELF] Preserve section order within an INSERT AFTER command
For
```
SECTIONS {
text.0 : {}
text.1 : {}
text.2 : {}
} INSERT AFTER .data;
```
the current order is `.data text.2 text.1 text.0`. It makes more sense to
preserve the specified order and thus improve compatibility with GNU ld.
For
```
SECTIONS { text.0 : {} } INSERT AFTER .data;
SECTIONS { text.3 : {} } INSERT AFTER .data;
```
GNU ld somehow collects sections with `INSERT AFTER .data` together (IMO
inconsistent) but I think it makes more sense to execute the commands in order
and get `.data text.3 text.0` instead.
Reviewed By: peter.smith
Differential Revision: https://reviews.llvm.org/D105158
Diffstat (limited to 'llvm/lib/CodeGen/MachineOperand.cpp')
0 files changed, 0 insertions, 0 deletions