[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260879 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Scott Egerton 2016-02-15 09:34:15 +00:00
parent 0dd3e9d55e
commit 77405b1467
2 changed files with 3 additions and 3 deletions

View File

@ -611,7 +611,7 @@ void MipsTargetELFStreamer::emitDirectiveEnd(StringRef Name) {
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 =

View File

@ -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