[PATCH] D95199: [ELF] Write output sections in PT_LOAD segment order

Patrick Oppenlander via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 21 19:04:30 PST 2021


pattop created this revision.
Herald added subscribers: arichardson, emaste.
Herald added a reviewer: MaskRay.
pattop requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Previously if sections in a link script were not in program segment
order lld often failed with file range overlap errors.

The new out-of-order-sections test case previously failed with:

ld.lld: error: section .foo file range overlaps with .bar

>>> .foo range is [0x2000, 0x2000]
>>> .bar range is [0x2000, 0x2000]


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D95199

Files:
  lld/ELF/Writer.cpp
  lld/test/ELF/linkerscript/at8.test
  lld/test/ELF/linkerscript/empty-sections-expressions.test
  lld/test/ELF/linkerscript/implicit-program-header.test
  lld/test/ELF/linkerscript/nobits-offset.s
  lld/test/ELF/linkerscript/out-of-order-sections.s
  lld/test/ELF/linkerscript/tbss.s
  lld/test/ELF/partition-notes.s
  lld/test/ELF/partition-synthetic-sections.s
  lld/test/ELF/tls-offset.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D95199.318394.patch
Type: text/x-patch
Size: 8668 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210122/624562cf/attachment.bin>


More information about the llvm-commits mailing list