mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 03:02:36 +01:00
Reapply: "objdump: Support newer ObjC image info flags"
Summary: Add support for two additional ObjC image info flags: `IS_SIMULATED` and `HAS_CATEGORY_CLASS_PROPERTIES`. `IS_SIMULATED` indicates a Mach-O binary built for iOS simulator. `HAS_CATEGORY_CLASS_PROPERTIES` indicates a Mach-O binary built by a compiler that supports class properties in categories. Reviewers: enderby, compnerd Reviewed By: compnerd Subscribers: keith, llvm-commits Differential Revision: https://reviews.llvm.org/D48568 llvm-svn: 336411
This commit is contained in:
parent
04093c3826
commit
67c9c1fb9d
7
test/tools/llvm-objdump/X86/macho-image-info.test
Normal file
7
test/tools/llvm-objdump/X86/macho-image-info.test
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
# RUN: llvm-mc < %s -triple x86_64-darwin -filetype=obj | llvm-objdump -m -objc-meta-data - | FileCheck %s
|
||||||
|
|
||||||
|
.section __DATA,__objc_imageinfo,regular,no_dead_strip
|
||||||
|
.long 0
|
||||||
|
.long 96
|
||||||
|
|
||||||
|
# CHECK: OBJC_IMAGE_IS_SIMULATED OBJC_IMAGE_HAS_CATEGORY_CLASS_PROPERTIES
|
@ -3229,6 +3229,8 @@ struct imageInfo_t {
|
|||||||
/* masks for objc_image_info.flags */
|
/* masks for objc_image_info.flags */
|
||||||
#define OBJC_IMAGE_IS_REPLACEMENT (1 << 0)
|
#define OBJC_IMAGE_IS_REPLACEMENT (1 << 0)
|
||||||
#define OBJC_IMAGE_SUPPORTS_GC (1 << 1)
|
#define OBJC_IMAGE_SUPPORTS_GC (1 << 1)
|
||||||
|
#define OBJC_IMAGE_IS_SIMULATED (1 << 5)
|
||||||
|
#define OBJC_IMAGE_HAS_CATEGORY_CLASS_PROPERTIES (1 << 6)
|
||||||
|
|
||||||
struct message_ref64 {
|
struct message_ref64 {
|
||||||
uint64_t imp; /* IMP (64-bit pointer) */
|
uint64_t imp; /* IMP (64-bit pointer) */
|
||||||
@ -5590,6 +5592,10 @@ static void print_image_info64(SectionRef S, struct DisassembleInfo *info) {
|
|||||||
outs() << " OBJC_IMAGE_IS_REPLACEMENT";
|
outs() << " OBJC_IMAGE_IS_REPLACEMENT";
|
||||||
if (o.flags & OBJC_IMAGE_SUPPORTS_GC)
|
if (o.flags & OBJC_IMAGE_SUPPORTS_GC)
|
||||||
outs() << " OBJC_IMAGE_SUPPORTS_GC";
|
outs() << " OBJC_IMAGE_SUPPORTS_GC";
|
||||||
|
if (o.flags & OBJC_IMAGE_IS_SIMULATED)
|
||||||
|
outs() << " OBJC_IMAGE_IS_SIMULATED";
|
||||||
|
if (o.flags & OBJC_IMAGE_HAS_CATEGORY_CLASS_PROPERTIES)
|
||||||
|
outs() << " OBJC_IMAGE_HAS_CATEGORY_CLASS_PROPERTIES";
|
||||||
swift_version = (o.flags >> 8) & 0xff;
|
swift_version = (o.flags >> 8) & 0xff;
|
||||||
if (swift_version != 0) {
|
if (swift_version != 0) {
|
||||||
if (swift_version == 1)
|
if (swift_version == 1)
|
||||||
|
Loading…
Reference in New Issue
Block a user