mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
[PowerPC] Fix PR22711 - Misaligned .toc section
Straightforward patch to emit an alignment directive when emitting a TOC entry. The test case was generated from the test in PR22711 that demonstrated a misaligned .toc section. The object code is run through llvm-readobj to verify that the correct alignment has been applied to the .toc section. Thanks to Ulrich Weigand for running down where the fix was needed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230801 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -145,6 +145,7 @@ public:
|
||||
}
|
||||
void emitTCEntry(const MCSymbol &S) override {
|
||||
// Creates a R_PPC64_TOC relocation
|
||||
Streamer.EmitValueToAlignment(8);
|
||||
Streamer.EmitSymbolValue(&S, 8);
|
||||
}
|
||||
void emitMachine(StringRef CPU) override {
|
||||
|
||||
Reference in New Issue
Block a user