[PATCH] D98648: [lld-macho] Place LC_FUNCTION_STARTS at the right position
Jez Ng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 15 11:12:07 PDT 2021
int3 created this revision.
int3 added a reviewer: lld-macho.
Herald added a project: lld-macho.
int3 requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
This pleases the codesign
(Otherwise it complains about "function starts data out of place")
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D98648
Files:
lld/MachO/Writer.cpp
lld/test/MachO/linkedit-contiguity.s
Index: lld/test/MachO/linkedit-contiguity.s
===================================================================
--- lld/test/MachO/linkedit-contiguity.s
+++ lld/test/MachO/linkedit-contiguity.s
@@ -30,7 +30,11 @@
# CHECK-NEXT: lazy_bind_off [[#LAZY_OFF: BIND_OFF + BIND_SIZE]]
# CHECK-NEXT: lazy_bind_size [[#LAZY_SIZE:]]
# CHECK-NEXT: export_off [[#EXPORT_OFF: LAZY_OFF + LAZY_SIZE]]
-# CHECK-NEXT: export_size [[#]]
+# CHECK-NEXT: export_size [[#EXPORT_SIZE:]]
+
+# CHECK: cmd LC_FUNCTION_STARTS
+# CHECK-NEXT: cmdsize
+# CHECK-NEXT: dataoff [[#FUNCSTARTS_OFF: EXPORT_OFF + EXPORT_SIZE]]
.text
.globl _main
Index: lld/MachO/Writer.cpp
===================================================================
--- lld/MachO/Writer.cpp
+++ lld/MachO/Writer.cpp
@@ -671,11 +671,12 @@
}
} else if (segname == segment_names::linkEdit) {
return StringSwitch<int>(osec->name)
- .Case(section_names::rebase, -8)
- .Case(section_names::binding, -7)
- .Case(section_names::weakBinding, -6)
- .Case(section_names::lazyBinding, -5)
- .Case(section_names::export_, -4)
+ .Case(section_names::rebase, -9)
+ .Case(section_names::binding, -8)
+ .Case(section_names::weakBinding, -7)
+ .Case(section_names::lazyBinding, -6)
+ .Case(section_names::export_, -5)
+ .Case(section_names::functionStarts, -4)
.Case(section_names::symbolTable, -3)
.Case(section_names::indirectSymbolTable, -2)
.Case(section_names::stringTable, -1)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D98648.330736.patch
Type: text/x-patch
Size: 1533 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210315/74c3faea/attachment.bin>
More information about the llvm-commits
mailing list