[all-commits] [llvm/llvm-project] 2e0cfe: [ELF] Simplify getSectionRank

Fangrui Song via All-commits all-commits at lists.llvm.org
Wed May 29 16:41:34 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2e0cfe69d0d705e9c5d5f217625bf7e3a0e90871
      https://github.com/llvm/llvm-project/commit/2e0cfe69d0d705e9c5d5f217625bf7e3a0e90871
  Author: Fangrui Song <i at maskray.me>
  Date:   2024-05-29 (Wed, 29 May 2024)

  Changed paths:
    M lld/ELF/Writer.cpp

  Log Message:
  -----------
  [ELF] Simplify getSectionRank

Follow-up to a previous simplification
2473b1af085ad54e89666cedf684fdf10a84f058.

The xor difference between a SHT_NOTE and a read-only SHT_PROGBITS
(previously >=NOT_SPECIAL) should be smaller than RF_EXEC. Otherwise,
for the following section layout, `findOrphanPos` would place .text
before note.

```
// simplified from linkerscript/custom-section-type.s
non orphans:
progbits 0x8060c00 NOT_SPECIAL
note     0x8040003

orphan:
.text    0x8061000 NOT_SPECIAL
```



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list