[llvm] [z/OS][GOFF] Implement support for writing ESD + TXT records by the GOFFObjectWriter (PR #85851)
Ulrich Weigand via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 22 06:51:33 PDT 2024
================
@@ -18,10 +18,63 @@
namespace llvm {
class MCSymbolGOFF : public MCSymbol {
+ Align Alignment;
+
+ mutable StringRef AliasName; // ADA indirect
+
+ enum SymbolFlags : uint16_t {
+ SF_NoRent = 0x01, // Symbol is no-reentrant.
+ SF_Alias = 0x02, // Symbol is alias.
+ SF_Hidden = 0x04, // Symbol is hidden, aka not exported.
+ SF_Weak = 0x08, // Symbol is weak.
+ SF_OSLinkage = 0x10, // Symbol uses OS linkage.
+ };
+
+ // Shift value for GOFF::ESDExecutable. 3 possible values. 2 bits.
+ static constexpr uint8_t GOFF_Executable_Shift = 6;
+ static constexpr uint8_t GOFF_Executable_Bitmask = 0x03;
+
public:
MCSymbolGOFF(const StringMapEntry<bool> *Name, bool IsTemporary)
- : MCSymbol(SymbolKindGOFF, Name, IsTemporary) {}
+ : MCSymbol(SymbolKindGOFF, Name, IsTemporary), AliasName() {}
static bool classof(const MCSymbol *S) { return S->isGOFF(); }
+
+ bool hasAliasName() const { return !AliasName.empty(); }
+ void setAliasName(StringRef Name) { AliasName = Name; }
+ StringRef getAliasName() const { return AliasName; }
+
+ void setTemporary(bool Value) { IsTemporary = Value; }
----------------
uweigand wrote:
We shouldn't need this - why is the "temporary" flag not set correctly to begin with?
https://github.com/llvm/llvm-project/pull/85851
More information about the llvm-commits
mailing list