[lld] r347349 - [CodeView] RelocPtr points to little endian data.
Zachary Turner via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 20 13:30:11 PST 2018
Author: zturner
Date: Tue Nov 20 13:30:11 2018
New Revision: 347349
URL: http://llvm.org/viewvc/llvm-project?rev=347349&view=rev
Log:
[CodeView] RelocPtr points to little endian data.
Don't use a uint32_t*, use a ulittle32_t* to make this correct
on big endian systems.
Patch by James Clarke
Differential Revision: https://reviews.llvm.org/D54421
Modified:
lld/trunk/COFF/PDB.cpp
Modified: lld/trunk/COFF/PDB.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/PDB.cpp?rev=347349&r1=347348&r2=347349&view=diff
==============================================================================
--- lld/trunk/COFF/PDB.cpp (original)
+++ lld/trunk/COFF/PDB.cpp Tue Nov 20 13:30:11 2018
@@ -1210,7 +1210,7 @@ void DebugSHandler::finish() {
// Rewrite string table indices in the Fpo Data and symbol records to refer to
// the global PDB string table instead of the object file string table.
for (DebugFrameDataSubsectionRef &FDS : NewFpoFrames) {
- const uint32_t *Reloc = FDS.getRelocPtr();
+ const ulittle32_t *Reloc = FDS.getRelocPtr();
for (codeview::FrameData FD : FDS) {
FD.RvaStart += *Reloc;
FD.FrameFunc =
More information about the llvm-commits
mailing list