/// has no actual object file contents.
virtual bool isVirtualSection(const MCSection &Section) const = 0;
+ /// getPointerSize - Get the pointer size in bytes.
+ virtual unsigned getPointerSize() const = 0;
+
/// ApplyFixup - Apply the \arg Value for given \arg Fixup into the provided
/// data fragment, at the offset specified by the fixup and following the
/// fixup kind as appropriate.
/*IsLittleEndian=*/true,
/*HasRelocationAddend=*/false);
}
+
+ unsigned getPointerSize() const {
+ return 4;
+ };
};
// Fixme: can we raise this to share code between Darwin and ELF?
return new MachObjectWriter(OS, /*Is64Bit=*/false);
}
+ unsigned getPointerSize() const {
+ return 4;
+ };
+
virtual bool doesSectionRequireSymbols(const MCSection &Section) const {
return false;
}
ELFX86_32AsmBackend(const Target &T, Triple::OSType OSType)
: ELFX86AsmBackend(T, OSType) {}
+ unsigned getPointerSize() const {
+ return 4;
+ }
+
MCObjectWriter *createObjectWriter(raw_ostream &OS) const {
return new ELFObjectWriter(OS, /*Is64Bit=*/false,
OSType,
ELFX86_64AsmBackend(const Target &T, Triple::OSType OSType)
: ELFX86AsmBackend(T, OSType) {}
+ unsigned getPointerSize() const {
+ return 8;
+ }
+
MCObjectWriter *createObjectWriter(raw_ostream &OS) const {
return new ELFObjectWriter(OS, /*Is64Bit=*/true,
OSType,
HasScatteredSymbols = true;
}
+ unsigned getPointerSize() const {
+ if (Is64Bit)
+ return 8;
+ else
+ return 4;
+ }
+
MCObjectWriter *createObjectWriter(raw_ostream &OS) const {
return createWinCOFFObjectWriter(OS, Is64Bit);
}
DarwinX86_32AsmBackend(const Target &T)
: DarwinX86AsmBackend(T) {}
+ unsigned getPointerSize() const {
+ return 4;
+ }
+
MCObjectWriter *createObjectWriter(raw_ostream &OS) const {
return new MachObjectWriter(OS, /*Is64Bit=*/false);
}
HasReliableSymbolDifference = true;
}
+ unsigned getPointerSize() const {
+ return 8;
+ }
+
MCObjectWriter *createObjectWriter(raw_ostream &OS) const {
return new MachObjectWriter(OS, /*Is64Bit=*/true);
}