2020-07-20 15:39:14 +08:00
|
|
|
// RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj -r -S --sd - | FileCheck %s
|
2017-12-15 02:46:43 +08:00
|
|
|
.file 2 "foo"
|
|
|
|
.file 1 "bar"
|
|
|
|
.loc 2 64 0
|
2010-12-23 05:15:13 +08:00
|
|
|
nop
|
|
|
|
|
2015-09-05 09:02:05 +08:00
|
|
|
// CHECK: Section {
|
|
|
|
// CHECK: Index: 1
|
|
|
|
// CHECK: Name: __debug_line (5F 5F 64 65 62 75 67 5F 6C 69 6E 65 00 00 00 00)
|
|
|
|
// CHECK: Segment: __DWARF (5F 5F 44 57 41 52 46 00 00 00 00 00 00 00 00 00)
|
|
|
|
// CHECK: Address: 0x1
|
2018-09-13 21:13:50 +08:00
|
|
|
// CHECK: Size: 0x3D
|
2015-09-05 09:02:05 +08:00
|
|
|
// CHECK: Offset: 237
|
|
|
|
// CHECK: Alignment: 0
|
2017-12-15 02:46:43 +08:00
|
|
|
// CHECK: RelocationOffset: 0x12C
|
2015-09-05 09:02:05 +08:00
|
|
|
// CHECK: RelocationCount: 1
|
[llvm-readobj][MachO] Fix section type printing
Summary:
Currently, llvm-readobj mistakenly decodes section type as section attribute.
This patch fixes the bug and affected tests.
Reviewers: JDevlieghere, jhenderson, rupprecht, alexshap, echristo
Reviewed By: jhenderson, rupprecht, alexshap, echristo
Subscribers: javed.absar, rupprecht, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D66075
llvm-svn: 368974
2019-08-15 15:22:04 +08:00
|
|
|
// CHECK: Type: Regular (0x0)
|
2015-09-05 09:02:05 +08:00
|
|
|
// CHECK: Attributes [ (0x20000)
|
|
|
|
// CHECK: Debug (0x20000)
|
|
|
|
// CHECK: ]
|
|
|
|
// CHECK: Reserved1: 0x0
|
|
|
|
// CHECK: Reserved2: 0x0
|
|
|
|
// CHECK: SectionData (
|
2018-09-13 21:13:50 +08:00
|
|
|
// CHECK: 000: 39000000 04002200 00000101 01FB0E0D |9.....".........|
|
|
|
|
// CHECK: 010: 00010101 01000000 01000001 00626172 |.............bar|
|
|
|
|
// CHECK: 020: 00000000 666F6F00 00000000 04020005 |....foo.........|
|
|
|
|
// CHECK: 030: 02000000 00033F01 02010001 01 |......?......|
|
2015-09-05 09:02:05 +08:00
|
|
|
// CHECK: )
|
|
|
|
// CHECK: }
|
|
|
|
// CHECK: ]
|
|
|
|
// CHECK: Relocations [
|
|
|
|
// CHECK: Section __debug_line {
|
2018-09-13 21:13:50 +08:00
|
|
|
// CHECK: 0x31 0 2 0 GENERIC_RELOC_VANILLA 0 __text
|
2015-09-05 09:02:05 +08:00
|
|
|
// CHECK: }
|
|
|
|
// CHECK: ]
|