[all-commits] [llvm/llvm-project] 747d67: [ELF] Make .interp/SHT_NOTE not special

Fangrui Song via All-commits all-commits at lists.llvm.org
Thu May 30 11:18:25 PDT 2024


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

  Changed paths:
    M lld/ELF/Writer.cpp
    M lld/test/ELF/linkerscript/orphan.s

  Log Message:
  -----------
  [ELF] Make .interp/SHT_NOTE not special

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
```

rw-text.lds in orphan.s (added by
73e07e924470ebab76a634e41fadf425a859e0ea) demonstrates a similar case.
The new behavior is more similar to GNU ld.

#93763 fixed BOLT's brittle reliance on the previous .interp behavior.



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