mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 18:54:02 +01:00
llvm-nm should show a symbol type of T for symbols in the (__TEXT_EXEC,__text) section.
When a the Apple link editor builds a kext bundle file type and the value of the -miphoneos-version-min argument is significantly current (like 11.0) then the (__TEXT,__text) section is changed to the (__TEXT_EXEC,__text) section. So it would be nice for llvm-nm to show symbols in that section with a type of T instead of the generic type of S for some section other than text, data, etc. rdar://36262205 llvm-svn: 323836
This commit is contained in:
parent
8b0cbc46f7
commit
d55cebfaec
BIN
test/tools/llvm-nm/AArch64/Inputs/kextbundle.macho-aarch64
Executable file
BIN
test/tools/llvm-nm/AArch64/Inputs/kextbundle.macho-aarch64
Executable file
Binary file not shown.
2
test/tools/llvm-nm/AArch64/lit.local.cfg
Normal file
2
test/tools/llvm-nm/AArch64/lit.local.cfg
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
if not 'AArch64' in config.root.targets:
|
||||||
|
config.unsupported = True
|
4
test/tools/llvm-nm/AArch64/macho-kextbundle.test
Normal file
4
test/tools/llvm-nm/AArch64/macho-kextbundle.test
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
RUN: llvm-nm %p/Inputs/kextbundle.macho-aarch64 | FileCheck %s
|
||||||
|
|
||||||
|
CHECK: 0000000000004014 s _bar.stub
|
||||||
|
CHECK: 0000000000004000 T _foo
|
@ -1004,6 +1004,10 @@ static char getSymbolNMTypeChar(MachOObjectFile &Obj, basic_symbol_iterator I) {
|
|||||||
StringRef SectionName;
|
StringRef SectionName;
|
||||||
Obj.getSectionName(Ref, SectionName);
|
Obj.getSectionName(Ref, SectionName);
|
||||||
StringRef SegmentName = Obj.getSectionFinalSegmentName(Ref);
|
StringRef SegmentName = Obj.getSectionFinalSegmentName(Ref);
|
||||||
|
if (Obj.is64Bit() &&
|
||||||
|
Obj.getHeader64().filetype == MachO::MH_KEXT_BUNDLE &&
|
||||||
|
SegmentName == "__TEXT_EXEC" && SectionName == "__text")
|
||||||
|
return 't';
|
||||||
if (SegmentName == "__TEXT" && SectionName == "__text")
|
if (SegmentName == "__TEXT" && SectionName == "__text")
|
||||||
return 't';
|
return 't';
|
||||||
if (SegmentName == "__DATA" && SectionName == "__data")
|
if (SegmentName == "__DATA" && SectionName == "__data")
|
||||||
|
Loading…
Reference in New Issue
Block a user