summaryrefslogtreecommitdiffstats
path: root/llvm/test/Object/Inputs
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2014-04-07 23:12:20 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2014-04-07 23:12:20 +0000
commita1c861d379ffeec421c2be1f5adc1edc04a187c3 (patch)
tree87be1a43694233e4b916dbcbb5bc2457799fa3a3 /llvm/test/Object/Inputs
parent11bb3087390f28991dc93fe94faac9272bb7e699 (diff)
downloadbcm5719-llvm-a1c861d379ffeec421c2be1f5adc1edc04a187c3.tar.gz
bcm5719-llvm-a1c861d379ffeec421c2be1f5adc1edc04a187c3.zip
obj2yaml: Use the correct relocation type for different machine types
The IO normalizer would essentially lump I386 and AMD64 relocations together. Relocation types with the same numeric value would then get mapped in appropriately. For example: IMAGE_REL_AMD64_ADDR64 and IMAGE_REL_I386_DIR16 both have a numeric value of one. We would see IMAGE_REL_I386_DIR16 in obj2yaml conversions of object files with a machine type of IMAGE_FILE_MACHINE_AMD64. llvm-svn: 205746
Diffstat (limited to 'llvm/test/Object/Inputs')
-rw-r--r--llvm/test/Object/Inputs/COFF/x86-64.yaml17
-rw-r--r--llvm/test/Object/Inputs/trivial-object-test.coff-x86-64bin347 -> 437 bytes
2 files changed, 17 insertions, 0 deletions
diff --git a/llvm/test/Object/Inputs/COFF/x86-64.yaml b/llvm/test/Object/Inputs/COFF/x86-64.yaml
index 1dc2b10cf41..b8a863a429c 100644
--- a/llvm/test/Object/Inputs/COFF/x86-64.yaml
+++ b/llvm/test/Object/Inputs/COFF/x86-64.yaml
@@ -30,6 +30,16 @@ sections:
Characteristics: [IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE, ] # 0xc0100040
SectionData: !hex "48656C6C6F20576F726C642100" # |Hello World!.|
+ - !Section
+ Name: '.CRT$XCU'
+ Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
+ Alignment: 8
+ SectionData: !hex "0000000000000000"
+ Relocations:
+ - VirtualAddress: 0
+ SymbolName: '??__Ex@@YAXXZ'
+ Type: IMAGE_REL_AMD64_ADDR64
+
symbols:
- !Symbol
Name: .text
@@ -91,3 +101,10 @@ symbols:
ComplexType: IMAGE_SYM_DTYPE_NULL # (0)
StorageClass: IMAGE_SYM_CLASS_EXTERNAL # (2)
+ - !Symbol
+ Name: '??__Ex@@YAXXZ'
+ Value: 0
+ SectionNumber: 3
+ SimpleType: IMAGE_SYM_TYPE_NULL # (0)
+ ComplexType: IMAGE_SYM_DTYPE_FUNCTION # (2)
+ StorageClass: IMAGE_SYM_CLASS_STATIC # (3)
diff --git a/llvm/test/Object/Inputs/trivial-object-test.coff-x86-64 b/llvm/test/Object/Inputs/trivial-object-test.coff-x86-64
index 077591482ce..ed144d1265f 100644
--- a/llvm/test/Object/Inputs/trivial-object-test.coff-x86-64
+++ b/llvm/test/Object/Inputs/trivial-object-test.coff-x86-64
Binary files differ
OpenPOWER on IntegriCloud