return sectionPriorities;
auto addSym = [&](Defined &sym) {
+ if (sym.isAbsolute())
+ return;
+
auto it = config->priorities.find(sym.getName());
if (it == config->priorities.end())
return;
# RUN: rm -rf %t; split-file %s %t
# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/test.s -o %t/test.o
# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/foo.s -o %t/foo.o
+# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/abs.s -o %t/abs.o
# RUN: llvm-ar rcs %t/foo.a %t/foo.o
# FOO-FIRST: <_bar>:
# RUN: %lld -lSystem -o %t/test-alias %t/foo.o %t/test.o -order_file %t/ord-alias
# RUN: llvm-objdump -d %t/test-alias | FileCheck %s --check-prefix=FOO-FIRST
+## Absolute in symbols in order files make no sense. Just ignore them.
+# RUN: %lld -lSystem -dylib -o %t/test-abs %t/abs.o -order_file %t/ord-abs
+
#--- ord-1
-[Foo doFoo:andBar:] # just a comment
_main # another comment
_main
-[Foo doFoo:andBar:]
+#--- ord-abs
+_abs
+
#--- foo.s
.globl "-[Foo doFoo:andBar:]"
"-[Foo doFoo:andBar:]":
.section __DWARF,__debug_aranges,regular,debug
ltmp1:
.byte 0
+
+#--- abs.s
+_abs = 42