[PATCH] D127637: [MC] Ensure addrsig's section size is properly set

Jez Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 13 06:21:26 PDT 2022


int3 created this revision.
int3 added reviewers: lld-macho, alx32.
Herald added a subscriber: hiraditya.
Herald added a project: All.
int3 requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

We weren't setting its size, which caused problems when `__llvm_addrsig`
wasn't the last section. In particular, `__debug_line` (if created) is
generated and placed after `__llvm_addrsig`, and would result in an
invalid object file w/ overlapping sections being emitted.

Unfortunately, we have to iterate over all the addrsig symbols to
calculate the section size, but I'm not sure there's a better way to do
this.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D127637

Files:
  llvm/lib/MC/MCMachOStreamer.cpp
  llvm/lib/MC/MachObjectWriter.cpp
  llvm/test/CodeGen/AArch64/addrsig-macho.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D127637.436370.patch
Type: text/x-patch
Size: 4647 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220613/6a3a0d35/attachment.bin>


More information about the llvm-commits mailing list