[PATCH] D43228: [ELF] Allow redefining LMA for a section within a segment.

Igor Kudrin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 13 02:49:43 PST 2018


ikudrin created this revision.
ikudrin added reviewers: rafael, ruiu.
ikudrin added a project: lld.
Herald added subscribers: arichardson, emaste.

We have a constraint that all sections within a segment have the same difference between LMA and VMA.
If we encounter a section with a customized LMA, we might create a new segment, but not in the case
when all program headers are explicitly defined by a linker script. In that case, the setting is just ignored.

This patch allows sections within one segment to have different LMA offsets. The behavior is similar to GNU ld's.

The patch, technically, reverts r323456 and fixes PR36017 in a different. way.


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D43228

Files:
  ELF/LinkerScript.cpp
  ELF/OutputSections.h
  ELF/Writer.cpp
  ELF/Writer.h
  test/ELF/linkerscript/at4.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D43228.134010.patch
Type: text/x-patch
Size: 6986 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180213/2fa0e9d6/attachment.bin>


More information about the llvm-commits mailing list