const MCSectionELF &Section =
static_cast<const MCSectionELF&>(Symbol.getSection());
- if (Section.getFlags() & MCSectionELF::SHF_MERGE)
- return Target.getConstant() != 0;
-
if (SD.isExternal())
return true;
+ if (Section.getFlags() & MCSectionELF::SHF_MERGE)
+ return Target.getConstant() != 0;
+
MCSymbolRefExpr::VariantKind Kind = Target.getSymA()->getKind();
const MCSectionELF &Sec2 =
static_cast<const MCSectionELF&>(F.getParent()->getSection());
movl $.Lfoo+2, %edi
jmp foo@PLT
movq foo@GOTPCREL, %rax
+ movq zed, %rax
.section .sec1,"aM",@progbits,16
.Lfoo:
+zed:
+ .global zed
.section bar,"ax",@progbits
foo:
// CHECK-NEXT: ('st_other', 0)
// CHECK-NEXT: ('st_shndx', 4)
+// Symbol number 8 is zed
+// CHECK: # Symbol 8
+// CHECK-NEXT: (('st_name', 11) # 'zed'
+
// Relocation 0 refers to symbol 1
// CHECK: ('_relocations', [
// CHECK-NEXT: # Relocation 0
// CHECK-NEXT: ('r_type', 9
// CHECK-NEXT: ('r_addend',
// CHECK-NEXT: ),
+
+// Relocation 5 refers to symbol 8
+// CHECK-NEXT: # Relocation 5
+// CHECK-NEXT: (('r_offset', 35)
+// CHECK-NEXT: ('r_sym', 8)
+// CHECK-NEXT: ('r_type', 11)
+// CHECK-NEXT: ('r_addend', 0)
+// CHECK-NEXT: ),
// CHECK-NEXT: ])