[PATCH] D139909: [lld-macho] Fix __objc_stubs ordering
Keith Smiley via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 12 21:02:06 PST 2022
keith updated this revision to Diff 482355.
keith added a comment.
Fix test addrs
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D139909/new/
https://reviews.llvm.org/D139909
Files:
lld/MachO/OutputSegment.cpp
lld/test/MachO/x86-64-objc-stubs.s
Index: lld/test/MachO/x86-64-objc-stubs.s
===================================================================
--- lld/test/MachO/x86-64-objc-stubs.s
+++ lld/test/MachO/x86-64-objc-stubs.s
@@ -7,12 +7,12 @@
# CHECK: Contents of (__TEXT,__objc_stubs) section
# CHECK-NEXT: _objc_msgSend$foo:
-# CHECK-NEXT: 00000001000004b8 movq 0x1b51(%rip), %rsi
-# CHECK-NEXT: 00000001000004bf jmpq *0xb3b(%rip)
+# CHECK-NEXT: 00000001000004a9 movq 0x1b60(%rip), %rsi
+# CHECK-NEXT: 00000001000004b0 jmpq *0xb4a(%rip)
# CHECK-NEXT: _objc_msgSend$length:
-# CHECK-NEXT: 00000001000004c5 movq 0x1b4c(%rip), %rsi
-# CHECK-NEXT: 00000001000004cc jmpq *0xb2e(%rip)
+# CHECK-NEXT: 00000001000004b6 movq 0x1b5b(%rip), %rsi
+# CHECK-NEXT: 00000001000004bd jmpq *0xb3d(%rip)
# CHECK-EMPTY:
Index: lld/MachO/OutputSegment.cpp
===================================================================
--- lld/MachO/OutputSegment.cpp
+++ lld/MachO/OutputSegment.cpp
@@ -90,10 +90,11 @@
// Sections are uniquely identified by their segment + section name.
if (segname == segment_names::text) {
return StringSwitch<int>(osec->name)
- .Case(section_names::header, -5)
- .Case(section_names::text, -4)
- .Case(section_names::stubs, -3)
- .Case(section_names::stubHelper, -2)
+ .Case(section_names::header, -6)
+ .Case(section_names::text, -5)
+ .Case(section_names::stubs, -4)
+ .Case(section_names::stubHelper, -3)
+ .Case(section_names::objcStubs, -2)
.Case(section_names::initOffsets, -1)
.Case(section_names::unwindInfo, std::numeric_limits<int>::max() - 1)
.Case(section_names::ehFrame, std::numeric_limits<int>::max())
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D139909.482355.patch
Type: text/x-patch
Size: 1700 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221213/8d6baec1/attachment.bin>
More information about the llvm-commits
mailing list