summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorFrederic Riss <friss@apple.com>2015-12-11 17:50:37 +0000
committerFrederic Riss <friss@apple.com>2015-12-11 17:50:37 +0000
commit841b1732dfcf7293094c4aab811e976945bf7977 (patch)
treeca1501d2dcce48473eefb5c31d4e828915212f4c /llvm/test
parentf2ac6882179370bc1eacacad68d077520eec0557 (diff)
downloadbcm5719-llvm-841b1732dfcf7293094c4aab811e976945bf7977.tar.gz
bcm5719-llvm-841b1732dfcf7293094c4aab811e976945bf7977.zip
[dsymutil] Ignore absolute symbols in the debug map
Quoting from the comment added to the code: // Objective-C on i386 uses artificial absolute symbols to // perform some link time checks. Those symbols have a fixed 0 // address that might conflict with real symbols in the object // file. As I cannot see a way for absolute symbols to find // their way into the debug information, let's just ignore those. llvm-svn: 255350
Diffstat (limited to 'llvm/test')
-rwxr-xr-xllvm/test/tools/dsymutil/Inputs/absolute_sym.macho.i386bin0 -> 8592 bytes
-rw-r--r--llvm/test/tools/dsymutil/Inputs/absolute_sym.macho.i386.obin0 -> 2472 bytes
-rw-r--r--llvm/test/tools/dsymutil/absolute_symbol.test16
3 files changed, 16 insertions, 0 deletions
diff --git a/llvm/test/tools/dsymutil/Inputs/absolute_sym.macho.i386 b/llvm/test/tools/dsymutil/Inputs/absolute_sym.macho.i386
new file mode 100755
index 00000000000..5ca0f2d6868
--- /dev/null
+++ b/llvm/test/tools/dsymutil/Inputs/absolute_sym.macho.i386
Binary files differ
diff --git a/llvm/test/tools/dsymutil/Inputs/absolute_sym.macho.i386.o b/llvm/test/tools/dsymutil/Inputs/absolute_sym.macho.i386.o
new file mode 100644
index 00000000000..445e32271cf
--- /dev/null
+++ b/llvm/test/tools/dsymutil/Inputs/absolute_sym.macho.i386.o
Binary files differ
diff --git a/llvm/test/tools/dsymutil/absolute_symbol.test b/llvm/test/tools/dsymutil/absolute_symbol.test
new file mode 100644
index 00000000000..cdd6ae83213
--- /dev/null
+++ b/llvm/test/tools/dsymutil/absolute_symbol.test
@@ -0,0 +1,16 @@
+RUN: llvm-dsymutil -dump-debug-map -oso-prepend-path %p %p/Inputs/absolute_sym.macho.i386 | FileCheck %s
+
+The tested object file has been created by the dummy Objective-C code:
+@interface Foo
+@end
+
+@implementation Foo
+@end
+
+int main() { return 0; }
+
+compiled for i386. This create an absolute symbol .objc_class_name_Foo
+We must not consider this symbol for debug info linking as its address
+might conflict with other real symbols in the same file.
+
+CHECK-NOT: objc_class_name_Foo
OpenPOWER on IntegriCloud