File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -1050,8 +1050,10 @@ class MachObjectWriter : public MCObjectWriter {
1050
1050
FixedValue -= Layout.getSymbolOffset (SD);
1051
1051
} else {
1052
1052
// The index is the section ordinal (1-based).
1053
- Index = SD->getFragment ()->getParent ()->getOrdinal () + 1 ;
1054
- FixedValue += getSectionAddress (SD->getFragment ()->getParent ());
1053
+ const MCSectionData &SymSD = Asm.getSectionData (
1054
+ SD->getSymbol ().getSection ());
1055
+ Index = SymSD.getOrdinal () + 1 ;
1056
+ FixedValue += getSectionAddress (&SymSD);
1055
1057
}
1056
1058
if (IsPCRel)
1057
1059
FixedValue -= getSectionAddress (Fragment->getParent ());
@@ -1149,8 +1151,10 @@ class MachObjectWriter : public MCObjectWriter {
1149
1151
FixedValue -= Layout.getSymbolOffset (SD);
1150
1152
} else {
1151
1153
// The index is the section ordinal (1-based).
1152
- Index = SD->getFragment ()->getParent ()->getOrdinal () + 1 ;
1153
- FixedValue += getSectionAddress (SD->getFragment ()->getParent ());
1154
+ const MCSectionData &SymSD = Asm.getSectionData (
1155
+ SD->getSymbol ().getSection ());
1156
+ Index = SymSD.getOrdinal () + 1 ;
1157
+ FixedValue += getSectionAddress (&SymSD);
1154
1158
}
1155
1159
if (IsPCRel)
1156
1160
FixedValue -= getSectionAddress (Fragment->getParent ());
You can’t perform that action at this time.
0 commit comments