diff options
| author | Scott Egerton <Scott.Egerton@imgtec.com> | 2016-02-15 09:34:15 +0000 |
|---|---|---|
| committer | Scott Egerton <Scott.Egerton@imgtec.com> | 2016-02-15 09:34:15 +0000 |
| commit | baec95a88cd5f06f068f5cb056ebb1cafabfd654 (patch) | |
| tree | a94f15994d6c89fe054a26ff0d204fd6b0b19a47 | |
| parent | 4dc7d390dbd1c6f7087ef0576df0354a23a88292 (diff) | |
| download | bcm5719-llvm-baec95a88cd5f06f068f5cb056ebb1cafabfd654.tar.gz bcm5719-llvm-baec95a88cd5f06f068f5cb056ebb1cafabfd654.zip | |
[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
llvm-svn: 260879
| -rw-r--r-- | llvm/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp | 2 | ||||
| -rw-r--r-- | llvm/test/MC/Mips/mips-pdr.s | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp b/llvm/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp index e5fa7556053..a33ef78fa95 100644 --- a/llvm/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp +++ b/llvm/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp @@ -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 = diff --git a/llvm/test/MC/Mips/mips-pdr.s b/llvm/test/MC/Mips/mips-pdr.s index 8177e3e2344..c4b63783e76 100644 --- a/llvm/test/MC/Mips/mips-pdr.s +++ b/llvm/test/MC/Mips/mips-pdr.s @@ -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 |

