llvm-project
9ad0175e - [ELF] Keep non-alloc orphan sections at the end

Commit
1 year ago
[ELF] Keep non-alloc orphan sections at the end https://reviews.llvm.org/D85867 changed the way we assign file offsets (alloc sections first, then non-alloc sections). It also removed a non-alloc special case from `findOrphanPos`. Looking at the memory-nonalloc-no-warn.test change, which would be needed by #93761, it makes sense to restore the previous behavior: when placing non-alloc orphan sections, keep these sections at the end so that the section index order matches the file offset order. This change is cosmetic. In sections-nonalloc.s, GNU ld places the orphan `other3` in the middle and the orphan .symtab/.shstrtab/.strtab at the end. Pull Request: https://github.com/llvm/llvm-project/pull/94519
Author
Parents
Loading