[llvm] r260879 - [mips] Removed the SHF_ALLOC flag from the .pdr section.
Scott Egerton via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 15 01:34:15 PST 2016
Author: s.egerton
Date: Mon Feb 15 03:34:15 2016
New Revision: 260879
URL: http://llvm.org/viewvc/llvm-project?rev=260879&view=rev
Log:
[mips] Removed the SHF_ALLOC flag from the .pdr section.
Summary:
This section is used for debug information and has no need to be
in memory at runtime. With this patch, LLVM now emits the same flags as
the GNU assembler. This patch also fixes an error when compiling
the Linux kernel, The error is that there are relocations within the
.pdr section in a VDSO.
Reviewers: vkalintiris, dsanders
Subscribers: llvm-commits, dsanders
Differential Revision: http://reviews.llvm.org/D17199
Modified:
llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp
llvm/trunk/test/MC/Mips/mips-pdr.s
Modified: llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp?rev=260879&r1=260878&r2=260879&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp (original)
+++ llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp Mon Feb 15 03:34:15 2016
@@ -611,7 +611,7 @@ void MipsTargetELFStreamer::emitDirectiv
MCStreamer &OS = getStreamer();
MCSectionELF *Sec = Context.getELFSection(".pdr", ELF::SHT_PROGBITS,
- ELF::SHF_ALLOC | ELF::SHT_REL);
+ ELF::SHT_REL);
MCSymbol *Sym = Context.getOrCreateSymbol(Name);
const MCSymbolRefExpr *ExprRef =
Modified: llvm/trunk/test/MC/Mips/mips-pdr.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Mips/mips-pdr.s?rev=260879&r1=260878&r2=260879&view=diff
==============================================================================
--- llvm/trunk/test/MC/Mips/mips-pdr.s (original)
+++ llvm/trunk/test/MC/Mips/mips-pdr.s Mon Feb 15 03:34:15 2016
@@ -18,8 +18,8 @@
# OBJOUT: Section {
# OBJOUT: Name: .pdr
# OBJOUT: Type: SHT_PROGBITS (0x1)
-# OBJOUT: Flags [ (0xB)
-# OBJOUT: SHF_ALLOC (0x2)
+# OBJOUT: Flags [ (0x9)
+# OBJOUT-NOT: SHF_ALLOC (0x2)
# OBJOUT: SHF_WRITE (0x1)
# OBJOUT: ]
# OBJOUT: Size: 64
More information about the llvm-commits
mailing list